changeset 1056:19dcd1df2147

RT-21563: if default ua stylesheet is set, then the default container must be destroyed so it will be rebuilt
author David Grieve<david.grieve@oracle.com>
date Wed, 16 May 2012 13:13:47 -0400
parents 3f79febcea11
children 425d61129c94
files javafx-ui-common/src/com/sun/javafx/css/StyleManager.java
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Wed May 16 17:36:05 2012 +0100
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleManager.java	Wed May 16 13:13:47 2012 -0400
@@ -548,6 +548,16 @@
         if (defaultUserAgentStylesheet != null) {
             defaultUserAgentStylesheet.setOrigin(Stylesheet.Origin.USER_AGENT);
         }
+        if (defaultContainer != null) {
+            //
+            // RT-21563 if default ua stylesheet is set, then the default 
+            // container must be destroyed so it will be rebuilt. If this is 
+            // the first time the ua stylesheet is set, then the defaultContainer
+            // won't have any rules so it must be destroyed so it will be rebuilt. 
+            // 
+            defaultContainer.destroy();
+            defaultContainer = null;
+        }
         if (containerMap != null) {
             Iterator<StylesheetContainer> iter = containerMap.values().iterator();
             while(iter.hasNext()) {