-
Notifications
You must be signed in to change notification settings - Fork 583
8388304: Scene.setNodeOrientation triggers instant CSS but also doesn't update properly. #2213
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
base: master
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,6 @@ | |
| /** | ||
| * Test :dir functional pseudo-class | ||
| */ | ||
| @Disabled("JDK-8234152") | ||
| public class Node_effectiveOrientation_Css_Test { | ||
|
|
||
| private Group root; | ||
|
|
@@ -119,6 +118,7 @@ public void test_SimpleSelector_dir_pseudoClass_with_scene_effective_orientation | |
| assertEquals(Color.web("#ff0000"), rect.getFill()); | ||
| } | ||
|
|
||
| @Disabled("JDK-8234152") | ||
| @Test | ||
| public void test_CompounSelector_dir_pseudoClass_on_parent_with_scene_effective_orientation_ltr() { | ||
| Stylesheet stylesheet = new CssParser().parse( | ||
|
|
@@ -139,6 +139,8 @@ public void test_CompounSelector_dir_pseudoClass_on_parent_with_scene_effective_ | |
| assertEquals(Color.web("#00ff00"), rect.getFill()); | ||
| } | ||
|
|
||
|
|
||
| @Disabled("JDK-8234152") | ||
| @Test | ||
| public void test_CompoundSelector_dir_pseudoClass_on_parent_with_scene_effective_orientation_rtl() { | ||
| Stylesheet stylesheet = new CssParser().parse( | ||
|
|
@@ -160,6 +162,7 @@ public void test_CompoundSelector_dir_pseudoClass_on_parent_with_scene_effective | |
| assertEquals(Color.web("#ff0000"), rect.getFill()); | ||
| } | ||
|
|
||
| @Disabled("JDK-8234152") | ||
| @Test | ||
| public void test_CompounSelector_dir_pseudoClass_on_child_with_scene_effective_orientation_ltr() { | ||
| Stylesheet stylesheet = new CssParser().parse( | ||
|
|
@@ -180,6 +183,7 @@ public void test_CompounSelector_dir_pseudoClass_on_child_with_scene_effective_o | |
| assertEquals(Color.web("#00ff00"), rect.getFill()); | ||
| } | ||
|
|
||
| @Disabled("JDK-8234152") | ||
| @Test | ||
| public void test_CompoundSelector_dir_pseudoClass_on_child_with_scene_effective_orientation_rtl() { | ||
| Stylesheet stylesheet = new CssParser().parse( | ||
|
|
@@ -236,4 +240,35 @@ public void test_dir_pseudoClass_functions_on_scene_effective_orientation_not_no | |
|
|
||
| } | ||
|
|
||
| @Test | ||
| public void testCssUpdates() { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we should name it similar as what you wrote in your description - maybe
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's now named testChangeNodeOrientationWillReapplyCss. |
||
| Group root = new Group(); | ||
| Scene scene = new Scene(root); | ||
| Stage stage = new Stage(); | ||
| stage.setScene(scene); | ||
| stage.show(); | ||
|
|
||
| Stylesheet stylesheet = new CssParser().parse( | ||
| ".rect:dir(rtl) { -fx-fill: #ff0000; }" + | ||
| ".rect:dir(ltr) { -fx-fill: #00ff00; }" + | ||
| ".rect { -fx-fill: #0000ff; }" | ||
| ); | ||
| StyleManager.getInstance().setDefaultUserAgentStylesheet(stylesheet); | ||
|
|
||
| Rectangle rect = new Rectangle(); | ||
| rect.getStyleClass().add("rect"); | ||
| root.getChildren().add(rect); | ||
|
|
||
| root.applyCss(); | ||
| assertEquals(Color.web("#00ff00"), rect.getFill()); | ||
|
|
||
| scene.setNodeOrientation(RIGHT_TO_LEFT); | ||
| root.applyCss(); | ||
| assertEquals(Color.web("#ff0000"), rect.getFill()); | ||
|
|
||
| scene.setNodeOrientation(LEFT_TO_RIGHT); | ||
| root.applyCss(); | ||
| assertEquals(Color.web("#00ff00"), rect.getFill()); | ||
| } | ||
|
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While here, can we fix the typo in
test_Compoun->test_Compoundhere and some other tests aswellThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed the 2 Compun - couldn't find another spelling error.