Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

8278759 : PointerEvent: buttons property set to 0 when mouse down #742

Closed
wants to merge 5 commits into from

Conversation

HimaBinduMeda
Copy link
Contributor

@HimaBinduMeda HimaBinduMeda commented Feb 24, 2022

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.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Issue

  • JDK-8278759: PointerEvent: buttons property set to 0 when mouse down

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jfx pull/742/head:pull/742
$ git checkout pull/742

Update a local copy of the PR:
$ git checkout pull/742
$ git pull https://git.openjdk.java.net/jfx pull/742/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 742

View PR using the GUI difftool:
$ git pr show -t 742

Using diff file

Download this PR as a diff file:
https://git.openjdk.java.net/jfx/pull/742.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Feb 24, 2022

馃憢 Welcome back HimaBinduMeda! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@HimaBinduMeda HimaBinduMeda changed the title 8277734 : PointerEvent: buttons property set to 0 when mouse down 8278759 : PointerEvent: buttons property set to 0 when mouse down Feb 24, 2022
@openjdk openjdk bot added the rfr Ready for review label Feb 24, 2022
@mlbridge
Copy link

mlbridge bot commented Feb 24, 2022

Webrevs

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix and test both look good. I verified that the new test fails without your fix and passes with the fix.

I left a few suggestions and minor formatting issues.

@kevinrushforth
Copy link
Member

/reviewers 2

@kevinrushforth
Copy link
Member

@arapte @jaybhaskar Can you also review?

@openjdk
Copy link

openjdk bot commented Feb 25, 2022

@kevinrushforth
The number of required reviews for this PR is now set to 2 (with at least 1 of role reviewers).

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes look good. While doing final testing, I am seeing test failures on Windows caused by the popup not being dismissed. See below.

Copy link
Member

@kevinrushforth kevinrushforth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. The test now passes for me on all platforms.

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix itself looks good.
Suggesting some changes in the test.

scene = new Scene(new StackPane(webView), SCENE_WIDTH, SCENE_HEIGHT);
stage.setScene(scene);
stage.setAlwaysOnTop(true);
Platform.runLater(startupLatch::countDown);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This latch countDown should be done when the stage is shown on the screen.
It should be: stage.setOnShown(e -> { Platform.runLater(() -> startupLatch.countDown()); });

webView = new WebView();
webEngine = webView.getEngine();
String URL = this.getClass().getResource("pointerEvent.html").toString();
webEngine.load( URL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor: webEngine.load(URL);
While you are at it, please remove the double spaces on line 111, 144

Copy link
Member

@jaybhaskar jaybhaskar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • looks good

Copy link
Member

@arapte arapte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, verified on Windows and Mac.

@openjdk
Copy link

openjdk bot commented Mar 1, 2022

@HimaBinduMeda This change now passes all automated pre-integration checks.

鈩癸笍 This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details.

After integration, the commit message for the final commit will be:

8278759: PointerEvent: buttons property set to 0 when mouse down

Reviewed-by: kcr, arapte

You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed.

At the time when this comment was updated there had been 1 new commit pushed to the master branch:

  • e74cbe8: 8281089: JavaFX built with VS2019 and jlinked into JDK 11.x fails to start

Please see this link for an up-to-date comparison between the source branch of this pull request and the master branch.
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@kevinrushforth, @arapte) but any other Committer may sponsor as well.

鉃★笍 To flag this PR as ready for integration with the above commit message, type /integrate in a new comment. (Afterwards, your sponsor types /sponsor in a new comment to perform the integration).

@openjdk openjdk bot added the ready Ready to be integrated label Mar 1, 2022
@HimaBinduMeda
Copy link
Contributor Author

/integrate

@openjdk openjdk bot added the sponsor Ready to sponsor label Mar 1, 2022
@openjdk
Copy link

openjdk bot commented Mar 1, 2022

@HimaBinduMeda
Your change (at version b3f4d9a) is now ready to be sponsored by a Committer.

@kevinrushforth
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Mar 1, 2022

Going to push as commit 2e8a4a5.
Since your change was applied there has been 1 commit pushed to the master branch:

  • e74cbe8: 8281089: JavaFX built with VS2019 and jlinked into JDK 11.x fails to start

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Mar 1, 2022
@openjdk openjdk bot closed this Mar 1, 2022
@openjdk openjdk bot removed the ready Ready to be integrated label Mar 1, 2022
@openjdk openjdk bot removed rfr Ready for review sponsor Ready to sponsor labels Mar 1, 2022
@openjdk
Copy link

openjdk bot commented Mar 1, 2022

@kevinrushforth @HimaBinduMeda Pushed as commit 2e8a4a5.

馃挕 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integrated Pull request has been integrated
4 participants