Repository: flex-falcon
Updated Branches:
  refs/heads/develop ceb109140 -> 9852612f8


keep % as string


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

Branch: refs/heads/develop
Commit: 9852612f8b0b883ca37206acfd6c5d69543171bc
Parents: ceb1091
Author: Alex Harui <[email protected]>
Authored: Thu Jul 30 06:20:12 2015 -0700
Committer: Alex Harui <[email protected]>
Committed: Thu Jul 30 06:20:12 2015 -0700

----------------------------------------------------------------------
 .../apache/flex/compiler/internal/css/codegen/CSSReducer.java  | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/9852612f/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSReducer.java
----------------------------------------------------------------------
diff --git 
a/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSReducer.java 
b/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSReducer.java
index 1e53e45..0d4d82b 100644
--- a/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSReducer.java
+++ b/compiler/src/org/apache/flex/compiler/internal/css/codegen/CSSReducer.java
@@ -476,7 +476,11 @@ public class CSSReducer implements ICSSCodeGenResult
         }
         else if (value instanceof CSSNumberPropertyValue)
         {
-            valueInstructions.addInstruction(ABCConstants.OP_pushdouble, new 
Double(((CSSNumberPropertyValue)value).getNumber().doubleValue()));
+            CSSNumberPropertyValue numValue = (CSSNumberPropertyValue)value;
+            if (numValue.getUnit().equals("%"))
+                valueInstructions.addInstruction(ABCConstants.OP_pushstring, 
numValue.toString());
+            else
+                valueInstructions.addInstruction(ABCConstants.OP_pushdouble, 
new Double(numValue.getNumber().doubleValue()));
         }
         else if (value instanceof CSSFunctionCallPropertyValue)
         {

Reply via email to