openjfx/8/master/rt: 9352015d712d (original) (raw)
OpenJDK / openjfx / 8 / master / rt
changeset 1815:9352015d712d
RT-24784: ensure parent style manager is properly initialized
David Grievedavid.grieve@oracle.com | |
---|---|
date | Fri, 12 Oct 2012 14:51:58 -0400 |
parents | 393c90eb52e0 |
children | c731a926c171 |
files | javafx-ui-common/src/javafx/scene/Parent.java |
diffstat | 1 files changed, 20 insertions(+), 20 deletions(-)[+] [-] javafx-ui-common/src/javafx/scene/Parent.java 40 |
line wrap: on
line diff
--- a/javafx-ui-common/src/javafx/scene/Parent.java Fri Oct 12 14:51:58 2012 -0400 +++ b/javafx-ui-common/src/javafx/scene/Parent.java Fri Oct 12 14:51:58 2012 -0400 @@ -1115,28 +1115,28 @@ styleManager = null;
final boolean hasStylesheets = (getStylesheets().isEmpty() == false);[](#l1.7)
[](#l1.8)
if (hasStylesheets) {[](#l1.9)
final Scene scene = getScene();[](#l1.10)
if (scene == null) return null;[](#l1.11)
// This Parent's styleManager will chain to the styleManager of [](#l1.13)
// one of its ancestors, or to the scene styleManager.[](#l1.14)
StyleManager parentStyleManager = null;[](#l1.15)
Parent parent = getParent();[](#l1.16)
while (parent != null && [](#l1.17)
(parentStyleManager = parent.getStyleManager()) == null) {[](#l1.18)
parent = parent.getParent();[](#l1.19)
}[](#l1.20)
// This Parent's styleManager will chain to the styleManager of [](#l1.21)
// one of its ancestors, or to the scene styleManager.[](#l1.22)
StyleManager parentStyleManager = null;[](#l1.23)
Parent parent = getParent();[](#l1.24)
while (parent != null && parentStyleManager == null) {[](#l1.25)
parentStyleManager = parent.getStyleManager();[](#l1.26)
parent = parent.getParent();[](#l1.27)
}[](#l1.28)
[](#l1.29)
if (parentStyleManager == null) parentStyleManager = scene.styleManager;[](#l1.30)
[](#l1.31)
if (getStylesheets().isEmpty() == false) {[](#l1.32) [](#l1.33)
if (parentStyleManager != null) {[](#l1.34)
styleManager = [](#l1.35)
StyleManager.createStyleManager(Parent.this, parentStyleManager);[](#l1.36)
} else {[](#l1.37)
final Scene scene = getScene();[](#l1.38)
if (scene != null) {[](#l1.39)
StyleManager.createStyleManager(Parent.this, scene.styleManager);[](#l1.40)
}[](#l1.41)
} [](#l1.42)
styleManager = [](#l1.43)
StyleManager.createStyleManager(Parent.this, parentStyleManager);[](#l1.44)
[](#l1.45)
} else {[](#l1.46)
[](#l1.47)
styleManager = parentStyleManager; [](#l1.48) [](#l1.49) }[](#l1.50) return styleManager;[](#l1.51)