changeset 6600:55f75996bde5

RT-36491: CSSParser - if nextInSeries is null, then assume this is _not_ an old-style linear gradient
author David Grieve<david.grieve@oracle.com>
date Wed, 02 Apr 2014 16:01:45 -0400
parents 952213e6d905
children b8631aa10c3e
files modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Wed Apr 02 12:07:16 2014 -0700
+++ b/modules/graphics/src/main/java/com/sun/javafx/css/parser/CSSParser.java	Wed Apr 02 16:01:45 2014 -0400
@@ -852,9 +852,11 @@
             final String text = str.toLowerCase(Locale.ROOT);
             if ("ladder".equals(text)) {
                 value = ladder(root);
-            } else if ("linear".equals(text)) {
+            } else if ("linear".equals(text) && (root.nextInSeries) != null) {
+                // if nextInSeries is null, then assume this is _not_ an old-style linear gradient
                 value = linearGradient(root);
-            } else if ("radial".equals(text)) {
+            } 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 ("true".equals(text)) {
                 // TODO: handling of boolean is really bogus