On Thu, 17 Sep 2026 12:24:22 GMT, Florian Kirmaier <[email protected]> wrote:
>> ### Fix >> The PR replaces applyCss() with reapplyCSS in the nodeOrientation code of >> Scene. >> applyCss() reapplied styles eagerly - and didn't rebuild the "style maps" >> resulting in wrong css. >> reapplyCSS() rematches correctly - and also defers it to the next pulse. >> >> I've added a unit test to: Node_effectiveOrientation_Css_Test. >> >> ### Test improvements >> Because the whole test class was disabled, I've also investigated which >> tests are working - and reenabled the working tests. >> This PR also fixes 2 of the previously failing tests in >> Node_effectiveOrientation_Css_Test - which are now enabled. >> >> Which are the following tests: >> >> Node_effectiveOrientation_Css_Test.test_dir_pseudoClass_functions_on_scene_effective_orientation_not_node >> Node_effectiveOrientation_Css_Test.test_SimpleSelector_dir_pseudoClass_with_scene_effective_orientation_rtl >> >> >> >> >> >> >> --------- >> - [x] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Florian Kirmaier has updated the pull request with a new target base due to a > merge or a rebase. The incremental webrev excludes the unrelated changes > brought in by the merge/rebase. The pull request contains three additional > commits since the last revision: > > - Merge remote-tracking branch 'refs/remotes/origin/master' into > JDK-8388304-fix-scene-nodeorientation > - 8388304: fixed spelling and test-name > - 8388304: Scene.setNodeOrientation does not update :dir() styles > > Replace applyCss() with reapplyCSS() in the nodeOrientation invalidation: > applyCss() reapplied styles eagerly without rebuilding style maps, leaving > :dir() matches stale. reapplyCSS() re-matches and defers to the next pulse. Nice, localized fix. Minor comment in one of the tests. The test itself fails in master and runs with the fix on macOS 26.6.2. modules/javafx.graphics/src/test/java/test/javafx/scene/Node_effectiveOrientation_Css_Test.java line 247: > 245: Group root = new Group(); > 246: Scene scene = new Scene(root); > 247: Stage stage = new Stage(); this stage is leaking (never hidden etc.) should probably use the class field instead `Node_effectiveOrientation_Css_Test.stage` ? modules/javafx.graphics/src/test/java/test/javafx/scene/Node_effectiveOrientation_Css_Test.java line 273: > 271: assertEquals(Color.web("#00ff00"), rect.getFill()); > 272: } > 273: extra newline ------------- PR Review: https://git.openjdk.org/jfx/pull/2213#pullrequestreview-5271987230 PR Review Comment: https://git.openjdk.org/jfx/pull/2213#discussion_r4066541762 PR Review Comment: https://git.openjdk.org/jfx/pull/2213#discussion_r4066568614
