RFR: 8278759 : PointerEvent: buttons property set to 0 when mouse down
Kevin Rushforth
kcr at openjdk.java.net
Fri Feb 25 00:36:10 UTC 2022
On Thu, 24 Feb 2022 23:59:29 GMT, Kevin Rushforth <kcr at openjdk.org> wrote:
>> Basically, buttons property is a mask which represents the button/buttons clicked on the mouse.
>> It is observed that event.buttons property is set to 0 when there is mouse press or drag event.This behaviour is observed only with javafx webView.Other browsers set the buttons property to 1, when there is mouse press or drag.
>> The issue happens because the buttons property is not updated in the framework.
>> Added implementation to update and propagate the buttons property from javafx platform to native webkit.Added a robot test case for the same.
>> Performed sanity testing with the added implementation and the buttons property is compliant with the specification mentioned in https://w3c.github.io/pointerevents/#the-buttons-property.
>
> modules/javafx.web/src/main/native/Source/WebCore/platform/PlatformMouseEvent.h line 76:
>
>> 74: PlatformMouseEvent(const IntPoint& position, const IntPoint& globalPosition, MouseButton button, PlatformEvent::Type type,
>> 75: int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, WallTime timestamp, double force,
>> 76: SyntheticClickType syntheticClickType, PointerID pointerId = mousePointerID)
>
> I recommend reverting this change, since this is in WebKit shared code and the only change you made is in formatting. It will help avoid future merge conflicts.
GitHub is showing more context than it should have, so my comment might be confusing. I only meant to suggest that you revert the reformatting of the existing constructor. Everything inside the `#if` looks fine.
> move the runAndWait outside the list...
I meant "loop"
-------------
PR: https://git.openjdk.java.net/jfx/pull/742
More information about the openjfx-dev
mailing list