## javafx-ui-common/src/javafx/scene/Scene.java

Print this page

    rev 1582 : RT-22121: Have StyleManager for Parent, also

    @@ -283,11 +283,11 @@

         private Scene(Parent root, double width, double height,
                 @Default("javafx.scene.paint.Color.WHITE") Paint fill,
                 boolean depthBuffer) {
             Toolkit.getToolkit().checkFxUserThread();
    -        styleManager = new StyleManager(this);
    +        styleManager = StyleManager.createStyleManager(this);
             setRoot(root);
             init(width, height, depthBuffer);
             setFill(fill);
         }

    @@ -439,11 +439,11 @@
             if (sceneRoot.cssFlag != CSSFlags.CLEAN) {
                 // The dirty bit isn't checked but we must ensure it is cleared.
                 // The cssFlag is set to clean in either Node.processCSS or
                 // Node.impl_processCSS(boolean)
                 sceneRoot.impl_clearDirty(com.sun.javafx.scene.DirtyBits.NODE_CSS);
    -            sceneRoot.processCSS();
    +            sceneRoot.processCSS(styleManager);
             }
         }

         /**
          * List of dirty layout roots.

    @@ -1377,11 +1377,11 @@
          * Guide</a>.
          */
         private final ObservableList<String> stylesheets  = new TrackableObservableList<String>() {
             @Override
             protected void onChanged(Change<String> c) {
    -            styleManager.updateStylesheets();
    +            styleManager.stylesheetsChanged(c);
                 // RT-9784 - if stylesheet is removed, reset styled properties to
                 // their initial value.
                 while(c.next()) {
                     if (c.wasRemoved() == false) continue;
                     getRoot().impl_cssResetInitialValues();