flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [3/5] git commit: [flex-falcon] [refs/heads/develop] - special case content and quote it
Date Wed, 15 Jul 2015 00:55:01 GMT
special case content and quote it


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/350daadd
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/350daadd
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/350daadd

Branch: refs/heads/develop
Commit: 350daadd09d65552210b621cb7adffa379f2e556
Parents: 35ba112
Author: Alex Harui <aharui@apache.org>
Authored: Tue Jul 14 08:26:19 2015 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Jul 14 17:54:54 2015 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/css/CSSProperty.java    | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/350daadd/compiler/src/org/apache/flex/compiler/internal/css/CSSProperty.java
----------------------------------------------------------------------
diff --git a/compiler/src/org/apache/flex/compiler/internal/css/CSSProperty.java b/compiler/src/org/apache/flex/compiler/internal/css/CSSProperty.java
index 76ffced..4dd0b4d 100644
--- a/compiler/src/org/apache/flex/compiler/internal/css/CSSProperty.java
+++ b/compiler/src/org/apache/flex/compiler/internal/css/CSSProperty.java
@@ -72,14 +72,20 @@ public class CSSProperty extends CSSNodeBase implements ICSSProperty
         {
             cssName = cssName.replaceAll("[A-Z]", "-$0").toLowerCase();
         }
+        if (cssName.equals("content"))
+        {
+            return String.format("%s : \"%s\" ;", cssName, ((CSSStringPropertyValue)value).getValue());
           
+        }
         if (value instanceof CSSStringPropertyValue)
         {
             return String.format("%s : %s ;", cssName, ((CSSStringPropertyValue)value).getValue());
         }
         if (cssName.equalsIgnoreCase("border"))
         {
-            CSSArrayPropertyValue borderValues = (CSSArrayPropertyValue)value;
-            return String.format("%s : %s ;", cssName, Joiner.on(" ").join(borderValues.getElements()));
+            if (value instanceof CSSArrayPropertyValue) {
+                CSSArrayPropertyValue borderValues = (CSSArrayPropertyValue)value;
+                return String.format("%s : %s ;", cssName, Joiner.on(" ").join(borderValues.getElements()));
+            }
         }
         return String.format("%s : %s ;", cssName, value.toString());
     }


Mime
View raw message