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

8290990: Clear .root style class from a root node that is removed from a Scene/SubScene #849

Closed
wants to merge 2 commits into from

Conversation

mstr2
Copy link
Collaborator

@mstr2 mstr2 commented Jul 26, 2022

When a node is set as the root node of a Scene or SubScene, the "root" style class is automatically added to the node, but not cleared when the node is later removed from the scene.

This can lead to an incorrectly set "root" style class when the removed node is inserted in the scene graph below the root node, or to duplicate "root" style class entries when the removed node is again set as the root node of the scene.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed (2 reviews required, with at least 1 Reviewer, 1 Author)

Issue

  • JDK-8290990: Clear .root style class from a root node that is removed from a Scene/SubScene

Reviewers

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jfx pull/849/head:pull/849
$ git checkout pull/849

Update a local copy of the PR:
$ git checkout pull/849
$ git pull https://git.openjdk.org/jfx pull/849/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 849

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

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jfx/pull/849.diff

Sorry, something went wrong.

mstr2 added 2 commits July 26, 2022 04:43

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@bridgekeeper
Copy link

bridgekeeper bot commented Jul 26, 2022

👋 Welcome back mstrauss! 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 Ready for review label Jul 26, 2022
@mlbridge
Copy link

mlbridge bot commented Jul 26, 2022

Webrevs

@kevinrushforth
Copy link
Member

This seems like a pretty safe and obvious fix. Since it touches CSS, it needs a second reviewer, but I don't expect it will take long to review.

/reviewers 2

@openjdk
Copy link

openjdk bot commented Jul 26, 2022

@kevinrushforth
The total number of required reviews for this PR (including the jcheck configuration and the last /reviewers command) is now set to 2 (with at least 1 Reviewer, 1 Author).

Copy link
Collaborator

@hjohn hjohn left a comment

Choose a reason for hiding this comment

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

I've ran into a problem related to this before (multiple root's), and this looks like a good fix.

Copy link
Collaborator

@aghaisas aghaisas 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.

@openjdk
Copy link

openjdk bot commented Jul 28, 2022

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

8290990: Clear .root style class from a root node that is removed from a Scene/SubScene

Reviewed-by: jhendrikx, aghaisas, mhanl

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

  • 7e48413: 8285881: Update WebKit to 614.1
  • 49a2efb: 8290527: Bump macOS GitHub actions to macOS 11
  • a122cef: 8289388: Fix warnings: method is overriding a synchronized method without being synchronized
  • 075cc80: 8289389: Fix warnings: type should also implement hashCode() since it overrides Object.equals()
  • 9f636da: Merge
  • 6da05c2: 8290348: TreeTableView jumping to top
  • 54e689c: 8288450: Update attribution in gstreamer.md file

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 (@aghaisas) 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 Jul 28, 2022
Copy link
Member

@Maran23 Maran23 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 too.

@@ -316,6 +316,7 @@ protected void invalidated() {
if (oldRoot != null) {
StyleManager.getInstance().forget(SubScene.this);
Copy link
Member

@Maran23 Maran23 Jul 28, 2022

Choose a reason for hiding this comment

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

Not part of the story, but interesting that here the SubScene will be 'forgotten' but nothing like this happens in the Scene class. 😄

@mstr2
Copy link
Collaborator Author

mstr2 commented Jul 28, 2022

/integrate

@openjdk openjdk bot added the sponsor Ready to sponsor label Jul 28, 2022
@openjdk
Copy link

openjdk bot commented Jul 28, 2022

@mstr2
Your change (at version 43da590) is now ready to be sponsored by a Committer.

@kevinrushforth
Copy link
Member

/sponsor

@openjdk
Copy link

openjdk bot commented Jul 28, 2022

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

  • 7e48413: 8285881: Update WebKit to 614.1
  • 49a2efb: 8290527: Bump macOS GitHub actions to macOS 11
  • a122cef: 8289388: Fix warnings: method is overriding a synchronized method without being synchronized
  • 075cc80: 8289389: Fix warnings: type should also implement hashCode() since it overrides Object.equals()
  • 9f636da: Merge
  • 6da05c2: 8290348: TreeTableView jumping to top
  • 54e689c: 8288450: Update attribution in gstreamer.md file

Your commit was automatically rebased without conflicts.

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

openjdk bot commented Jul 28, 2022

@kevinrushforth @mstr2 Pushed as commit 0b74ee8.

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

@mstr2 mstr2 deleted the fixes/root-style-class branch January 22, 2023 16:59
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
Development

Successfully merging this pull request may close these issues.

None yet

5 participants