changeset 7619:39c4399a3630

RT-38065: CSS -fx-pref-width et al do not accept "infinity" value
author David Grieve<david.grieve@oracle.com>
date Mon, 04 Aug 2014 16:42:03 -0400
parents 40389de6eea9
children 5c4df3d3ef9c
files modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Sun Aug 03 17:57:04 2014 +0300
+++ b/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Mon Aug 04 16:42:03 2014 -0400
@@ -866,6 +866,10 @@
             } else if ("radial".equals(text) && (root.nextInSeries) != null) {
                 // if nextInSeries is null, then assume this is _not_ an old-style radial gradient
                 value = radialGradient(root);
+            } else if ("infinity".equals(text)) {
+                Size size = new Size(Double.MAX_VALUE, SizeUnits.PX);
+                ParsedValueImpl sizeValue = new ParsedValueImpl<Size,Number>(size, null);
+                value = new ParsedValueImpl<ParsedValue<?,Size>,Number>(sizeValue, SizeConverter.getInstance());
             } else if ("true".equals(text)) {
                 // TODO: handling of boolean is really bogus
                 value = new ParsedValueImpl<String,Boolean>("true",BooleanConverter.getInstance());