switch to new CSS format

Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/08903cae
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/08903cae
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/08903cae

Branch: refs/heads/spark
Commit: 08903caef5859ee1867a5577f04506eb6c8b6b22
Parents: 5f15c1b
Author: Alex Harui <aha...@apache.org>
Authored: Thu Sep 15 22:04:26 2016 -0700
Committer: Alex Harui <aha...@apache.org>
Committed: Thu Sep 15 22:04:26 2016 -0700

----------------------------------------------------------------------
 .../src/main/flex/mx/styles/StyleManagerImpl.as | 20 +++++---------------
 1 file changed, 5 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/08903cae/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as 
b/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
index d3c2148..30b8ca1 100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
@@ -143,23 +143,13 @@ public class StyleManagerImpl extends EventDispatcher 
implements IStyleManager2
                         var selName:String = cssData[i++];
                         decls.push(new CSSStyleDeclaration(selName));
                     }
-                    var numProps:int = cssData[i++];
-                    for (j = 0; j < numProps; j++)
-                    {
-                        var propName:String = cssData[i++];
-                        var propValue:Object = cssData[i++];
-                        props[propName] = propValue;
-                    }
+                    var propFn:Function = cssData[i++];
                     for each (var decl:CSSStyleDeclaration in decls)
                     {
-                        var factoryFunction:String = "(function 
factoryFunction() {";
-                        for (var p:String in props)
-                        {
-                            factoryFunction += "this." + p + " = " + props[p] 
+ ";";
-                        }
-                        factoryFunction += "})";
-                        var f:Function = eval(factoryFunction);
-                        decl.defaultFactory = f;
+                        if (decl.defaultFactory == null)
+                            decl.defaultFactory = propFn;
+                        else
+                            decl.factory = propFn;
                     }
                 }
             }

Reply via email to