flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [03/10] git commit: [flex-falcon] [refs/heads/develop] - more improvements to handling fx:Declarations and mxmlContent
Date Tue, 09 Dec 2014 05:17:00 GMT
more improvements to handling fx:Declarations and mxmlContent


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

Branch: refs/heads/develop
Commit: a9f15d79e4f0f91ef5d7c504cfe8fb0bd21a0584
Parents: b961977
Author: Alex Harui <aharui@apache.org>
Authored: Mon Dec 1 12:52:15 2014 -0800
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Dec 8 17:25:01 2014 -0800

----------------------------------------------------------------------
 .../codegen/mxml/flexjs/MXMLFlexJSEmitter.java  | 26 ++++++++++++++++++--
 1 file changed, 24 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/a9f15d79/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
----------------------------------------------------------------------
diff --git a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
index 5bfe515..40f145f 100644
--- a/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
+++ b/compiler.jx/src/org/apache/flex/compiler/internal/codegen/mxml/flexjs/MXMLFlexJSEmitter.java
@@ -1429,13 +1429,35 @@ public class MXMLFlexJSEmitter extends MXMLEmitter implements
         currentPropertySpecifier.parent = currentInstance;
 
         boolean oldInMXMLContent = inMXMLContent;
+        boolean reusingDescriptor = false;
         if (currentPropertySpecifier.name.equals("mxmlContent"))
+        {
             inMXMLContent = true;
+            ArrayList<MXMLDescriptorSpecifier> specList = 
+            	(currentInstance == null) ? descriptorTree : currentInstance.propertySpecifiers;
+            for (MXMLDescriptorSpecifier ds : specList)
+            {
+            	if (ds.name.equals("mxmlContent"))
+            	{
+            		currentPropertySpecifier = ds;
+            		reusingDescriptor = true;
+            		break;
+            	}
+            }
+        }
         
         if (currentInstance != null)
-            currentInstance.propertySpecifiers.add(currentPropertySpecifier);
+        {
+        	// we end up here for children of tags
+        	if (!reusingDescriptor)
+        		currentInstance.propertySpecifiers.add(currentPropertySpecifier);
+        }
         else if (inMXMLContent)
-            descriptorTree.add(currentPropertySpecifier);
+        {
+        	// we end up here for top tags?
+        	if (!reusingDescriptor)
+        		descriptorTree.add(currentPropertySpecifier);
+        }
         else
         {
             currentPropertySpecifier.parent = propertiesTree;


Mime
View raw message