flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject [2/2] git commit: [flex-asjs] [refs/heads/spark] - clean compile and cross-compile of UIComponent (needs FalconJX fix to be committed shortly). Next step is to get a test app to get through GCC cleanly
Date Mon, 28 Mar 2016 05:44:41 GMT
clean compile and cross-compile of UIComponent (needs FalconJX fix to be committed shortly).  Next step is to get a test app to get through GCC cleanly


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

Branch: refs/heads/spark
Commit: b173bdce00103ec07eef0131717ce2ece716787d
Parents: a23bd59
Author: Alex Harui <aharui@apache.org>
Authored: Sun Mar 27 22:44:33 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Sun Mar 27 22:44:33 2016 -0700

----------------------------------------------------------------------
 .../projects/Core/.actionScriptProperties       |  18 --
 frameworks/projects/Core/.flexLibProperties     |  22 +--
 .../projects/Core/src/main/flex/CoreClasses.as  |   2 +
 .../main/flex/org/apache/flex/utils/Display.as  |  71 ++++++++
 .../main/flex/org/apache/flex/utils/Platform.as | 145 ++++++++++++++++
 .../flex/core/graphics/GraphicsContainer.as     |  42 +++++
 .../org/apache/flex/core/graphics/RoundRect.as  | 130 ++++++++++++++
 frameworks/projects/MX/build.xml                |   7 +-
 .../MX/src/main/flex/flex/display/Graphics.as   |   5 +
 .../MX/src/main/flex/flex/display/ModuleInfo.as |   2 +-
 .../src/main/flex/flex/events/ProgressEvent.as  |   4 +-
 .../src/main/flex/flex/text/TextLineMetrics.as  |   4 +
 .../MX/src/main/flex/flex/ui/Keyboard.as        |  18 +-
 .../projects/MX/src/main/flex/flex/ui/Mouse.as  |   5 +-
 .../src/main/flex/mx/binding/BindabilityInfo.as |   5 +-
 .../MX/src/main/flex/mx/binding/Binding.as      |   8 +-
 .../flex/mx/binding/FunctionReturnWatcher.as    |   3 +
 .../MX/src/main/flex/mx/collections/IList.as    |   3 +
 .../mx/core/IDisplayObjectContainerInterface.as |   3 +
 .../MX/src/main/flex/mx/core/IUIComponent.as    |   4 +-
 .../MX/src/main/flex/mx/core/IUITextField.as    |   1 -
 .../MX/src/main/flex/mx/core/IVisualElement.as  |   4 +-
 .../src/main/flex/mx/core/RuntimeDPIProvider.as |  23 ++-
 .../MX/src/main/flex/mx/core/UIComponent.as     |  41 ++++-
 .../MX/src/main/flex/mx/core/UITextField.as     | 150 +++++++++++++++-
 .../src/main/flex/mx/effects/EffectManager.as   |   6 +-
 .../main/flex/mx/managers/CursorManagerImpl.as  |   5 +-
 .../src/main/flex/mx/managers/IFocusManager.as  |   9 +-
 .../src/main/flex/mx/managers/ISystemManager.as |   3 +
 .../main/flex/mx/managers/IToolTipManager.as    |  10 +-
 .../src/main/flex/mx/managers/SystemManager.as  | 123 ++++++++++++-
 .../MX/src/main/flex/mx/preloaders/Preloader.as |   7 +-
 .../main/flex/mx/resources/ResourceBundle.as    |  13 +-
 .../flex/mx/resources/ResourceManagerImpl.as    |  31 ++--
 .../src/main/flex/mx/states/SetEventHandler.as  |  11 +-
 .../main/flex/mx/styles/CSSStyleDeclaration.as  |   2 -
 .../src/main/flex/mx/styles/StyleManagerImpl.as |  22 ++-
 .../src/main/flex/mx/styles/StyleProtoChain.as  |  13 +-
 .../src/main/flex/mx/utils/DescribeTypeCache.as |   9 +-
 .../src/main/flex/mx/utils/MediaQueryParser.as  |  13 +-
 .../MX/src/main/flex/mx/utils/ObjectUtil.as     | 174 ++++++++++++-------
 .../MX/src/main/flex/mx/utils/Platform.as       |  39 +++--
 .../MX/src/main/flex/mx/utils/UIDUtil.as        |  90 ++++++++--
 .../MX/src/main/resources/compile-config.xml    |  16 +-
 44 files changed, 1065 insertions(+), 251 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Core/.actionScriptProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/.actionScriptProperties b/frameworks/projects/Core/.actionScriptProperties
index acb56c2..a9a8aac 100644
--- a/frameworks/projects/Core/.actionScriptProperties
+++ b/frameworks/projects/Core/.actionScriptProperties
@@ -1,22 +1,4 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements.  See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License.  You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
 <actionScriptProperties analytics="false" mainApplicationPath="Core.as" projectUUID="be5b3edf-e159-406d-a592-1f8d39993fea" version="11">
   <compiler additionalCompilerArguments="-locale en_US&#10;-define=COMPILE::AS3,true&#10;-define=COMPILE::JS,false&#10;-load-config=../resources/compile-config.xml" autoRSLOrdering="true" copyDependentFiles="false" fteInMXComponents="false" generateAccessible="false" htmlExpressInstall="true" htmlGenerate="false" htmlHistoryManagement="false" htmlPlayerVersionCheck="true" includeNetmonSwc="false" outputFolderPath="target" removeUnusedRSL="true" sourceFolderPath="src/main/flex" strict="true" targetPlayerVersion="0.0.0" useApolloConfig="false" useDebugRSLSwfs="true" useFlashSDK="false" verifyDigests="true" warn="true">
     <compilerSourcePath/>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Core/.flexLibProperties
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/.flexLibProperties b/frameworks/projects/Core/.flexLibProperties
index 20339ea..e5da8b0 100644
--- a/frameworks/projects/Core/.flexLibProperties
+++ b/frameworks/projects/Core/.flexLibProperties
@@ -1,24 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
-
-  Licensed to the Apache Software Foundation (ASF) under one or more
-  contributor license agreements.  See the NOTICE file distributed with
-  this work for additional information regarding copyright ownership.
-  The ASF licenses this file to You under the Apache License, Version 2.0
-  (the "License"); you may not use this file except in compliance with
-  the License.  You may obtain a copy of the License at
-
-      http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
--->
 <flexLibProperties includeAllClasses="true" useMultiPlatformConfig="false" version="3">
-  <includeClasses/>
+  <includeClasses>
+    <classEntry path="org.apache.flex.utils.Display"/>
+  </includeClasses>
   <includeResources/>
   <namespaceManifests/>
 </flexLibProperties>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Core/src/main/flex/CoreClasses.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/CoreClasses.as b/frameworks/projects/Core/src/main/flex/CoreClasses.as
index b806f68..3effed6 100644
--- a/frameworks/projects/Core/src/main/flex/CoreClasses.as
+++ b/frameworks/projects/Core/src/main/flex/CoreClasses.as
@@ -127,6 +127,8 @@ internal class CoreClasses
 }
 	import org.apache.flex.utils.Timer; Timer;
 	import org.apache.flex.utils.UIUtils; UIUtils;
+	import org.apache.flex.utils.Display; Display;
+	import org.apache.flex.utils.Platform; Platform;
 
 	import org.apache.flex.core.ClassFactory; ClassFactory;
     import org.apache.flex.states.AddItems; AddItems;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
new file mode 100644
index 0000000..9603c3d
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Display.as
@@ -0,0 +1,71 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.utils
+{
+	COMPILE::AS3
+	{
+		import flash.system.Capabilities;
+	}
+	
+	public class Display
+	{
+		public function Display()
+		{
+		}
+		
+		public static function get dpi():int
+		{
+			COMPILE::AS3
+			{
+				return Capabilities.screenDPI;	
+			}
+			COMPILE::JS
+			{
+				// TODO (aharui)
+				return 96;
+			}
+		}
+
+		public static function get width():int
+		{
+			COMPILE::AS3
+			{
+				return Capabilities.screenResolutionX;	
+			}
+			COMPILE::JS
+			{
+				return screen.width;
+			}
+		}
+
+		public static function get height():int
+		{
+			COMPILE::AS3
+			{
+				return Capabilities.screenResolutionY;	
+			}
+			COMPILE::JS
+			{
+				return screen.height;
+			}
+		}
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
new file mode 100644
index 0000000..dfce50e
--- /dev/null
+++ b/frameworks/projects/Core/src/main/flex/org/apache/flex/utils/Platform.as
@@ -0,0 +1,145 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package org.apache.flex.utils
+{
+	COMPILE::AS3
+	{
+		import flash.system.Capabilities;
+	}
+	
+	public class Platform
+	{
+		public function Platform()
+		{
+		}
+		
+		public static const ANDROID:String = "Android";
+		public static const BLACKBERRY:String = "Blackberry";
+		public static const IOS:String = "IOS";
+		public static const MAC:String = "Mac";
+		public static const LINUX:String = "Linux";
+		public static const WINDOWS:String = "windows";
+
+		
+		private static var _isMobile:Boolean;
+		public static function get isMobile():Boolean
+		{
+			return _isMobile;
+		}
+	
+		private static var _isIPad:Boolean;
+		public static function get isIPad():Boolean
+		{
+			return _isIPad;
+		}
+		
+		COMPILE::AS3
+		private static var _isAir:Boolean;
+		
+		public static function get isAir():Boolean
+		{
+			COMPILE::AS3
+			{
+				return _isAir;					
+			}
+			COMPILE::JS
+			{
+				return false;
+			}
+		}
+		
+		private static var _isBrowser:Boolean;
+		public static function get isBrowser():Boolean
+		{
+			return _isBrowser;
+		}
+		
+		public static function get isFlash():Boolean
+		{
+			COMPILE::AS3
+			{
+				return true;
+			}
+			COMPILE::JS
+			{
+				return false;
+			}
+		}
+		
+		private static var _platform:String;
+		
+		public static function get platform():String
+		{
+			COMPILE::AS3
+			{
+				if (!platform)
+				{
+					var cap: Class = Capabilities;
+					var version:  String = Capabilities.version;
+					var os: String = Capabilities.os;
+					var playerType: String = Capabilities.playerType;
+					
+					if (version.indexOf("AND") > -1)
+						_platform = ANDROID;
+					else if (version.indexOf('IOS') > -1)
+						_platform = IOS;
+					else if (version.indexOf('QNX') > -1)
+						_platform = BLACKBERRY;
+					else if (os.indexOf("Mac OS") != -1)
+						_platform = MAC;
+					else if (os.indexOf("Windows") != -1)
+						_platform = WINDOWS;
+					else if (os.indexOf("Linux") != -1) // note that Android is also Linux
+						_platform = LINUX;
+
+					
+					_isIPad = os.indexOf('iPad') > -1;
+					
+					_isMobile = (_platform == ANDROID || _platform == IOS || _platform == BLACKBERRY);
+						
+						
+					_isAir = playerType == "Desktop";
+					_isBrowser = (playerType == "PlugIn" || playerType == "ActiveX");
+					
+				}
+			}
+			COMPILE::JS
+			{
+				if (navigator.userAgent.indexOf("iOS") != -1)
+					_platform = IOS;
+				else if (navigator.userAgent.indexOf("Android") != -1)
+					_platform = ANDROID;
+				else if (navigator.appVersion.indexOf("Win")!=-1)
+					_platform = WINDOWS;
+				else if (navigator.appVersion.indexOf("Mac")!=-1)
+					_platform = MAC;
+				else if (navigator.appVersion.indexOf("Linux")!=-1)
+					_platform = LINUX;
+				
+				_isIPad = navigator.userAgent.indexOf('iPad') > -1;
+				
+				_isMobile = (_platform == ANDROID || _platform == IOS || _platform == BLACKBERRY);					
+			}
+			return _platform;
+		}
+
+	}
+	
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
index 4927eb9..1fe7283 100644
--- a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/GraphicsContainer.as
@@ -102,6 +102,48 @@ package org.apache.flex.core.graphics
             }
 		}
 
+		/**
+		 *  Draw the rectangle.
+		 *  @param x The x position of the top-left corner of the rectangle.
+		 *  @param y The y position of the top-left corner.
+		 *  @param width The width of the rectangle.
+		 *  @param height The height of the rectangle.
+		 *  @param rx The width of the ellipse that draws the rounded corners.
+		 *  @param ry The height of the ellipse that draws the rounded corners.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0.3
+		 *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 */
+		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
+		{
+			COMPILE::AS3
+			{
+				applyStroke();
+				beginFill(new Rectangle(x, y, width, height), new Point(x,y) );
+				graphics.drawRoundRect(x, y, width, height, rx, ry);
+				endFill();
+			}
+			COMPILE::JS
+			{
+				var style:String = getStyleStr();
+				var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
+				rect.flexjs_wrapper = this;
+				rect.style.left = x;
+				rect.style.top = y;
+				rect.setAttribute('style', style);
+				rect.setAttribute('x', String(x) + 'px');
+				rect.setAttribute('y', String(y) + 'px');
+				rect.setAttribute('width', String(width) + 'px');
+				rect.setAttribute('height', String(height) + 'px');
+				rect.setAttribute('rx', String(rx) + 'px');
+				rect.setAttribute('ry', String(ry) + 'px');
+				element.appendChild(rect);
+			}
+		}
+		
         COMPILE::AS3
 		public function createRect(x:Number, y:Number, width:Number, height:Number):void
 		{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
new file mode 100644
index 0000000..730da0d
--- /dev/null
+++ b/frameworks/projects/Graphics/src/main/flex/org/apache/flex/core/graphics/RoundRect.as
@@ -0,0 +1,130 @@
+/**
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.flex.core.graphics
+{
+    COMPILE::AS3
+    {
+        import flash.display.CapsStyle;
+        import flash.display.JointStyle;
+        import flash.geom.Point;
+        import flash.geom.Rectangle;            
+    }
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+
+	public class RoundRect extends GraphicShape
+	{
+		
+		/**
+		 *  Draw the rectangle.
+		 *  @param x The x position of the top-left corner of the rectangle.
+		 *  @param y The y position of the top-left corner.
+		 *  @param width The width of the rectangle.
+		 *  @param height The height of the rectangle.
+		 *  @param rx The width of the ellipse that draws the rounded corners.
+		 *  @param ry The height of the ellipse that draws the rounded corners.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10.2
+		 *  @playerversion AIR 2.6
+		 *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+		 */
+		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
+		{
+            COMPILE::AS3
+            {
+                graphics.clear();
+                applyStroke();
+                beginFill(new Rectangle(x, y, width, height), new Point(x,y));
+                graphics.drawRoundRect(x, y, width, height, rx, ry);
+                endFill();                    
+            }
+            COMPILE::JS
+            {
+                var style:String = this.getStyleStr();
+                var rect:WrappedHTMLElement = document.createElementNS('http://www.w3.org/2000/svg', 'rect') as WrappedHTMLElement;
+                rect.flexjs_wrapper = this;
+                rect.setAttribute('style', style);
+                if (stroke)
+                {
+                    rect.setAttribute('x', String(stroke.weight / 2) + 'px');
+                    rect.setAttribute('y', String(stroke.weight / 2) + 'px');
+                    setPosition(x, y, stroke.weight, stroke.weight);
+                }
+                else
+                {
+                    rect.setAttribute('x', '0' + 'px');
+                    rect.setAttribute('y', '0' + 'px');
+                    setPosition(x, y, 0, 0);
+                }
+                rect.setAttribute('width', String(width) + 'px');
+                rect.setAttribute('height', String(height) + 'px');
+				rect.setAttribute('rx', String(rx) + 'px');
+				rect.setAttribute('ry', String(ry) + 'px');
+                element.appendChild(rect);
+                
+                resize(x, y, rect['getBBox']());
+            }
+		}
+		
+		override protected function draw():void
+		{
+			drawRoundRect(0,0,width,height, rx, ry);
+		}
+		
+		private var _rx:Number;
+		private var _ry:Number;
+		
+		public function get rx():Number
+		{
+			return _rx;
+		}
+		
+		/**
+		 *  The width of the ellipse used to draw the rounded corners.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set rx(value:Number):void
+		{
+			_rx = value;
+		}
+		
+		public function get ry():Number
+		{
+			return _ry;
+		}
+		/**
+		 *  The height of the ellipse used to draw the rounded corners.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion FlexJS 0.0
+		 */
+		public function set ry(value:Number):void
+		{
+			_ry = value;
+		}
+		
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/build.xml
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/build.xml b/frameworks/projects/MX/build.xml
index 16e92f3..04521f7 100644
--- a/frameworks/projects/MX/build.xml
+++ b/frameworks/projects/MX/build.xml
@@ -37,7 +37,9 @@
     </target>
     
     <target name="test" unless="is.jenkins">
-        <ant dir="src/test/flex"/>
+        <!-- no tests yet
+         <ant dir="src/test/flex"/>
+         -->
     </target>
     
     <target name="test-js" unless="is.jenkins">
@@ -94,6 +96,7 @@
             <arg value="-define=COMPILE::AS3,true" />
             <arg value="-define=COMPILE::JS,false" />
             <arg value="-define=COMPILE::LATER,false" />
+            <arg value="-define=CONFIG::performanceInstrumentation,false" />
         </compc>
         <copy file="${basedir}/target/${target.name}" tofile="${FLEXJS_HOME}/frameworks/libs/${target.name.no.version}" />
     </target>
@@ -120,6 +123,7 @@
             <arg value="-define=COMPILE::AS3,false" />
             <arg value="-define=COMPILE::JS,true" />
             <arg value="-define=COMPILE::LATER,false" />
+            <arg value="-define=CONFIG::performanceInstrumentation,false" />
         </java>
     </target>
 
@@ -158,6 +162,7 @@
             <arg value="-define=COMPILE::AS3,false" />
             <arg value="-define=COMPILE::JS,true" />
             <arg value="-define=COMPILE::LATER,false" />
+            <arg value="-define=CONFIG::performanceInstrumentation,false" />
         </compc>
         <copy file="${basedir}/target/externs/${target.name}" tofile="${FLEXJS_HOME}/frameworks/externs/${target.name.no.version}" />
     </target>

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as b/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
index 1a83c3c..55ab4bb 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/Graphics.as
@@ -43,6 +43,11 @@ package flex.display
 			host.drawRect(x, y, width, height);	
 		}
 		
+		public function drawRoundRect(x:Number, y:Number, width:Number, height:Number, rx:Number, ry:Number):void
+		{
+			host.drawRoundRect(x, y, width, height, rx, ry);	
+		}
+		
 		public function clear():void
 		{
 			host.removeAllElements();

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as b/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
index 4992aa1..5faeebb 100644
--- a/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
+++ b/frameworks/projects/MX/src/main/flex/flex/display/ModuleInfo.as
@@ -69,7 +69,7 @@ package flex.display
 		COMPILE::JS
 		public function get url():String
 		{
-			return document.url;
+			return document.URL;
 		}
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as b/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
index 8a4c804..012b376 100644
--- a/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
+++ b/frameworks/projects/MX/src/main/flex/flex/events/ProgressEvent.as
@@ -10,8 +10,8 @@ package flex.events
 			this.bytesTotal = bytesTotal;
 		}
 		
-		public var bytesLoaded;
-		public var bytesTotal;
+		public var bytesLoaded:int;
+		public var bytesTotal:int;
 		public static const PROGRESS:String = "progress";
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as b/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
index d501d40..165f87e 100644
--- a/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
+++ b/frameworks/projects/MX/src/main/flex/flex/text/TextLineMetrics.as
@@ -13,6 +13,10 @@ public class TextLineMetrics extends flash.text.TextLineMetrics
 		super(x, width, height, ascent, descent, leading);
 	}
 	
+	public static function convert(tlm:flash.text.TextLineMetrics):flex.text.TextLineMetrics
+	{
+		return new flex.text.TextLineMetrics(tlm.x, tlm.width, tlm.height, tlm.ascent, tlm.descent, tlm.leading);
+	}
 }
 
 COMPILE::JS

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as b/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
index 8909af4..6573157 100644
--- a/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
+++ b/frameworks/projects/MX/src/main/flex/flex/ui/Keyboard.as
@@ -25,15 +25,15 @@ package flex.ui
 		{
 		}
 				
-		public static const LEFT = 0x25;
-		public static const UP = 0x26;
-		public static const RIGHT = 0x27;
-		public static const DOWN = 0x28;
-		public static const PAGE_UP = 0x21;
-		public static const PAGE_DOWN = 0x22;
-		public static const HOME = 0x24;
-		public static const END = 0x23;
-		public static const ENTER = 0x0D;
+		public static const LEFT:int = 0x25;
+		public static const UP:int = 0x26;
+		public static const RIGHT:int = 0x27;
+		public static const DOWN:int = 0x28;
+		public static const PAGE_UP:int = 0x21;
+		public static const PAGE_DOWN:int = 0x22;
+		public static const HOME:int = 0x24;
+		public static const END:int = 0x23;
+		public static const ENTER:int = 0x0D;
 		
 	}
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as b/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
index 68e39f6..bbda041 100644
--- a/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
+++ b/frameworks/projects/MX/src/main/flex/flex/ui/Mouse.as
@@ -28,11 +28,14 @@ package flex.ui
 		COMPILE::JS
 		private static var styleElement:HTMLStyleElement;
 		
+		/**
+		 * @flexjsignorecoercion HTMLStyleElement
+		 */
 		COMPILE::JS
 		public static function hide():void
 		{
 			if (!styleElement)
-				styleElement = document.createElement("STYLE");
+				styleElement = document.createElement("STYLE") as HTMLStyleElement;
 			var css:CSSStyleSheet = styleElement.sheet as CSSStyleSheet;
 			css.insertRule("* { cursor: none; }", 0);
 		}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/binding/BindabilityInfo.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/binding/BindabilityInfo.as b/frameworks/projects/MX/src/main/flex/mx/binding/BindabilityInfo.as
index dec8f6a..94c862a 100644
--- a/frameworks/projects/MX/src/main/flex/mx/binding/BindabilityInfo.as
+++ b/frameworks/projects/MX/src/main/flex/mx/binding/BindabilityInfo.as
@@ -174,7 +174,8 @@ public class BindabilityInfo
 
 			// Get child-specific events.
 			var childDesc:Array = [];
-			for each (var p:MethodDefinition in typeDescription.accessors)
+			var p:MethodDefinition;
+			for each (p in typeDescription.accessors)
 			{
 				if (p.name == childName)
 				{
@@ -184,7 +185,7 @@ public class BindabilityInfo
 			}
 			if (childName == null)
 			{
-				for each (var p:MethodDefinition in typeDescription.methods)
+				for each (p in typeDescription.methods)
 				{
 					if (p.name == childName)
 					{

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as b/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
index 2cdca49..40a12e8 100644
--- a/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
+++ b/frameworks/projects/MX/src/main/flex/mx/binding/Binding.as
@@ -22,7 +22,10 @@ package mx.binding
 
 import mx.collections.errors.ItemPendingError;
 import mx.core.mx_internal;
+COMPILE::LATER
+{
 import flash.utils.Dictionary;
+}
 
 use namespace mx_internal;
 
@@ -473,6 +476,7 @@ public class Binding
 				}
 				COMPILE::JS
 				{
+					/*
 					if ((error.name != 1006) &&
 						(error.name != 1009) &&
 						(error.name != 1010) &&
@@ -482,12 +486,12 @@ public class Binding
 						throw error;
 					}
 					else
-					{
+					{*/
 						if (BindingManager.debugDestinationStrings[destString])
 						{
 							trace("Binding: destString = " + destString + ", error = " + error);
 						}
-					}
+					/*}*/
 				}
 			}
         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/binding/FunctionReturnWatcher.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/binding/FunctionReturnWatcher.as b/frameworks/projects/MX/src/main/flex/mx/binding/FunctionReturnWatcher.as
index 7c42552..2d44259 100644
--- a/frameworks/projects/MX/src/main/flex/mx/binding/FunctionReturnWatcher.as
+++ b/frameworks/projects/MX/src/main/flex/mx/binding/FunctionReturnWatcher.as
@@ -22,7 +22,10 @@ package mx.binding
 
 import org.apache.flex.events.Event;
 import flex.events.IEventDispatcher;
+COMPILE::LATER
+{
 import mx.core.EventPriority;
+}
 import mx.core.mx_internal;
 
 use namespace mx_internal;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/collections/IList.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/collections/IList.as b/frameworks/projects/MX/src/main/flex/mx/collections/IList.as
index 366990d..ab62a2e 100644
--- a/frameworks/projects/MX/src/main/flex/mx/collections/IList.as
+++ b/frameworks/projects/MX/src/main/flex/mx/collections/IList.as
@@ -21,7 +21,10 @@ package mx.collections
 {
     
 import org.apache.flex.events.IEventDispatcher;
+COMPILE::LATER
+{
 import mx.events.CollectionEvent;
+}
 
 /**
  *  Dispatched when the IList has been updated in some way.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as b/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
index 894bd46..4fd04f3 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IDisplayObjectContainerInterface.as
@@ -26,8 +26,11 @@ COMPILE::AS3
 {
 	import flash.display.DisplayObjectContainer;		
 }
+COMPILE::LATER
+{
 import flash.text.TextSnapshot;
 import flash.geom.Point;
+}
 
     /**
      *  @copy flash.display.DisplayObjectContainer#addChild()

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as b/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
index 3ff57b3..e234b3d 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUIComponent.as
@@ -24,14 +24,14 @@ COMPILE::AS3
 {
 	import flash.display.DisplayObject;
 	import flash.display.DisplayObjectContainer;
-	import flash.display.Sprite;
+//	import flash.display.Sprite;
 }
 COMPILE::JS
 {
 	import flex.display.DisplayObject;
 	import flex.display.DisplayObjectContainer;
-	import flex.display.Sprite;
 }
+import flex.display.Sprite;
 import mx.managers.ISystemManager;
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as b/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
index 07a332e..e1a2735 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IUITextField.as
@@ -31,7 +31,6 @@ COMPILE::AS3
 COMPILE::JS
 {
 	import flex.display.DisplayObject;
-	import flex.text.StyleSheet;
 	import flex.text.TextFormat;
 	import flex.text.TextLineMetrics;		
 	import org.apache.flex.geom.Rectangle;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as b/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
index 4691a12..065f15f 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/IVisualElement.as
@@ -26,8 +26,10 @@ COMPILE::JS
 {
 	import flex.display.DisplayObjectContainer;		
 }
-
+COMPILE::LATER
+{
 import mx.geom.TransformOffsets;
+}
 
 /**
  *  The IVisualElement interface defines the minimum properties and methods 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as b/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
index 7d82fb8..3b5555c 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/RuntimeDPIProvider.as
@@ -19,12 +19,20 @@
 
 package mx.core
 {
-import flash.display.DisplayObject;
+COMPILE::LATER
+{
 import flash.display.Stage;
-import flash.system.Capabilities;
+}
+
+COMPILE::AS3
+{
+	import flash.system.Capabilities;
+	import flash.display.DisplayObject;
+	import mx.managers.SystemManager;
+}
+import org.apache.flex.utils.Display;
 
 import mx.core.mx_internal;
-import mx.managers.SystemManager;
 import mx.utils.Platform;
 
 use namespace mx_internal;
@@ -121,9 +129,11 @@ public class RuntimeDPIProvider
 	{
 		if (Platform.isIOS) // as isIPad returns false in the simulator
 		{
-			var scX:Number = Capabilities.screenResolutionX;
-			var scY:Number = Capabilities.screenResolutionY;
+			var scX:Number = Display.width;
+			var scY:Number = Display.height;
 					
+			COMPILE::AS3
+			{
 			// Use the stage width/height only when debugging, because Capabilities reports the computer resolution
 			if (Capabilities.isDebugger)
 			{
@@ -134,6 +144,7 @@ public class RuntimeDPIProvider
 					scY = root.stage.fullScreenHeight;
 				}
 			}
+			}
 					
 			/*  as of Dec 2013,  iPad (resp. iPad retina) are the only iOS devices to have 1024 (resp. 2048) screen width or height
 			cf http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density#Apple
@@ -144,7 +155,7 @@ public class RuntimeDPIProvider
 				return DPIClassification.DPI_320;
 		}
 				
-		return classifyDPI(Capabilities.screenDPI);
+		return classifyDPI(Display.dpi);
 	}
     
     /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as b/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
index 9b2a960..5bb3559 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UIComponent.as
@@ -1773,8 +1773,13 @@ public class UIComponent extends Sprite
         // Register as a weak listener for "change" events from ResourceManager.
         // If UIComponents registered as a strong listener,
         // they wouldn't get garbage collected.
-        resourceManager.addEventListener(
-            org.apache.flex.events.Event.CHANGE, resourceManager_changeHandler, false, 0, true);
+		COMPILE::LATER
+		{
+			resourceManager.addEventListener(
+				org.apache.flex.events.Event.CHANGE, resourceManager_changeHandler, false, 0, true);				
+		}
+		resourceManager.addEventListener(
+			org.apache.flex.events.Event.CHANGE, resourceManager_changeHandler);
 
         _width = super.width;
         _height = super.height;
@@ -9629,7 +9634,14 @@ public class UIComponent extends Sprite
      */
     public function measureText(text:String):TextLineMetrics
     {
-        return determineTextFormatFromStyles().measureText(text);
+		COMPILE::AS3
+		{
+			return TextLineMetrics.convert(determineTextFormatFromStyles().measureText(text));				
+		}
+		COMPILE::JS
+		{
+			return determineTextFormatFromStyles().measureText(text);				
+		}
     }
 
     /**
@@ -9650,7 +9662,14 @@ public class UIComponent extends Sprite
      */
     public function measureHTMLText(htmlText:String):TextLineMetrics
     {
-        return determineTextFormatFromStyles().measureHTMLText(htmlText);
+		COMPILE::AS3
+		{
+			return TextLineMetrics.convert(determineTextFormatFromStyles().measureHTMLText(htmlText));				
+		}
+		COMPILE::JS
+		{
+			return determineTextFormatFromStyles().measureHTMLText(htmlText);				
+		}
     }
 
     //--------------------------------------------------------------------------
@@ -10246,7 +10265,7 @@ public class UIComponent extends Sprite
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public function drawRoundRect(x:Number, y:Number, w:Number, h:Number,
+    public function drawRoundRectWithGradientAndHole(x:Number, y:Number, w:Number, h:Number,
                                   r:Object = null, c:Object = null,
                                   alpha:Object = null, rot:Object = null,
                                   gradient:String = null, ratios:Array = null,
@@ -12594,9 +12613,15 @@ public class UIComponent extends Sprite
         _endingEffectInstances.push(effectInst);
         invalidateProperties();
 
-        // weak reference
-        UIComponentGlobals.layoutManager.addEventListener(
-            FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);
+		COMPILE::LATER
+		{
+			// weak reference
+			UIComponentGlobals.layoutManager.addEventListener(
+				FlexEvent.UPDATE_COMPLETE, updateCompleteHandler, false, 0, true);				
+		}
+		// weak reference
+		UIComponentGlobals.layoutManager.addEventListener(
+			FlexEvent.UPDATE_COMPLETE, updateCompleteHandler);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as b/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
index 6f4242b..07c0fa9 100644
--- a/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
+++ b/frameworks/projects/MX/src/main/flex/mx/core/UITextField.as
@@ -24,23 +24,27 @@ COMPILE::AS3
 {
 	import flash.display.DisplayObject;
 	import flash.display.DisplayObjectContainer;		
-	import flash.display.Sprite;
 	import flash.geom.Matrix;
 	import flash.text.TextFieldType;
 	import flash.text.TextFormat;
 	import flash.text.TextFormatAlign;
-	import flash.text.TextLineMetrics;
+	import flex.display.TopOfDisplayList;
+	import org.apache.flex.core.IFlexJSElement;
+	import org.apache.flex.events.IEventDispatcher;
+	import org.apache.flex.core.IBeadView;
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IBeadModel
 }
 COMPILE::JS
 {
 	import flex.display.DisplayObject;
-	import flex.display.DisplayObjectContainer;		
-	import flex.display.Sprite;
+	import flex.display.DisplayObjectContainer;
 	import flex.text.TextFieldType;
 	import flex.text.TextFormat;
 	import flex.text.TextFormatAlign;
-	import flex.text.TextLineMetrics;
 }
+import flex.text.TextLineMetrics;
+import flex.display.Sprite;
 
 import mx.automation.IAutomationObject;
 import mx.core.LayoutDirection;
@@ -60,6 +64,7 @@ import mx.utils.StringUtil;
 
 import flex.events.Event;
 import flex.text.TextField;
+import org.apache.flex.events.IEventDispatcher;
 
 use namespace mx_internal;
 
@@ -333,9 +338,15 @@ public class UITextField extends TextField
         
         // Register as a weak listener for "change" events from ResourceManager.
         // If UITextFields registered as a strong listener,
-        // they wouldn't get garbage collected.
-        resourceManager.addEventListener(
-            Event.CHANGE, resourceManager_changeHandler, false, 0, true);
+        // they wouldn't get garbage collected
+		COMPILE::LATER
+		{
+			resourceManager.addEventListener(
+				Event.CHANGE, resourceManager_changeHandler, false, 0, true);
+		}
+		resourceManager.addEventListener(
+			Event.CHANGE, resourceManager_changeHandler);
+
     }
 
     //--------------------------------------------------------------------------
@@ -761,7 +772,14 @@ public class UITextField extends TextField
         if (isEmpty)
             super.text = "Wj";
         
-        tlm = getLineMetrics(0);
+		COMPILE::AS3
+		{
+			tlm = TextLineMetrics.convert(getLineMetrics(0));				
+		}
+		COMPILE::JS
+		{
+			tlm = getLineMetrics(0);				
+		}
 
         if (isEmpty)
             super.text = "";
@@ -2733,6 +2751,120 @@ public class UITextField extends TextField
         return null;
     }
 
+	COMPILE::AS3
+	private var _beads:Vector.<IBead>;
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#addBead()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */ 
+	COMPILE::AS3
+	public function addBead(bead:IBead):void
+	{
+		if (!_beads)
+			_beads = new Vector.<IBead>;
+		bead.strand = this;		
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#getBeadByType()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function getBeadByType(classOrInterface:Class):IBead
+	{
+		for each (var bead:IBead in _beads)
+		{
+			if (bead is classOrInterface)
+				return bead;
+		}
+		return null;
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#removeBead()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function removeBead(value:IBead):IBead	
+	{
+		var n:int = _beads.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			var bead:IBead = _beads[i];
+			if (bead == value)
+			{
+				_beads.splice(i, 1);
+				return bead;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IUIBase#element
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function get element():IFlexJSElement
+	{
+		return null;
+	}
+	
+	/**
+	 *  The method called when added to a parent.  This is a good
+	 *  time to set up beads.
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 *  @flexjsignorecoercion Class
+	 *  @flexjsignorecoercion Number
+	 */
+	COMPILE::AS3
+	public function addedToParent():void
+	{
+		// do nothing for now
+	}
+	
+	COMPILE::AS3
+	public function get topMostEventDispatcher():IEventDispatcher
+	{
+		return root as IEventDispatcher;
+	}
+
+	COMPILE::AS3
+	private var _topOfDisplayList:TopOfDisplayList;
+	
+	/**
+	 *  @flexjsignorecoercion flex.display.TopOfDisplayList
+	 */
+	COMPILE::AS3
+	public function get topOfDisplayList():TopOfDisplayList
+	{
+		if (!_topOfDisplayList)
+			_topOfDisplayList = new TopOfDisplayList(stage);
+		return _topOfDisplayList;
+	}
+	
+
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as b/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
index f54f656..0cf1b66 100644
--- a/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/effects/EffectManager.as
@@ -34,19 +34,19 @@ import org.apache.flex.core.UIBase;
 import org.apache.flex.events.Event;
 import org.apache.flex.events.EventDispatcher;
 import mx.events.FocusEvent;
-import flex.system.DefinitionManager;
 COMPILE::LATER
 {
+	import flex.system.DefinitionManager;
 	import flash.utils.Dictionary;		
+	import mx.core.EventPriority;
+	import mx.core.UIComponentCachePolicy;
 }
 
-import mx.core.EventPriority;
 import mx.core.FlexGlobals;
 import mx.core.IDeferredInstantiationUIComponent;
 import mx.core.IFlexDisplayObject;
 import mx.core.IUIComponent;
 import mx.core.UIComponent;
-import mx.core.UIComponentCachePolicy;
 import mx.core.mx_internal;
 import mx.events.EffectEvent;
 import mx.events.FlexEvent;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as b/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
index 788b56e..340f0c0 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/CursorManagerImpl.as
@@ -56,10 +56,7 @@ import mx.core.FlexGlobals;
 import org.apache.flex.utils.PointUtils;
 import mx.core.mx_internal;
 import mx.core.ISystemCursorClient;
-COMPILE::JS
-	{
-		import mx.core.UIComponent;		
-	}
+import mx.core.UIComponent;		
 import mx.events.Request;
 import mx.styles.CSSStyleDeclaration;
 import mx.styles.StyleManager;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManager.as
index a50a7b0..7cb3b23 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IFocusManager.as
@@ -23,14 +23,7 @@ package mx.managers
 import org.apache.flex.core.IUIBase;
 import org.apache.flex.events.IEventDispatcher;
 //import flash.display.InteractiveObject;
-COMPILE::AS3
-{
-	import flash.display.Sprite;		
-}
-COMPILE::JS
-{
-	import flex.display.Sprite;		
-}
+import flex.display.Sprite;		
 import mx.core.IButton;
 
 /**

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
index 43b5322..072c0cc 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/ISystemManager.as
@@ -35,7 +35,10 @@ import flex.display.TopOfDisplayList;
 
 import flex.events.IEventDispatcher;
 import org.apache.flex.geom.Rectangle;
+COMPILE::LATER
+{
 import flash.text.TextFormat;
+}
 
 import mx.core.IChildList;
 import mx.core.IFlexModuleFactory;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
index 8f433d4..6498b61 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/IToolTipManager.as
@@ -31,7 +31,7 @@ COMPILE::JS
 
 import mx.core.IToolTip;
 import mx.core.IUIComponent;
-import mx.effects.Effect;
+import mx.effects.IEffect;
 
 [ExcludeClass]
 
@@ -111,12 +111,12 @@ public interface IToolTipManager
 	/**
 	 *  @private
 	 */
-	function get hideEffect():Effect;
+	function get hideEffect():IEffect;
 
 	/**
 	 *  @private
 	 */
-	function set hideEffect(value:Effect):void;
+	function set hideEffect(value:IEffect):void;
 	
     //----------------------------------
     //  scrubDelay
@@ -153,12 +153,12 @@ public interface IToolTipManager
 	/**
 	 *  @private
 	 */
-	function get showEffect():Effect;
+	function get showEffect():IEffect;
 	
 	/**
 	 *  @private
 	 */
-	function set showEffect(value:Effect):void;
+	function set showEffect(value:IEffect):void;
 
     //----------------------------------
     //  showEffect

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
index 6f31e27..4a81a62 100644
--- a/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
+++ b/frameworks/projects/MX/src/main/flex/mx/managers/SystemManager.as
@@ -54,10 +54,10 @@ COMPILE::JS
 	import flex.display.MovieClip;
 	import flex.display.Sprite;
 	import flex.events.Event;
-	import org.apache.flex.events.MouseEvent;
 	import flex.events.EventPhase;
 	import flex.ui.Keyboard;
 	
+	import org.apache.flex.events.MouseEvent;
 	import org.apache.flex.geom.Point;
 }
 import org.apache.flex.utils.Timer;
@@ -70,26 +70,48 @@ import mx.core.IFlexModuleFactory;
 import mx.core.IInvalidating;
 import mx.core.IRawChildrenContainer;
 import mx.core.IUIComponent;
+COMPILE::LATER
+{
 import mx.core.RSLData;
 import mx.core.RSLItem;
+}
 import mx.core.Singleton;
 import mx.core.mx_internal;
 import mx.events.DynamicEvent;
 import mx.events.FlexEvent;
+COMPILE::LATER
+{	
 import mx.events.RSLEvent;
 import mx.events.Request;
 import mx.events.SandboxMouseEvent;
+}
 import mx.preloaders.Preloader;
 import mx.utils.DensityUtil;
+COMPILE::LATER
+{
 import mx.utils.LoaderUtil;
-
+}
 import flex.display.ModuleInfo;
+COMPILE::AS3
+{
 import flex.display.TopOfDisplayList;
+}
+COMPILE::LATER
+{
 
 import org.apache.flex.core.UIBase;
+}
 import org.apache.flex.events.EventDispatcher;
 import org.apache.flex.events.IEventDispatcher;
 import org.apache.flex.geom.Rectangle;
+import org.apache.flex.core.IFlexJSElement;
+
+COMPILE::AS3
+{
+import org.apache.flex.core.IBeadView;
+import org.apache.flex.core.IBead;
+import org.apache.flex.core.IBeadModel
+};
 
 // NOTE: Minimize the non-Flash classes you import here.
 // Any dependencies of SystemManager have to load in frame 1,
@@ -3948,7 +3970,104 @@ public class SystemManager extends MovieClip
 		SystemManagerGlobals.lastMouseEvent = event;
 	}
 	
+	COMPILE::AS3
+	private var _beads:Vector.<IBead>;
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#addBead()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */ 
+	COMPILE::AS3
+	public function addBead(bead:IBead):void
+	{
+		if (!_beads)
+			_beads = new Vector.<IBead>;
+		bead.strand = this;		
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#getBeadByType()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function getBeadByType(classOrInterface:Class):IBead
+	{
+		for each (var bead:IBead in _beads)
+		{
+			if (bead is classOrInterface)
+				return bead;
+		}
+		return null;
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IStrand#removeBead()
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function removeBead(value:IBead):IBead	
+	{
+		var n:int = _beads.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			var bead:IBead = _beads[i];
+			if (bead == value)
+			{
+				_beads.splice(i, 1);
+				return bead;
+			}
+		}
+		return null;
+	}
+	
+	/**
+	 *  @copy org.apache.flex.core.IUIBase#element
+	 *  
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 */
+	COMPILE::AS3
+	public function get element():IFlexJSElement
+	{
+		return null;
+	}
+	
+	/**
+	 *  The method called when added to a parent.  This is a good
+	 *  time to set up beads.
+	 * 
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10.2
+	 *  @playerversion AIR 2.6
+	 *  @productversion FlexJS 0.0
+	 *  @flexjsignorecoercion Class
+	 *  @flexjsignorecoercion Number
+	 */
+	COMPILE::AS3
+	public function addedToParent():void
+	{
+		// do nothing for now
+	}
 
+	COMPILE::AS3
+	public function get topMostEventDispatcher():IEventDispatcher
+	{
+		return this;
+	}
 }
 
 }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as b/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
index 45a2fe7..a5dc22c 100644
--- a/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
+++ b/frameworks/projects/MX/src/main/flex/mx/preloaders/Preloader.as
@@ -50,14 +50,17 @@ COMPILE::JS
 
 import flex.system.DefinitionManager;
 
+COMPILE::LATER
+{
 import mx.core.RSLItem;
 import mx.core.RSLListLoader;
 import mx.core.ResourceModuleRSLItem;
-import mx.core.mx_internal;
-import mx.events.FlexEvent;
 import mx.events.RSLEvent;
 import mx.managers.SystemManagerGlobals;
 import mx.resources.IResourceManager;
+}
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
 
 use namespace mx_internal;
 

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
index 29d3c41..c9573de 100644
--- a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
+++ b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceBundle.as
@@ -20,11 +20,16 @@
 package mx.resources
 {
 
-import flash.system.ApplicationDomain;
+COMPILE::AS3
+{
+	import flash.system.ApplicationDomain;		
+}
 
 import mx.core.mx_internal;
-import mx.utils.StringUtil;
-
+COMPILE::LATER
+{
+	import mx.utils.StringUtil;
+}
 use namespace mx_internal;
 
 /**
@@ -69,6 +74,7 @@ public class ResourceBundle implements IResourceBundle
      *  Set by bootstrap loaders
      *  to allow for alternate search paths for resources
      */
+	COMPILE::AS3
     mx_internal static var backupApplicationDomain:ApplicationDomain;
 
     //--------------------------------------------------------------------------
@@ -80,6 +86,7 @@ public class ResourceBundle implements IResourceBundle
     /**
      *  @private
      */
+	COMPILE::AS3
     private static function getClassByName(name:String,
                                            domain:ApplicationDomain):Class
     {

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
index c36f918..ff6f91a 100644
--- a/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/resources/ResourceManagerImpl.as
@@ -38,17 +38,16 @@ COMPILE::LATER
 	import flash.system.Capabilities;
 	import flash.system.SecurityDomain;
 	import flash.utils.Dictionary;		
+	import mx.core.IFlexModuleFactory;
+	import mx.core.Singleton;
+	import mx.events.ModuleEvent;
+	import mx.events.ResourceEvent;
+	import mx.modules.IModuleInfo;
+	import mx.modules.ModuleManager;
 }
-import org.apache.flex.utils.Timer;
-import mx.core.IFlexModuleFactory;
 import mx.core.mx_internal;
-import mx.core.Singleton;
 import mx.events.FlexEvent;
-import mx.events.ModuleEvent;
-import mx.events.ResourceEvent;
 import mx.managers.SystemManagerGlobals;
-import mx.modules.IModuleInfo;
-import mx.modules.ModuleManager;
 import mx.utils.StringUtil;
 import org.apache.flex.core.UIBase;
 
@@ -473,7 +472,14 @@ public class ResourceManagerImpl extends EventDispatcher implements IResourceMan
 			compiledLocales[0] :
 			"en_US";
 
-		var applicationDomain:DefinitionManager = new DefinitionManager(info["currentDomain"]);
+		COMPILE::AS3
+		{
+			var applicationDomain:DefinitionManager = new DefinitionManager(info["currentDomain"]);				
+		}
+		COMPILE::JS
+		{
+			var applicationDomain:DefinitionManager = new DefinitionManager();				
+		}
 
 		var compiledResourceBundleNames:Array /* of String */ =
 			info["compiledResourceBundleNames"];
@@ -1147,14 +1153,19 @@ public class ResourceManagerImpl extends EventDispatcher implements IResourceMan
 	        var applicationDomain:DefinitionManager =
 	            new DefinitionManager(ApplicationDomain.currentDomain);
 		}
+		COMPILE::JS
+		{
+			var applicationDomain:DefinitionManager =
+				new DefinitionManager();			
+		}
 		
         if (!applicationDomain.hasDefinition("_CompiledResourceBundleInfo"))
             return;
         var c:Class = Class(applicationDomain.getDefinition(
                                 "_CompiledResourceBundleInfo"));
 
-        var locales:Array /* of String */ = c.compiledLocales;
-        var bundleNames:Array /* of String */ = c.compiledResourceBundleNames;
+        var locales:Array /* of String */ = c["compiledLocales"];
+        var bundleNames:Array /* of String */ = c["compiledResourceBundleNames"];
 
         installCompiledResourceBundles(
             applicationDomain, locales, bundleNames);

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as b/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
index 5bf26fa..531b6e1 100644
--- a/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
+++ b/frameworks/projects/MX/src/main/flex/mx/states/SetEventHandler.as
@@ -130,6 +130,7 @@ public class SetEventHandler extends OverrideBase
      *  @private
      *  Dictionary of installed event handlers.
      */
+	COMPILE::LATER
     private static var installedHandlers:Dictionary;
     
     //--------------------------------------------------------------------------
@@ -273,6 +274,8 @@ public class SetEventHandler extends OverrideBase
             appliedTarget = obj;
             var uiObj:UIComponent = obj as UIComponent;
     
+			COMPILE::LATER
+			{
             if (!installedHandlers)
                 installedHandlers = new Dictionary(true);
                 
@@ -297,6 +300,7 @@ public class SetEventHandler extends OverrideBase
                     obj.removeEventListener(name, oldHandlerFunction);
                 }
             }
+			}
     
             // Set new handler as weak reference
             if (handlerFunction != null)
@@ -307,6 +311,8 @@ public class SetEventHandler extends OverrideBase
                 // be removed if needed by a state based on this state. We 
                 // only do so for legacy MXML documents that support hierarchical
                 // states. 
+				COMPILE::LATER
+				{
                 if (!(parent.document is IStateClient2))
                 {   
                     if (installedHandlers[obj] == undefined)
@@ -314,6 +320,7 @@ public class SetEventHandler extends OverrideBase
                     
                     installedHandlers[obj][name] = handlerFunction;
                 }
+				}
                 
                 // Disable bindings for the base event handler if appropriate. If the binding
                 // fires while our override is applied, the correct value will automatically
@@ -355,6 +362,8 @@ public class SetEventHandler extends OverrideBase
 	        if (oldHandlerFunction != null)
 	            obj.addEventListener(name, oldHandlerFunction, false, 0, true);
 	        
+			COMPILE::LATER
+			{
 	        if (installedHandlers[obj])
 	        {
 	            var deleteObj:Boolean = true;
@@ -374,7 +383,7 @@ public class SetEventHandler extends OverrideBase
 	            if (deleteObj)
 	                delete installedHandlers[obj];
 	        }
-            
+			}
             // Re-enable bindings for the base event handler if appropriate. If the binding
             // fired while our override was applied, the current value will automatically
             // be applied once enabled.

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as b/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
index 9095628..ada63a8 100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/CSSStyleDeclaration.as
@@ -1124,8 +1124,6 @@ public class CSSStyleDeclaration extends EventDispatcher
 }
 
 }
-import flash.utils.Dictionary;
-
 COMPILE::AS3
 {
     import flash.utils.Dictionary;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/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 652d853..304f18b 100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleManagerImpl.as
@@ -44,17 +44,20 @@ import mx.core.FlexVersion;
 import mx.core.IFlexModuleFactory;
 import mx.core.mx_internal;
 import mx.events.FlexChangeEvent;
-import mx.events.ModuleEvent;
+COMPILE::LATER
+{
+	import mx.events.ModuleEvent;
+	import mx.events.StyleEvent;
+	import mx.modules.IModuleInfo;
+	import mx.modules.ModuleManager;
+	import mx.styles.IStyleModule;		
+}
 import mx.events.Request;
-import mx.events.StyleEvent;
 import mx.managers.ISystemManager;
 import mx.managers.SystemManagerGlobals;
-import mx.modules.IModuleInfo;
-import mx.modules.ModuleManager;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
 import mx.styles.IStyleManager2;
-import mx.styles.IStyleModule;
 import mx.utils.MediaQueryParser;
 
 use namespace mx_internal;
@@ -298,7 +301,11 @@ public class StyleManagerImpl extends EventDispatcher implements IStyleManager2
 					getImplementation("mx.styles::IStyleManager2"));
 				if (_parent is IEventDispatcher)
 				{
-					IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler, false, 0, true);
+					COMPILE::LATER
+					{
+						IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler, false, 0, true);							
+					}
+					IEventDispatcher(_parent).addEventListener(FlexChangeEvent.STYLE_MANAGER_CHANGE, styleManagerChangeHandler);
 				}
 			}
 			
@@ -1873,10 +1880,13 @@ public class StyleManagerImpl extends EventDispatcher implements IStyleManager2
 }
 
 import org.apache.flex.events.EventDispatcher;
+COMPILE::LATER
+{
 import mx.events.ModuleEvent;
 import mx.events.StyleEvent;
 import mx.modules.IModuleInfo;
 import mx.styles.IStyleModule;
+}
 
 ////////////////////////////////////////////////////////////////////////////////
 //

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as b/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
index 803a27b..ed7db75 100644
--- a/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
+++ b/frameworks/projects/MX/src/main/flex/mx/styles/StyleProtoChain.as
@@ -37,17 +37,20 @@ import org.apache.flex.reflection.getQualifiedSuperclassName;
 import mx.core.FlexGlobals;
 import mx.core.IFlexDisplayObject;
 import mx.core.IFlexModule;
-import mx.core.IFlexModuleFactory;
+COMPILE::LATER
+{
+	import mx.core.IFlexModuleFactory;
+	import mx.effects.EffectManager;
+	import mx.managers.SystemManager;
+	import mx.modules.IModule;
+	import mx.modules.ModuleManager;		
+}
 import mx.core.IFontContextComponent;
 import mx.core.IInvalidating;
 import mx.core.IUITextField;
 import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.mx_internal;
-import mx.effects.EffectManager;
-import mx.managers.SystemManager;
-import mx.modules.IModule;
-import mx.modules.ModuleManager;
 import mx.utils.NameUtil;
 import mx.utils.OrderedObject;
 import mx.utils.object_proxy;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCache.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCache.as b/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCache.as
index f11f69d..11a7bc4 100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCache.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/DescribeTypeCache.as
@@ -20,9 +20,10 @@
 package mx.utils
 {
 
-import flash.utils.describeType;
-import flash.utils.getDefinitionByName;
-import flash.utils.getQualifiedClassName;
+import org.apache.flex.reflection.describeType;
+import org.apache.flex.reflection.TypeDefinition;
+import org.apache.flex.reflection.getDefinitionByName;
+import org.apache.flex.reflection.getQualifiedClassName;
 import mx.binding.BindabilityInfo;
 
 [ExcludeClass]
@@ -122,7 +123,7 @@ public class DescribeTypeCache
                     // definition, it's just a string value.
                 }
             }
-            var typeDescription:XML = flash.utils.describeType(o);
+            var typeDescription:TypeDefinition = org.apache.flex.reflection.describeType(o);
             var record:DescribeTypeCacheRecord = new DescribeTypeCacheRecord();
             record.typeDescription = typeDescription;
             record.typeName = className;

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/utils/MediaQueryParser.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/utils/MediaQueryParser.as b/frameworks/projects/MX/src/main/flex/mx/utils/MediaQueryParser.as
index 6bc5801..98cb048 100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/MediaQueryParser.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/MediaQueryParser.as
@@ -22,7 +22,8 @@ package mx.utils
 import org.apache.flex.events.Event;
 import org.apache.flex.events.EventDispatcher;
 import org.apache.flex.core.UIBase;
-import flash.system.Capabilities;
+import org.apache.flex.utils.Display;
+import org.apache.flex.utils.Platform;
 import mx.core.IFlexModuleFactory;
 import mx.core.mx_internal;
 import mx.managers.ISystemManager;
@@ -130,7 +131,7 @@ public class MediaQueryParser  extends EventDispatcher
         osPlatform = getPlatform();
         osVersion = getOSVersion();
         // compute device  DPI
-        deviceDPI = Capabilities.screenDPI;
+        deviceDPI = Display.dpi;
         // compute width, height and diagonal
         computeDeviceDimensions( );
 
@@ -512,7 +513,7 @@ public class MediaQueryParser  extends EventDispatcher
     
     private function getPlatform():String
     {
-        var s:String = Capabilities.version.substr(0, 3);
+        var s:String = org.apache.flex.utils.Platform.platform;
         // if there is a friendly name, then use it
         if (platformMap.hasOwnProperty(s))
             return platformMap[s] as String;
@@ -528,7 +529,7 @@ public class MediaQueryParser  extends EventDispatcher
      * returns a CSSOSVersion suitable for MediaQueryParser for the current device operating system version.
      * */
     private function getOSVersion():CSSOSVersion {
-		return  new CSSOSVersion(Platform.osVersion) ;
+		return  new CSSOSVersion(mx.utils.Platform.osVersion) ;
     }
 
     /** @private recompute device dimension
@@ -539,8 +540,8 @@ public class MediaQueryParser  extends EventDispatcher
     private function computeDeviceDimensions(): Boolean
     {
         if (sm) {
-            var w: Number = sm.topOfDisplayList.stageWidth;
-            var h: Number = sm.topOfDisplayList.stageHeight;
+            var w: Number = sm.topOfDisplayList.width;
+            var h: Number = sm.topOfDisplayList.height;
             var diag: Number = Math.sqrt(w * w + h * h);
 
            // we need to update styles if device-width is used and has changed or device-height is used and has changed

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as b/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
index a7d9bc7..d210ab0 100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/ObjectUtil.as
@@ -28,6 +28,11 @@ COMPILE::AS3
 }
 import mx.collections.IList;
 
+import org.apache.flex.reflection.DefinitionWithMetaData;
+import org.apache.flex.reflection.MetaDataArgDefinition;
+import org.apache.flex.reflection.MetaDataDefinition;
+import org.apache.flex.reflection.MethodDefinition;
+import org.apache.flex.reflection.TypeDefinition;
 import org.apache.flex.reflection.getQualifiedClassName;
 
 /**
@@ -1010,31 +1015,47 @@ public class ObjectUtil
 
         var className:String;
         var classAlias:String;
+		COMPILE::LATER
+		{
         var properties:XMLList;
         var prop:XML;
+		}
+		var propertyList:Array;
         var isDynamic:Boolean = false;
         var metadataInfo:Object;
 
         if (typeof(obj) == "xml")
         {
+			COMPILE::LATER
+			{
             className = "XML";
             properties = obj.text();
             if (properties.length())
                 propertyNames.push("*");
             properties = obj.attributes();
+			}
         }
         else
         {
-            var classInfo:XML = DescribeTypeCache.describeType(obj).typeDescription;
-            className = classInfo.@name.toString();
+            var classInfo:TypeDefinition = DescribeTypeCache.describeType(obj).typeDescription;
+            className = classInfo.name;
+			COMPILE::LATER
+			{
             classAlias = classInfo.@alias.toString();
-            isDynamic = classInfo.@isDynamic.toString() == "true";
+			}
+            isDynamic = classInfo.dynamic;
 
+			propertyList.concat(classInfo.accessors);
+			propertyList.concat(classInfo.variables);
+			
+			COMPILE::LATER
+			{
             if (options.includeReadOnly)
                 properties = classInfo..accessor.(@access != "writeonly") + classInfo..variable;
             else
                 properties = classInfo..accessor.(@access == "readwrite") + classInfo..variable;
-
+			}
+			
             var numericIndex:Boolean = false;
         }
 
@@ -1052,7 +1073,7 @@ public class ObjectUtil
         result["alias"] = classAlias;
         result["properties"] = propertyNames;
         result["dynamic"] = isDynamic;
-        result["metadata"] = metadataInfo = recordMetadata(properties);
+        result["metadata"] = metadataInfo = recordMetadata(propertyList);
         
         var excludeObject:Object = {};
         if (excludes)
@@ -1065,8 +1086,15 @@ public class ObjectUtil
         }
 
         var isArray:Boolean = (obj is Array);
+		COMPILE::AS3
+		{
         var isDict:Boolean  = (obj is Dictionary);
-        
+		}
+		COMPILE::JS
+		{
+			var isDict:Boolean = false;
+		}
+
         if (isDict)
         {
             // dictionaries can have multiple keys of the same type,
@@ -1077,7 +1105,7 @@ public class ObjectUtil
                 propertyNames.push(key);
             }
         }
-        else if (isDynamic)
+		else if (isDynamic)
         {
             for (var p:String in obj)
             {
@@ -1100,12 +1128,23 @@ public class ObjectUtil
             numericIndex = isArray && !isNaN(Number(p));
         }
 
-        if (isArray || isDict || className == "Object")
+		COMPILE::AS3
+		{
+			var allDone:Boolean = isArray || isDict || className == "Object";
+		}
+		COMPILE::JS
+		{
+			var allDone:Boolean = isArray || className == "Object";
+		}
+		
+        if (allDone)
         {
             // Do nothing since we've already got the dynamic members
         }
         else if (className == "XML")
         {
+			COMPILE::LATER
+			{
             n = properties.length();
             for (i = 0; i < n; i++)
             {
@@ -1113,80 +1152,81 @@ public class ObjectUtil
                 if (excludeObject[p] != 1)
                     propertyNames.push(new QName("", "@" + p));
             }
+			}
         }
         else
         {
-            n = properties.length();
+            n = propertyList.length;
             var uris:Array = options.uris;
             var uri:String;
-			COMPILE::AS3
-			{
-				var qName:QName;					
-			}
+			var qName:QName;					
             for (i = 0; i < n; i++)
             {
-                prop = properties[i];
-                p = prop.@name.toString();
+				var member:DefinitionWithMetaData = propertyList[i] as DefinitionWithMetaData;
+                p = member.name;
+				COMPILE::LATER
+				{
                 uri = prop.@uri.toString();
-                
+				}
+				uri = "";
+				
                 if (excludeObject[p] == 1)
                     continue;
                     
                 if (!options.includeTransient && internalHasMetadata(metadataInfo, p, "Transient"))
                     continue;
                 
-				COMPILE::AS3
+				if (uris != null)
 				{
-					if (uris != null)
+					COMPILE::LATER
 					{
-						if (uris.length == 1 && uris[0] == "*")
-						{   
-							qName = new QName(uri, p);
-							try
-							{
-								obj[qName]; // access the property to ensure it is supported
-								propertyNames.push();
-							}
-							catch(e:Error)
-							{
-								// don't keep property name 
-							}
+					if (uris.length == 1 && uris[0] == "*")
+					{   
+						qName = new QName(uri, p);
+						try
+						{
+							obj[qName]; // access the property to ensure it is supported
+							propertyNames.push();
+						}
+						catch(e:Error)
+						{
+							// don't keep property name 
 						}
-						else
+					}
+					else
+					{
+						for (var j:int = 0; j < uris.length; j++)
 						{
-							for (var j:int = 0; j < uris.length; j++)
+							uri = uris[j];
+							if (prop.@uri.toString() == uri)
 							{
-								uri = uris[j];
-								if (prop.@uri.toString() == uri)
+								qName = new QName(uri, p);
+								try
+								{
+									obj[qName];
+									propertyNames.push(qName);
+								}
+								catch(e:Error)
 								{
-									qName = new QName(uri, p);
-									try
-									{
-										obj[qName];
-										propertyNames.push(qName);
-									}
-									catch(e:Error)
-									{
-										// don't keep property name 
-									}
+									// don't keep property name 
 								}
 							}
 						}
 					}
-					else if (uri.length == 0)
+					}
+				}
+				else if (uri.length == 0)
+				{
+					qName = new QName(uri, p);
+					try
 					{
-						qName = new QName(uri, p);
-						try
-						{
-							obj[qName];
-							propertyNames.push(qName);
-						}
-						catch(e:Error)
-						{
-							// don't keep property name 
-						}
+						obj[qName];
+						propertyNames.push(qName);
+					}
+					catch(e:Error)
+					{
+						// don't keep property name 
 					}
-
 				}
             }
         }
@@ -1369,18 +1409,18 @@ public class ObjectUtil
     /**
      *  @private
      */
-    private static function recordMetadata(properties:XMLList):Object
+    private static function recordMetadata(properties:Array):Object
     {
         var result:Object = null;
 
         try
         {
-            for each (var prop:XML in properties)
+            for each (var prop:DefinitionWithMetaData in properties)
             {
-                var propName:String = prop.attribute("name").toString();
-                var metadataList:XMLList = prop.metadata;
+                var propName:String = prop.name;
+                var metadataList:Array = prop.metadata;
 
-                if (metadataList.length() > 0)
+                if (metadataList.length > 0)
                 {
                     if (result == null)
                         result = {};
@@ -1388,19 +1428,19 @@ public class ObjectUtil
                     var metadata:Object = {};
                     result[propName] = metadata;
 
-                    for each (var md:XML in metadataList)
+                    for each (var md:MetaDataDefinition in metadataList)
                     {
-                        var mdName:String = md.attribute("name").toString();
+                        var mdName:String = md.name;
                         
-                        var argsList:XMLList = md.arg;
+                        var argsList:Array = md.args;
                         var value:Object = {};
 
-                        for each (var arg:XML in argsList)
+                        for each (var arg:MetaDataArgDefinition in argsList)
                         {
-                            var argKey:String = arg.attribute("key").toString();
+                            var argKey:String = arg.name;
                             if (argKey != null)
                             {
-                                var argValue:String = arg.attribute("value").toString();
+                                var argValue:String = arg.value;
                                 value[argKey] = argValue;
                             }
                         }

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/b173bdce/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as b/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
index b9de66c..e954380 100644
--- a/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
+++ b/frameworks/projects/MX/src/main/flex/mx/utils/Platform.as
@@ -20,7 +20,11 @@
 package mx.utils
 {
 
-import flash.system.Capabilities;
+COMPILE::AS3
+{
+	import flash.system.Capabilities;	
+}
+import org.apache.flex.utils.Platform;
 import org.apache.flex.reflection.getDefinitionByName;
 
 /**
@@ -36,8 +40,6 @@ public class Platform
 {
     include "../core/Version.as";
 
-    private static var _instance: Platform;
-	
 	protected static var _initialized:Boolean;
 	protected static var _isAndroid:Boolean;
 	protected static var _isIOS:Boolean;
@@ -265,24 +267,21 @@ public class Platform
 	protected static function getPlatforms():void {
 		if (!_initialized)
 		{
-            var cap: Class = Capabilities;
-            var version:  String = Capabilities.version;
-            var os: String = Capabilities.os;
-            var playerType: String = Capabilities.playerType;
+			var p:String = org.apache.flex.utils.Platform.platform;
 
-			_isAndroid = version.indexOf("AND") > -1;
-			_isIOS = version.indexOf('IOS') > -1;
-			_isBlackBerry = version.indexOf('QNX') > -1;
+			_isAndroid = p == org.apache.flex.utils.Platform.ANDROID;
+			_isIOS = p == org.apache.flex.utils.Platform.IOS;
+			_isBlackBerry = p == org.apache.flex.utils.Platform.BLACKBERRY;
 			_isMobile = _isAndroid || _isIOS || _isBlackBerry;
 			
-			_isMac = os.indexOf("Mac OS") != -1;
-			_isWindows = os.indexOf("Windows") != -1;
-			_isLinux = os.indexOf("Linux") != -1; // note that Android is also Linux
-			_isIPad = os.indexOf('iPad') > -1;
+			_isMac = p == org.apache.flex.utils.Platform.MAC;
+			_isWindows = p == org.apache.flex.utils.Platform.WINDOWS;
+			_isLinux = p == org.apache.flex.utils.Platform.LINUX; // note that Android is also Linux
+			_isIPad = org.apache.flex.utils.Platform.isIPad;
 			_isDesktop = !_isMobile;
 			
-			_isAir = playerType == "Desktop";
-			_isBrowser = (playerType == "PlugIn" || playerType == "ActiveX");
+			_isAir = org.apache.flex.utils.Platform.isAir;
+			_isBrowser = org.apache.flex.utils.Platform.isBrowser;
 			
 			_initialized = true;
 		}
@@ -304,6 +303,8 @@ public class Platform
      * */
     private static function computeOSVersionString(): String
     {
+		COMPILE::AS3
+		{
         var os: String = Capabilities.os;
         var osVersionMatch: Array;
         var version: String = "";
@@ -331,6 +332,12 @@ public class Platform
                 version = osVersionMatch[1];
         }
         return version;
+		}
+		COMPILE::JS
+		{
+			// TODO (aharui): Do something better someday?
+			return "0";
+		}
     }
 
 }


Mime
View raw message