Repository: flex-falcon Updated Branches: refs/heads/develop 6e13db21b -> 0b3c78b95
change JS CSS encoding Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/0b3c78b9 Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/0b3c78b9 Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/0b3c78b9 Branch: refs/heads/develop Commit: 0b3c78b95152939ade64afbaf8c455f1dd2eb38d Parents: 6e13db2 Author: Alex Harui <[email protected]> Authored: Wed Sep 14 17:17:08 2016 -0700 Committer: Alex Harui <[email protected]> Committed: Wed Sep 14 17:17:08 2016 -0700 ---------------------------------------------------------------------- .../driver/js/flexjs/JSCSSCompilationSession.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/0b3c78b9/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java ---------------------------------------------------------------------- diff --git a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java index fdad4c3..c23d92b 100644 --- a/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java +++ b/compiler-jx/src/main/java/org/apache/flex/compiler/internal/driver/js/flexjs/JSCSSCompilationSession.java @@ -254,15 +254,17 @@ public class JSCSSCompilationSession extends CSSCompilationSession } } result.append(",\n"); + result.append("function() {"); ImmutableList<ICSSProperty> plist = rule.getProperties(); - result.append(plist.size()); + boolean firstProp = true; for (final ICSSProperty prop : plist) { - result.append(",\n"); - result.append("\"" + prop.getName() + "\""); - result.append(",\n"); + if (!firstProp) + result.append(";\n"); + firstProp = false; + result.append("this[\"" + prop.getName() + "\"] = "); ICSSPropertyValue value = prop.getValue(); if (value instanceof CSSArrayPropertyValue) { @@ -378,6 +380,7 @@ public class JSCSSCompilationSession extends CSSCompilationSession } } } + result.append("}"); return result.toString();
