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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8244075: Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene #515

Closed
wants to merge 3 commits into from

Conversation

@arapte
Copy link
Member

@arapte arapte commented May 24, 2021

Issue:
There are several issues related to Accelerator of MenuItem of a ConextMenu set on Control.

  1. Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene
  2. Accelerator is not updated correctly when the Control is removed from a Scene and Added to a different Scene
  3. Accelerator is not removed from Scene when the anchor node is removed from Scene and then it's ContextMenu is set to null

Fix:
The accelerator should be added or removed correctly according to the Scene property of the anchor node.
The issue#3 in above list is only fixed for Button and fails for other Controls. A test is added for this scenario and I shall report a new issue to address it.
Added tests that fails before and pass after the fix.


Progress

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

Issue

  • JDK-8244075: Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 515

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

Using diff file

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

@bridgekeeper
Copy link

@bridgekeeper bridgekeeper bot commented May 24, 2021

👋 Welcome back arapte! 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.

@openjdk openjdk bot added the rfr label May 24, 2021
@mlbridge
Copy link

@mlbridge mlbridge bot commented May 24, 2021

Webrevs

@kevinrushforth
Copy link
Member

@kevinrushforth kevinrushforth commented May 24, 2021

/reviewers 2

@openjdk
Copy link

@openjdk openjdk bot commented May 24, 2021

@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

Looks good. I left one comment on the test. When you update it to include the bug ID of the follow-on bug, I'll re-review it.

@openjdk
Copy link

@openjdk openjdk bot commented Jun 9, 2021

@arapte 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:

8244075: Accelerator of ContextMenu's MenuItem is not removed when ContextMenu is removed from Scene

Reviewed-by: kcr, aghaisas

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 13 new commits pushed to the master branch:

  • ca25036: 8267858: Document that title property in WebEngine gets updated asynchronously
  • 59cf4de: 8267505: {List,Set,Map}PropertyBase::bind should check against identity
  • fe81b9c: 8268120: Allow hardware cursor to be used on Monocle-EGL platforms
  • ee03238: 8268152: gstmpegaudioparse does not provides timestamps for HLS MP3 streams
  • 47700d8: 8267819: CoInitialize/CoUninitialize should be called on same thread
  • 526f990: 8239138: StyleManager should use a BufferedInputStream
  • 5e6d442: 8267892: Add .gitattributes to repo
  • 7b7050c: 8267314: Loading some animated GIFs fails with ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096
  • a645b5a: 8252783: Remove the css Selector and ShapeConverter constructors
  • 329013b: 8267621: Mark HonorDeveloperSettingsTest as unstable on Linux
  • ... and 3 more: https://git.openjdk.java.net/jfx/compare/aebac072b1919e68f7732de929dc085d00c62e92...master

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.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the ready label Jun 9, 2021
@arapte
Copy link
Member Author

@arapte arapte commented Jun 11, 2021

/integrate

@openjdk
Copy link

@openjdk openjdk bot commented Jun 11, 2021

Going to push as commit 0ffa8e2.
Since your change was applied there have been 14 commits pushed to the master branch:

  • e6cf1df: 8267094: TreeCell: cancelEvent must return correct editing location
  • ca25036: 8267858: Document that title property in WebEngine gets updated asynchronously
  • 59cf4de: 8267505: {List,Set,Map}PropertyBase::bind should check against identity
  • fe81b9c: 8268120: Allow hardware cursor to be used on Monocle-EGL platforms
  • ee03238: 8268152: gstmpegaudioparse does not provides timestamps for HLS MP3 streams
  • 47700d8: 8267819: CoInitialize/CoUninitialize should be called on same thread
  • 526f990: 8239138: StyleManager should use a BufferedInputStream
  • 5e6d442: 8267892: Add .gitattributes to repo
  • 7b7050c: 8267314: Loading some animated GIFs fails with ArrayIndexOutOfBoundsException: Index 4096 out of bounds for length 4096
  • a645b5a: 8252783: Remove the css Selector and ShapeConverter constructors
  • ... and 4 more: https://git.openjdk.java.net/jfx/compare/aebac072b1919e68f7732de929dc085d00c62e92...master

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot closed this Jun 11, 2021
@openjdk openjdk bot added integrated and removed ready rfr labels Jun 11, 2021
@openjdk
Copy link

@openjdk openjdk bot commented Jun 11, 2021

@arapte Pushed as commit 0ffa8e2.

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

@arapte arapte deleted the cm_accelerator_leak branch Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants