changeset 6220:232c156edd82

RT-35524: need to special case -fx-fill in CSSParser to handle url value
author David Grieve<david.grieve@oracle.com>
date Thu, 30 Jan 2014 16:32:20 -0500
parents 214fddde54f6
children 20396f6a7fac
files modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java
diffstat 1 files changed, 11 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Thu Jan 30 16:31:58 2014 -0500
+++ b/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Thu Jan 30 16:32:20 2014 -0500
@@ -25,6 +25,7 @@
 
 package com.sun.javafx.css.parser;
 
+import javafx.css.StyleConverter;
 import javafx.css.Styleable;
 import javafx.geometry.Insets;
 import javafx.scene.effect.BlurType;
@@ -710,8 +711,16 @@
                 return new ParsedValueImpl<String,String>("null", null);
             }
         }
-
-        if ("-fx-background-color".equals(property)) {
+        if ("-fx-fill".equals(property)) {
+             ParsedValueImpl pv = parse(root);
+            if (pv.getConverter() == StyleConverter.getUrlConverter()) {
+                // ImagePatternConverter expects array of ParsedValue where element 0 is the URL
+                // Pending RT-33574
+                pv = new ParsedValueImpl(new ParsedValue[] {pv},PaintConverter.ImagePatternConverter.getInstance());
+            }
+            return pv;
+        }
+        else if ("-fx-background-color".equals(property)) {
             return parsePaintLayers(root);
         } else if ("-fx-background-image".equals(prop)) {
             return parseURILayers(root);