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

Print this page

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

    *** 283,293 ****

          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);
              setRoot(root);
              init(width, height, depthBuffer);
              setFill(fill);
          }

    --- 283,293 ----

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

    *** 439,449 ****
              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();
              }
          }

          /**
           * List of dirty layout roots.
    --- 439,449 ----
              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(styleManager);
              }
          }

          /**
           * List of dirty layout roots.
    *** 1377,1387 ****
           * Guide</a>.
           */
          private final ObservableList<String> stylesheets  = new TrackableObservableList<String>() {
              @Override
              protected void onChanged(Change<String> c) {
    !             styleManager.updateStylesheets();
                  // RT-9784 - if stylesheet is removed, reset styled properties to
                  // their initial value.
                  while(c.next()) {
                      if (c.wasRemoved() == false) continue;
                      getRoot().impl_cssResetInitialValues();
    --- 1377,1387 ----
           * Guide</a>.
           */
          private final ObservableList<String> stylesheets  = new TrackableObservableList<String>() {
              @Override
              protected void onChanged(Change<String> c) {
    !             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();