changeset 1419:a88de67241de

RT-21594: If the style cache for a node is null, then tell the node to reapply CSS because the StyleHelper is no good in this case.
author David Grieve<david.grieve@oracle.com>
date Mon, 09 Jul 2012 12:51:19 -0400
parents 5b3e02e4f23b
children 18f3884957e7
files javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Mon Jul 09 12:39:43 2012 -0400
+++ b/javafx-ui-common/src/com/sun/javafx/css/StyleHelper.java	Mon Jul 09 12:51:19 2012 -0400
@@ -44,14 +44,10 @@
 import java.lang.ref.WeakReference;
 import java.util.*;
 import java.util.Map.Entry;
-import javafx.beans.property.BooleanProperty;
-import javafx.beans.property.ReadOnlyObjectProperty;
-import javafx.beans.property.SimpleBooleanProperty;
 import javafx.beans.value.WritableValue;
 import javafx.scene.Parent;
 import javafx.scene.text.FontPosture;
 import javafx.scene.text.FontWeight;
-import javafx.scene.text.Text;
 
 /**
  * The StyleHelper is a helper class used for applying CSS information to Nodes.
@@ -742,7 +738,14 @@
         //
                 
         final CacheEntry cacheEntry = getCacheEntry(node, pseudoClassStates);
-        if (cacheEntry == null) return;
+        if (cacheEntry == null) {
+            // If cacheEntry is null, then the StyleManager Cache from which
+            // this StyleHelper was created has been blown away and this
+            // StyleHelper is no good. If this is the case, we need to tell
+            // this node to reapply CSS
+            node.impl_reapplyCSS();
+            return;
+        }
 
         //
         // if this node has a style map, then we'll populate it.