Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261214 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as
+++ frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2004-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1261771 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2006-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 20846
Author:   smgilson@adobe.com
Date:     2011-03-14T15:46:32.470057Z

Log Message:
-----------
Merge 20813 - ASDoc edits

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1287979 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
+++ frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as
@@ -28,7 +28,8 @@
     include "../core/Version.as";

     /**
-     *  The source to use if the Application.runtimeDPI is DPIClassification.DPI_160.
+     *  The source to use if the Application.runtimeDPI
+     *  is DPIClassification.DPI_160.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
@@ -38,7 +39,8 @@
     public var source160dpi:Object;

     /**
-     *  The source to use if the Application.runtimeDPI is DPIClassification.DPI_240.
+     *  The source to use if the Application.runtimeDPI
+     *  is DPIClassification.DPI_240.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
@@ -48,7 +50,8 @@
     public var source240dpi:Object;

     /**
-     *  The source to use if the Application.runtimeDPI is DPIClassification.DPI_320.
+     *  The source to use if the Application.runtimeDPI
+     *  is DPIClassification.DPI_320.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.2
@@ -59,10 +62,15 @@

     /**
      *  Select one of the sourceXXXdpi properties based on the given DPI.  This
-     *  function will handle the fallback to different sourceXXXdpi properties
-     *  if the given one is null.  The strategy is to try to choose the next highest
+     *  function handles the fallback to different sourceXXXdpi properties
+     *  if the given one is null.
+     *  The strategy is to try to choose the next highest
      *  property if it is not null, then return a lower property if not null, then
      *  just return null.
+     *
+     *  @param The desired DPI.
+     *
+     *  @return One of the sourceXXXdpi properties based on the desired DPI.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10.2


Fixed missing closing comment

Fixed missing closing comment

--- asunit-4.0/src/asunit/framework/AsUnitCore.as
+++ asunit-4.0/src/asunit/framework/AsUnitCore.as
@@ -54,8 +54,7 @@
      *      }
      *  }
      * </listing>
-     *
-     *
+     */
 	public class AsUnitCore {

         protected var visualContext:DisplayObjectContainer;


Extract method Cloner.isVariableCloneable().

--- dolly-framework/src/main/actionscript/dolly/Cloner.as
+++ dolly-framework/src/main/actionscript/dolly/Cloner.as
@@ -10,6 +10,10 @@

 public class Cloner {

+	private static function isVariableCloneable(variable:Variable, skipMetadataChecking:Boolean = true):Boolean {
+		return !variable.isStatic && (skipMetadataChecking || variable.hasMetadata(MetadataName.CLONEABLE));
+	}
+
 	dolly_internal static function getCloneableFields(source:*):Array {
 		const result:Array = [];

@@ -21,7 +25,7 @@

 		if (isClassCloneable) {
 			for each(variable in type.variables) {
-				if (!variable.isStatic) {
+				if (isVariableCloneable(variable)) {
 					result.push(variable);
 				}
 			}
@@ -35,7 +39,7 @@
 			for each(var metadataContainer:IMetadataContainer in metadataContainers) {
 				if (metadataContainer is Variable) {
 					variable = metadataContainer as Variable;
-					if (!variable.isStatic && variable.hasMetadata(MetadataName.CLONEABLE)) {
+					if (isVariableCloneable(variable, false)) {
 						result.push(variable);
 					}
 				} else if (metadataContainer is Accessor) {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10475
Author:   jimurphy@adobe.com
Date:     2009-09-21T23:58:45.057679Z

Log Message:
-----------
Merged 3.x revisions 10063,10086,10098,10123,10176,10397,10416-10418,10420 -> trunk

checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260832 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/CurrencyFormatter.as
@@ -644,7 +644,24 @@
         // -- value --

         if (value is String)
-            value = dataFormatter.parseNumberString(String(value));
+        {
+            var temp_value:String = dataFormatter.parseNumberString(String(value));
+
+            // If we got 0 back, but string was longer than one character, NumberBase
+            // Chopped our value.  So we need to do some formatting to get our value back
+            // to the way it was.
+            if (temp_value == "0")
+            {
+                var valueArr:Array = value.split(decimalSeparatorFrom);
+                value = valueArr[0];
+                if (valueArr[1] != undefined)
+                    value += "." + valueArr[1];
+                else
+                    value = temp_value;
+            }
+            else
+                value = temp_value;
+        }

         if (value === null || isNaN(Number(value)))
         {
@@ -682,7 +699,7 @@
             else
                 numStr = front;
         }
-        else if (Math.abs(numValue) > 0)
+        else if (Math.abs(numValue) >= 0)
         {
         	// if the value is in scientefic notation then the search for '.'
         	// doesnot give the correct result. Adding one to the value forces
@@ -694,8 +711,12 @@
 	        	var temp:Number = Math.abs(numValue) + 1;
 	        	numStr = temp.toString();
         	}
-            numStr = decimalSeparatorTo +
-					 numStr.substring(numStr.indexOf(".") + 1);
+
+        	// Handle leading zero if we got one give one if not don't
+        	var position:Number = numStr.indexOf(".");
+        	var leading:String = position > 0 ? "0" : "";
+            numStr = leading + decimalSeparatorTo +
+					 numStr.substring(position + 1);
         }

         numStr = dataFormatter.formatPrecision(numStr, int(precision));


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1262726 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as
+++ frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as
@@ -1,4 +1,26 @@
-
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+/**
+ *  Background color of the component when it is disabled.
+ *  The global default value is undefined.
+ *  The default value for List controls is 0xDDDDDD (light gray).
+ *  If a container is disabled, the background is dimmed, and the degree of
+ *  dimming is controlled by the disabledOverlayAlpha style.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="backgroundDisabledColor", type="uint", format="Color", inherit="yes", theme="halo")]

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 19337
Author:   mhorn@adobe.com
Date:     2010-12-13T22:01:27.841985Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1265202 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as
@@ -37,7 +37,7 @@

 */
 /**
- *  Actionscript based skin for mobile applications. The skin supports
+ *  ActionScript-based skin for Button controls in mobile applications. The skin supports
  *  iconClass and labelPlacement. It uses FXG classes to
  *  implement the vector drawing.
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 11212
Author:   jon.avila@ssbbartgroup.com
Date:     2009-10-28T02:17:44.681764Z

Log Message:
-----------
QE notes: Accessibility implementation class for TextBase
Doc notes:
Bugs: new feature for spark
Reviewer:
Tests run: EventWatcher, Inspect32.exe
Is noteworthy for integration: requires updated to TextBase.as in order for accessibility implementation to be initialized.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1278101 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/TextBaseAccImpl.as
@@ -0,0 +1,238 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.accessibility
+{
+
+import flash.accessibility.Accessibility;
+import flash.events.Event;
+import mx.accessibility.AccImpl;
+import mx.core.UIComponent;
+import mx.core.mx_internal;
+
+import spark.components.supportClasses.TextBase;
+
+use namespace mx_internal;
+
+
+/**
+ *  TextBaseAccImpl is a subclass of AccessibilityImplementation
+ *  which implements accessibility for the TextBase class.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class TextBaseAccImpl extends AccImpl
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    private static const EVENT_OBJECT_NAMECHANGE:uint = 0x800C;
+
+    /**
+     *  @private
+     */
+    private static const EVENT_OBJECT_STATECHANGE:uint = 0x800A;
+
+    /**
+     *  @private
+     */
+		private static const STATE_SYSTEM_READONLY:uint = 0x00000040;
+
+    /**
+     *  @private
+     */
+	  private static const STATE_SYSTEM_UNAVAILABLE:uint = 0x00000001;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Enables accessibility in the TextBase class.
+     *
+     *
This method is called by application startup code
+     *  that is autogenerated by the MXML compiler.
+     *  Afterwards, when instances of TextBase are initialized,
+     *  their accessibilityImplementation property
+     *  will be set to an instance of this class.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public static function enableAccessibility():void
+    {
+        TextBase.createAccessibilityImplementation =
+            createAccessibilityImplementation;
+    }
+
+    /**
+     *  @private
+     *  Creates a TextBase's AccessibilityImplementation object.
+     *  This method is called from UIComponent's
+     *  initializeAccessibility() method.
+     */
+    mx_internal static function createAccessibilityImplementation(
+                                component:UIComponent):void
+    {
+        component.accessibilityImplementation =
+            new TextBaseAccImpl(component);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param master The UIComponent instance that this AccImpl instance
+     *  is making accessible.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function TextBaseAccImpl(master:UIComponent)
+    {
+        super(master);
+
+        role = 0x29; // ROLE_SYSTEM_STATICTEXT
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  eventsToHandle
+    //----------------------------------
+
+    /**
+     *  @private
+     *    Array of events that we should listen for from the master component.
+     */
+    override protected function get eventsToHandle():Array
+    {
+        return super.eventsToHandle.concat(["show","hide","updateComplete"]);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccessibilityImplementation
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  IAccessible method for returning the state of the TextBase.
+     *  States are predefined for all the components in MSAA.
+     *  Values are assigned to each state.
+     *  Depending upon the TextBase being enabled,
+     *  a state is returned.
+     *
+     *  @param childID uint
+     *
+     *  @return State uint
+     */
+    override public function get_accState(childID:uint):uint
+    {
+        var accState:uint = getState(childID);
+
+				accState = STATE_SYSTEM_READONLY;
+
+        if (TextBase(master).enabled == false)
+            accState |= STATE_SYSTEM_UNAVAILABLE;
+
+        return accState;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  method for returning the name of the TextBase
+     *  which is spoken out by the screen reader
+     *  The TextBase should return the text inside as the name of the TextBase.
+     *  The name in AccessibilityProperties is combined with the name
+     *  specified here.
+     *
+     *  @param childID uint
+     *
+     *  @return Name String
+     */
+    override protected function getName(childID:uint):String
+    {
+        var label:String = TextBase(master).text;
+
+        return label != null && label != "" ? label : "";
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden event handlers: AccImpl
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Override the generic event handler.
+     *  All AccImpl must implement this
+     *  to listen for events from its master component.
+     */
+    override protected function eventHandler(event:Event):void
+    {
+        // Let AccImpl class handle the events
+        // that all accessible UIComponents understand.
+        $eventHandler(event);
+
+        switch (event.type)
+        {
+            case "show": case "hide":
+            {
+                Accessibility.sendEvent(master, 0, EVENT_OBJECT_STATECHANGE);
+                Accessibility.updateProperties();
+                break;
+            }
+            case "updateComplete":
+            {
+								Accessibility.sendEvent(master, 0, EVENT_OBJECT_NAMECHANGE);
+								Accessibility.updateProperties();
+								break;
+            }
+        }
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1263043 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/utils/UIDUtil.as
+++ frameworks/projects/framework/src/mx/utils/UIDUtil.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.utils
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 20742
Author:   smgilson@adobe.com
Date:     2011-03-09T21:46:11.224420Z

Log Message:
-----------
Merge 20732 - asdoc updates

QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MovieClipSWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/SwitchSymbolFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/State.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/effects/effectClasses/UnconstrainItemActionInstance.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/MXFTETextInput.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1267976 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/ColorPicker.as
+++ frameworks/projects/mx/src/mx/controls/ColorPicker.as
@@ -1139,7 +1139,8 @@
     /**
      *  Hides the drop-down SwatchPanel object.
      *
-     *  @helpid 4926
+     *  @param trigger The event to dispatch when the
+     *  drop-down list closes.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1269315 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/core/LayoutContainer.as
+++ frameworks/projects/mx/src/mx/core/LayoutContainer.as
@@ -0,0 +1,436 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2006-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+import flash.display.DisplayObject;
+import flash.events.ErrorEvent;
+import flash.events.Event;
+import flash.external.ExternalInterface;
+import flash.net.URLRequest;
+import flash.net.navigateToURL;
+import flash.system.Capabilities;
+import flash.utils.describeType;
+import flash.utils.setInterval;
+import mx.containers.BoxDirection;
+import mx.containers.utilityClasses.BoxLayout;
+import mx.containers.utilityClasses.CanvasLayout;
+import mx.containers.utilityClasses.ConstraintColumn;
+import mx.containers.utilityClasses.ConstraintRow;
+import mx.containers.utilityClasses.IConstraintLayout;
+import mx.containers.utilityClasses.Layout;
+import mx.effects.EffectManager;
+import mx.events.FlexEvent;
+import mx.managers.ISystemManager;
+import mx.managers.LayoutManager;
+import mx.managers.SystemManager;
+import mx.styles.CSSStyleDeclaration;
+import mx.styles.IStyleClient;
+import mx.styles.StyleManager;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+include "../styles/metadata/AlignStyles.as";
+include "../styles/metadata/GapStyles.as";
+
+/**
+ *  Number of pixels between the bottom border
+ *  and its content area.
+ *
+ *  @default 0
+ */
+[Style(name="paddingBottom", type="Number", format="Length", inherit="no")]
+
+/**
+ *  Number of pixels between the top border
+ *  and its content area.
+ *
+ *  @default 0
+ */
+[Style(name="paddingTop", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Excluded APIs
+//--------------------------------------
+
+[Exclude(name="direction", kind="property")]
+[Exclude(name="icon", kind="property")]
+[Exclude(name="label", kind="property")]
+[Exclude(name="tabIndex", kind="property")]
+[Exclude(name="toolTip", kind="property")]
+[Exclude(name="x", kind="property")]
+[Exclude(name="y", kind="property")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+/**
+ *  Flex defines a default, or Application, container that lets you start
+ *  adding content to your module or Application without explicitly defining
+ *  another container.
+ *  Flex creates this container from the <mx:Application>
+ *  tag, the first tag in an MXML application file, or from the
+ *  <mx:Module> tag, the first tag in an MXML module file.
+ *  While you might find it convenient to use the Application or Module container
+ *  as the only  container in your application, in most cases you explicitly
+ *  define at least one more container before you add any controls
+ *  to your application or module.
+ *
+ *  @mxml
+ *
+ *
The <mx:Application> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <mx:Application
+ *    Properties
+ *    layout="vertical|horizontal|absolute"
+ *    xmlns:No default="No default"
+ *
+ *    Styles
+ *    horizontalAlign="center|left|right"
+ *    horizontalGap="8"
+ *    paddingBottom="0"
+ *    paddingTop="0"
+ *    verticalAlign="top|bottom|middle"
+ *    verticalGap="6"
+ *
+ *  />
+ *

+ *
+ *  @see flash.events.EventDispatcher
+ */
+public class LayoutContainer extends Container implements IConstraintLayout
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    mx_internal static var useProgressiveLayout:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+    public function LayoutContainer()
+    {
+        super();
+
+        layoutObject.target = this;
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  The mx.containers.utilityClasses.Layout subclass that is doing the layout
+     */
+    protected var layoutObject:Layout = new BoxLayout();
+
+    /**
+     *  The mx.containers.utilityClasses.Layout subclass that is doing the layout
+     */
+    protected var canvasLayoutClass:Class = CanvasLayout;
+
+    /**
+     *  The mx.containers.utilityClasses.Layout subclass that is doing the layout
+     */
+    protected var boxLayoutClass:Class = BoxLayout;
+
+    /**
+     *  @private
+     */
+    private var resizeHandlerAdded:Boolean = false;
+
+    /**
+     *  @private
+     *  Placeholder for Preloader object reference.
+     */
+    private var preloadObj:Object;
+
+    /**
+     *  @private
+     *  Used in progressive layout.
+     */
+    private var creationQueue:Array = [];
+
+    /**
+     *  @private
+     *  Used in progressive layout.
+     */
+    private var processingCreationQueue:Boolean = false;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  constraintColumns
+    //----------------------------------
+
+    [ArrayElementType("mx.containers.utilityClasses.ConstraintColumn")]
+    [Inspectable(arrayType="mx.containers.utilityClasses.ConstraintColumn")]
+
+    /**
+     *  @private
+     *  Storage for the constraintColumns property.
+     */
+    private var _constraintColumns:Array = [];
+
+    /**
+     *  @copy mx.containers.utilityClasses.IConstraintLayout#constraintColumns
+     */
+    public function get constraintColumns():Array
+    {
+        return _constraintColumns;
+    }
+
+    /**
+     *  @private
+     */
+    public function set constraintColumns(value:Array):void
+    {
+        if (value != _constraintColumns)
+        {
+	    	var n:int = value.length;
+	    	for (var i:int = 0; i < n; i++)
+            {
+                ConstraintColumn(value[i]).container = this;
+            }
+            _constraintColumns = value;
+
+            invalidateSize();
+            invalidateDisplayList();
+        }
+    }
+
+    //----------------------------------
+    //  constraintRows
+    //----------------------------------
+
+	[ArrayElementType("mx.containers.utilityClasses.ConstraintRow")]
+    [Inspectable(arrayType="mx.containers.utilityClasses.ConstraintRow")]
+
+    /**
+     *  @private
+     *  Storage for the constraintRows property.
+     */
+    private var _constraintRows:Array = [];
+
+    /**
+     *  @copy mx.containers.utilityClasses.IConstraintLayout#constraintRows
+     */
+    public function get constraintRows():Array
+    {
+        return _constraintRows;
+    }
+
+    /**
+     *  @private
+     */
+    public function set constraintRows(value:Array):void
+    {
+        if (value != _constraintRows)
+        {
+	    	var n:int = value.length;
+	    	for (var i:int = 0; i < n; i++)
+            {
+                ConstraintRow(value[i]).container = this;
+            }
+            _constraintRows = value;
+
+            invalidateSize();
+            invalidateDisplayList();
+        }
+    }
+
+    //----------------------------------
+    //  layout
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for layout property.
+     */
+    private var _layout:String = ContainerLayout.VERTICAL;
+
+    [Bindable("layoutChanged")]
+    [Inspectable(category="General", enumeration="vertical,horizontal,absolute", defaultValue="vertical")]
+
+    /**
+     *  Specifies the layout mechanism used for this application.
+     *  Applications can use "vertical", "horizontal",
+     *  or "absolute" positioning.
+     *  Vertical positioning lays out each child component vertically from
+     *  the top of the application to the bottom in the specified order.
+     *  Horizontal positioning lays out each child component horizontally
+     *  from the left of the application to the right in the specified order.
+     *  Absolute positioning does no automatic layout and requires you to
+     *  explicitly define the location of each child component.
+     *
+     *  @default "vertical"
+     */
+    public function get layout():String
+    {
+        return _layout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set layout(value:String):void
+    {
+        if (_layout != value)
+        {
+            _layout = value;
+
+            if (layoutObject)
+                // Set target to null for cleanup.
+                layoutObject.target = null;
+
+            if (_layout == ContainerLayout.ABSOLUTE)
+                layoutObject = new canvasLayoutClass();
+            else
+            {
+                layoutObject = new boxLayoutClass();
+
+                if (_layout == ContainerLayout.VERTICAL)
+                {
+                    BoxLayout(layoutObject).direction =
+                        BoxDirection.VERTICAL;
+                }
+                else
+                {
+                    BoxLayout(layoutObject).direction =
+                        BoxDirection.HORIZONTAL;
+                }
+            }
+
+            if (layoutObject)
+                layoutObject.target = this;
+
+            invalidateSize();
+            invalidateDisplayList();
+
+            dispatchEvent(new Event("layoutChanged"));
+        }
+    }
+
+    //----------------------------------
+    //  usePadding
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override mx_internal function get usePadding():Boolean
+    {
+        // We use padding for all layouts except absolute.
+        return layout != ContainerLayout.ABSOLUTE;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+
+    /**
+     *  @private
+     *  Calculates the preferred, mininum and maximum sizes of the
+     *  Application. See the UIComponent.measure() method for more
+     *  information.
+     *

+     *  The measure() method first calls
+     *  Box.measure() method, then makes sure the
+     *  measuredWidth and measuredMinWidth
+     *  are wide enough to display the application's control bar.
+     */
+    override protected function measure():void
+    {
+        super.measure();
+
+        layoutObject.measure();
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        layoutObject.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        // Wait to layout the border after all the children
+        // have been positioned.
+        createBorder();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods: Container
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function layoutChrome(unscaledWidth:Number,
+                                             unscaledHeight:Number):void
+    {
+        super.layoutChrome(unscaledWidth, unscaledHeight);
+
+        // When Container.autoLayout is false, updateDisplayList()
+        // is not called, but layoutChrome() is still called.
+        // In that case, we still need to position the border.
+        if (!doingLayout)
+            createBorder();
+
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3211
Author:   jvroom@adobe.com
Date:     2008-09-15T20:45:21.878872Z

Log Message:
-----------
Added a new "setResult" method which can set the operation's "lastResult" property.
Used by frameworks etc. which need to update that value.

QE: No, just a new method
Docs: No, the method is covered in javadoc
Checkintests: Pass
Reviewer: Pete Farland and Ed Solovey
Bugs:

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1274000 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as
+++ frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as
@@ -176,9 +176,25 @@
      */
     public function clearResult(fireBindingEvent:Boolean = true):void
     {
-        _result = null;
         if (fireBindingEvent)
-            dispatchEvent(new flash.events.Event(BINDING_RESULT));
+            setResult(null);
+        else
+            _result = null;
+    }
+
+    /**
+     *  This hook is exposed to update the lastResult property.  Since lastResult
+     *  is ordinarily updated automatically by the service, you do not typically
+     *  call this.  It is used by managed services that want to ensure lastResult
+     *  always points to "the" managed instance for a given identity even if the
+     *  the service returns a new copy of the same object.
+     *
+     *  @param the new value for the lastResult property.
+     */
+    public function setResult(result:Object):void
+    {
+        _result = result;
+        dispatchEvent(new flash.events.Event(BINDING_RESULT));
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1274035 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/AbstractService.as
+++ frameworks/projects/rpc/src/mx/rpc/AbstractService.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.rpc
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1274403 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/rpc/soap/WebService.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/WebService.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.rpc.soap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10637
Author:   cframpto@adobe.com
Date:     2009-09-28T13:53:10.788628Z

Log Message:
-----------
Add support for styleSheet used with htmlText.  Convert from the TextField's css style sheet to the equivalent TLF formats.

The CSS body class selector is mapped to the TLF TextFlow, the CSS p class selector is mapped to the TLF Paragraph element and the CSS span selector is mapped to the TLF span element.

CSS class selectors are mapped to the TLF style attribute.  For example:

 is mapped to the TLF paragraph element style name.
 is mapped to the TLF span element style name.

QE notes:
Doc notes:
Bugs:
Reviewer: Gordon
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/TLFTextField.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1277881 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/mx/core/FTETextField.as
+++ frameworks/projects/spark/src/mx/core/FTETextField.as
@@ -1490,6 +1490,9 @@

 		_styleSheet = value;

+        if (textFlow && textFlow.formatResolver)
+            textFlow.formatResolver = null;
+
 		// The TextLines may need to be recreated
 		// and the border and background may need to be redrawn.
 		setFlag(FLAG_TEXT_LINES_INVALID |
@@ -2876,6 +2879,16 @@

 		textContainerManager.setTextFlow(textFlow)

+        // Add a formatResolver if there is a style sheet.  Force a flow
+        // composer to be created, if there isn't one, so the format resolver
+        // will be used.
+        if (_styleSheet && !textFlow.formatResolver)
+        {
+            textFlow.formatResolver = new FTETextFieldStyleResolver(_styleSheet);
+            textContainerManager.beginInteraction();
+            textContainerManager.endInteraction();
+        }
+
 		textContainerManager.updateContainer();

 		var bounds:Rectangle = textContainerManager.getContentBounds();
@@ -2946,14 +2959,22 @@
 import flash.text.engine.FontLookup;
 import flash.text.engine.FontPosture;
 import flash.text.engine.FontWeight;
+import flash.text.StyleSheet;
 import flash.text.engine.Kerning;

 import flashx.textLayout.container.TextContainerManager;
+import flashx.textLayout.elements.FlowElement;
 import flashx.textLayout.elements.IConfiguration;
+import flashx.textLayout.elements.IFormatResolver;
 import flashx.textLayout.formats.ITextLayoutFormat;
+import flashx.textLayout.elements.LinkElement;
+import flashx.textLayout.elements.ParagraphElement;
+import flashx.textLayout.elements.SpanElement;
+import flashx.textLayout.elements.TextFlow;
 import flashx.textLayout.formats.LeadingModel;
 import flashx.textLayout.formats.LineBreak;
 import flashx.textLayout.formats.TextDecoration;
+import flashx.textLayout.formats.TextLayoutFormatValueHolder;

 import mx.core.TLFTextField;
 import mx.core.mx_internal;
@@ -3268,3 +3289,214 @@
 		return undefined;
 	}
 }
+
+/**
+ *  @private
+ *  To attach TextField styling via a style sheet to a TextFlow.
+ */
+[ExcludeClass]
+
+class FTETextFieldStyleResolver implements IFormatResolver
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Map of TextField StyleSheet css properties to their equivalent
+     *  TLF properties.  This is only the styles which have different names.
+     */
+    private static const textFieldToTLFStyleMap:Object = {
+        // FIXME(gosmith): when mapping leading to lineHeight does this need the
+        // same adjustment as  TLFTextFieldHostFormat.lineHeight?
+        "leading": "lineHeight",
+        "letterSpacing": "trackingRight",
+        "marginLeft": "paragraphStartIndent",
+        "marginRight": "paragraphEndIndent"
+    };
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function FTETextFieldStyleResolver(styleSheet:StyleSheet):void
+    {
+        _styleSheet = styleSheet;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  The TextField style sheet that will be used to create the TLF style
+     *  objects.
+     */
+    private var _styleSheet:StyleSheet;
+
+    //--------------------------------------------------------------------------
+    //
+    //  IFormatResolver
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Given a FlowElement or ContainerController object, return any format
+     *  settings for it.
+     *
+     *  Return format settings for the specified object.
+     */
+    public function resolveFormat(elem:Object):ITextLayoutFormat
+    {
+        var attr:TextLayoutFormatValueHolder = null;
+
+        // ContainerController will inherit via the container so it is not
+        // handled here.  Map HTML <body> to TextFlow, HTML <p> to
+        // ParagraphElement and HTML <span> to SpanElement.
+        if (elem is FlowElement)
+        {
+            if (elem is TextFlow)
+                attr = addStyleAttributes(attr, "body");
+            else if (elem is ParagraphElement)
+                attr = addStyleAttributes(attr, "p");
+            else if (elem is SpanElement)
+                attr = addStyleAttributes(attr, "span");
+
+            // Apply class selector over any format from above.
+            if (elem.styleName != null)
+                attr = addStyleAttributes(attr, "." + elem.styleName);
+        }
+
+        return attr;
+    }
+
+    /**
+     *  Given a FlowElement or ContainerController object and the name of a
+     *  format property, return the format value or undefined if
+     *  the value is not found.
+     *
+     *  Return the value of the specified format for the specified object.
+     */
+    public function resolveUserFormat(elem:Object,userStyle:String):*
+    {
+        var flowElem:FlowElement = elem as FlowElement;
+        var attr:TextLayoutFormatValueHolder;
+
+        // support non-tlf styles
+        if (flowElem)
+        {
+            if (flowElem.styleName)
+            {
+                attr = addStyleAttributes(null, "." + flowElem.styleName);
+            }
+            else if (flowElem is LinkElement)
+            {
+                if (userStyle == "linkNormalFormat")
+                    attr = addStyleAttributes(null, "a:link");
+
+                else if (userStyle == "linkHoverFormat")
+                    attr = addStyleAttributes(null, "a:hover");
+
+                else if (userStyle == "linkActiveFormat")
+                    attr = addStyleAttributes(null, "a:active");
+            }
+            else
+            {
+                attr = addStyleAttributes(null, userStyle);
+            }
+        }
+
+        return attr != null ? attr : undefined;
+    }
+
+    /**
+     * Invalidates any cached formatting information for a TextFlow so that
+     * formatting must be recomputed.
+     */
+    public function invalidateAll(tf:TextFlow):void
+    {
+    }
+
+    /**
+     * Invalidates cached formatting information on this element because, for
+     * example, the parent changed, or the id or the styleName changed.
+     */
+    public function invalidate(target:Object):void
+    {
+    }
+
+    /**
+     *  Return the format resolver for the copy of the TextFlow.
+     */
+    public function getResolverForNewFlow(oldFlow:TextFlow,newFlow:TextFlow):IFormatResolver
+    {
+        return this;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Look up the styleSelector in the TextField style sheet and build the
+     *  object of corresponding TLF styles and values.  Return null if the
+     *  styleSelector is not found in the style sheet.
+     */
+    private function addStyleAttributes(
+        attr:TextLayoutFormatValueHolder,
+        styleSelector:String):TextLayoutFormatValueHolder
+    {
+        var foundStyle:Object = _styleSheet.getStyle(styleSelector);
+        if (foundStyle != null)
+        {
+            for (var p:* in foundStyle)
+            {
+                var propStyle:Object = foundStyle[p];
+
+                if (attr == null)
+                    attr = new TextLayoutFormatValueHolder();
+
+                if (textFieldToTLFStyleMap[p])
+                {
+                    // different name, same values
+                    var tlfProp:String = textFieldToTLFStyleMap[p];
+                    attr[tlfProp] = propStyle;
+                }
+                else if (p == "color")
+                {
+                    // convert from "#000000" to "0x000000" format
+                    var color:String = String(propStyle);
+                    if (color && color.charAt(0) == "#")
+                        attr.color = "0x"+color.substring(1);
+                }
+                else if (p == "display")
+                {
+                    // TODO(cframpto): if we decide to support this.
+                }
+                else if (p == "kerning")
+                {
+                    // convert from true/false to on/off
+                    if (Boolean(propStyle))
+                        attr.kerning = flash.text.engine.Kerning.ON;
+                    else
+                        attr.kerning = flash.text.engine.Kerning.OFF;
+                }
+                else
+                {
+                    // same name, same values
+                    attr[p] = propStyle;
+                }
+            }
+        }
+
+        return attr;
+    }
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 3499
Author:   rfrishbe@adobe.com
Date:     2008-10-06T23:57:04.003486Z

Log Message:
-----------
Code cleanup:

1.  Remove IDisplayObjectElement and IAssignableDisplayObjectElement.  No one was actually using these interfaces...a few classes were implementing them though.

2.  Big ASDoc comment scrub for Group, DataGroup, and GroupBase.  Fixed some ASDoc in LayoutBase, IViewport, and ResizeMode.

3.  Spit and finish on Group.  No more variables or parameters typed as "*".  Got the content APIs in-line with Flash's DisplayObjectContainer, which means exceptions are now thrown where appropriate.

4.  Fixed a bug in DataGround where graphic items with item renderers had trouble in itemRemoved() (SDK-17175)

QE: Yes - Please revamp the excluded test cases to look for the new exceptions.
Doc: Yes
Bugs: SDK-17175
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/GroupBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IDisplayObjectElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/IAssignableDisplayObjectElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/intf/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283253 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/core/IViewport.as
+++ frameworks/projects/spark/src/spark/core/IViewport.as
@@ -18,18 +18,92 @@
     function get width():Number;
     function get height():Number;

+    /**
+     * The positive extent of the content, relative to the 0,0
+     * origin, along the X axis.
+     */
     function get contentWidth():Number;
+
+    /**
+     * The positive extent of the content, relative to the 0,0
+     * origin, along the Y axis.
+     */
     function get contentHeight():Number;

+     /**
+     *  The X coordinate of the origin of the region the target is
+     *  scrolled to.
+     *
+     *  Setting this property causes the target's
+     *  scrollRect to be set, if necessary, to:
+     *

+     *  new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+     *

+     *  Where width and height are properties
+     *  of the target.
+     *
+     *  @default 0
+     *  @see target
+     *  @see verticalScrollPosition
+     */
+    function get horizontalScrollPosition():Number;
+    function set horizontalScrollPosition(value:Number):void;
+
+     /**
+     *  The Y coordinate of the origin of the region this Group is
+     *  scrolled to.
+     *
+     *  Setting this property causes the scrollRect to
+     *  be set, if necessary, to:
+     *

+     *  new Rectangle(horizontalScrollPosition, verticalScrollPosition, width, height)
+     *

+     *  Where width and height are properties
+     *  of the target.
+     *
+     *  @default 0
+     *  @see horizontalScrollPosition
+     */
     function get verticalScrollPosition():Number;
     function set verticalScrollPosition(value:Number):void;

-    function get horizontalScrollPosition():Number;
-    function set horizontalScrollPosition(value:Number):void;
-
-    function verticalScrollPositionDelta(unit:uint):Number
+    /**
+     *  Returns the amount one would have to add to the viewport's current
+     *  verticalScrollPosition to scroll by the requested "scrolling" unit.
+     *
+     *  The value of unit must be one of the following flash.ui.Keyboard
+     *  constants: UP, DOWN, PAGE_UP, PAGE_DOWN, HOME, END.
+     *
+     *  To scroll by a single row use UP or DOWN and to scroll to the
+     *  first or last row, use HOME or END.
+     */
     function horizontalScrollPositionDelta(unit:uint):Number

+    /**
+     *  Returns the amount one would have to add to the viewport's current
+     *  verticalScrollPosition to scroll by the requested "scrolling" unit.
+     *
+     *  The value of unit must be one of the following flash.ui.Keyboard
+     *  constants: UP, DOWN, PAGE_UP, PAGE_DOWN, HOME, END.
+     *
+     *  To scroll by a single row use UP or DOWN and to scroll to the
+     *  first or last row, use HOME or END.
+     */
+    function verticalScrollPositionDelta(unit:uint):Number
+
+    /**
+     *  When scrolling is enabled, clip the target's contents by
+     *  setting its scrollRect.  If this property is set to false,
+     *  then the target's scrollRect will be null, even if its
+     *  scrollPosition is non-zero or its content size is larger
+     *  than its actual size.
+     *
+     *  @default true
+     *  @see target
+     *  @see updateScrollRect
+     *  @see verticalScrollPosition
+     *  @see horizontalScrollPosition
+     */
     function get clipContent():Boolean;
     function set clipContent(value:Boolean):void;
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 1301
Author:   matamel@adobe.com
Date:     2008-04-18T19:09:55.349861Z

Log Message:
-----------
Merge change 1300 from 3.0.x to trunk.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1273710 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as
@@ -11,7 +11,7 @@

 package mx.messaging.channels
 {
-
+
 import flash.events.Event;
 import flash.events.HTTPStatusEvent;
 import flash.events.IOErrorEvent;
@@ -30,49 +30,49 @@
 import mx.messaging.messages.AbstractMessage;
 import mx.messaging.messages.AsyncMessage;
 import mx.messaging.messages.ErrorMessage;
-import mx.messaging.messages.IMessage;
+import mx.messaging.messages.IMessage;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;
-
-use namespace mx_internal;
-
+
+use namespace mx_internal;
+
 [ResourceBundle("messaging")]
-
+
 /**
  *  The StreamingHTTPChannel class provides support for messaging and
  *  offers a different push model than the base HTTPChannel. Rather than
  *  polling for data from the server, the streaming channel opens an internal
  *  HTTP connection to the server that is held open to allow the server to
  *  stream data down to the client with no poll overhead.
- *
+ *
  *

  *  Messages sent by this channel to the server are sent using a URLLoader
  *  which uses an HTTP connection internally for the duration of the operation.
  *  Once the message is sent and an acknowledgement or fault is returned the HTTP connection
- *  used by URLLoader is released by the channel. These client-to-server messages are
- *  not sent over the streaming HTTP connection that the channel holds open to receive
+ *  used by URLLoader is released by the channel. These client-to-server messages are
+ *  not sent over the streaming HTTP connection that the channel holds open to receive
  *  server pushed data.
  *

- *
+ *
  *

  *  Although this class extends the base HTTPChannel to inherit the regular HTTP
  *  handling, it does not support polling.
  *

- */
+ */
 public class StreamingHTTPChannel extends HTTPChannel
-{
+{
     //--------------------------------------------------------------------------
     //
     // Constructor
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  Creates an new StreamingHTTPChannel instance.
      *
-	 *  @param id The id of this Channel.
-	 *
-	 *  @param uri The uri for this Channel.
+     *  @param id The id of this Channel.
+     *
+     *  @param uri The uri for this Channel.
      */
     public function StreamingHTTPChannel(id:String = null, uri:String = null)
     {
@@ -80,108 +80,121 @@

         // Disable polling.
         internalPollingEnabled = false;
-    }
-
+    }
+
     //--------------------------------------------------------------------------
     //
     // Variables
-    //
-    //--------------------------------------------------------------------------
-
-  	/**
-  	 * Helper class used by the channel to establish a streaming HTTP connection
-  	 * with the server.
-  	 */
-	private var streamingConnectionHandler:StreamingConnectionHandler;
-
+    //
+    //--------------------------------------------------------------------------
+
+      /**
+       * Helper class used by the channel to establish a streaming HTTP connection
+       * with the server.
+       */
+    private var streamingConnectionHandler:StreamingConnectionHandler;
+
     /**
      *  @private
      */
     private var resourceManager:IResourceManager =
-									ResourceManager.getInstance();
-
+                                    ResourceManager.getInstance();
+
     //--------------------------------------------------------------------------
     //
     // Properties
-    //
-    //--------------------------------------------------------------------------
-
-	//----------------------------------
-	//  pollingEnabled
-	//----------------------------------
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  pollingEnabled
+    //----------------------------------

     /**
      *  @private
      */
     override public function set pollingEnabled(value:Boolean):void
     {
-		var message:String = resourceManager.getString(
-			"messaging", "pollingNotSupportedHTTP");
+        var message:String = resourceManager.getString(
+            "messaging", "pollingNotSupportedHTTP");
         throw new Error(message);
     }
-
-    //----------------------------------
-	//  pollingInterval
-	//----------------------------------
-
+
+    //----------------------------------
+    //  pollingInterval
+    //----------------------------------
+
     /**
      *  @private
      */
     override public function set pollingInterval(value:Number):void
     {
-		var message:String = resourceManager.getString(
-			"messaging", "pollingNotSupportedHTTP");
+        var message:String = resourceManager.getString(
+            "messaging", "pollingNotSupportedHTTP");
         throw new Error(message);
     }
-
+
+    //----------------------------------
+    //  realtime
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Returns true since streaming channels are considered realtime.
+     */
+    override mx_internal function get realtime():Boolean
+    {
+        return true;
+    }
+
     //--------------------------------------------------------------------------
     //
     // Overridden Public Methods
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  Polling is not supported by this channel.
-     */
+     */
     override public function poll():void
     {
-		var message:String = resourceManager.getString(
-			"messaging", "pollingNotSupportedHTTP");
-        throw new Error(message);
-    }
-
+        var message:String = resourceManager.getString(
+            "messaging", "pollingNotSupportedHTTP");
+        throw new Error(message);
+    }
+
     //--------------------------------------------------------------------------
     //
     // Overriden Protected Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Closes the streaming connection before redispatching the fault event.
-     *
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Closes the streaming connection before redispatching the fault event.
+     *
      *  @param event The ChannelFaultEvent.
      */
-	override protected function connectFailed(event:ChannelFaultEvent):void
-	{
-		if (streamingConnectionHandler != null)
-			streamingConnectionHandler.closeStreamingConnection();
-
-        super.connectFailed(event);
-	}
-
+    override protected function connectFailed(event:ChannelFaultEvent):void
+    {
+        if (streamingConnectionHandler != null)
+            streamingConnectionHandler.closeStreamingConnection();
+
+        super.connectFailed(event);
+    }
+
     /**
      *  @private
      *  Closes the streaming connection before disconnecting.
      */
     override protected function internalDisconnect(rejected:Boolean = false):void
     {
-		if (streamingConnectionHandler != null)
-			streamingConnectionHandler.closeStreamingConnection();
-
-		super.internalDisconnect(rejected);
-    }
-
+        if (streamingConnectionHandler != null)
+            streamingConnectionHandler.closeStreamingConnection();
+
+        super.internalDisconnect(rejected);
+    }
+
     /**
      *  @private
      *  This method will be called if the ping message sent to test connectivity
@@ -191,52 +204,52 @@
      */
     override protected function internalPingComplete(msg:AsyncMessage):void
     {
-		if (msg != null)
-		{
-			ServerConfig.updateServerConfigData(msg.body as ConfigMap, endpoint);
-
-			// Set the server assigned FlexClient Id.
+        if (msg != null)
+        {
+            ServerConfig.updateServerConfigData(msg.body as ConfigMap, endpoint);
+
+            // Set the server assigned FlexClient Id.
             if (FlexClient.getInstance().id == null && msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER] != null)
                 FlexClient.getInstance().id = msg.headers[AbstractMessage.FLEX_CLIENT_ID_HEADER];
-		}
+        }
         if (credentials != null && !(msg is ErrorMessage))
             setAuthenticated(true);
-
+
         if (streamingConnectionHandler == null)
         {
-        	streamingConnectionHandler = new StreamingHTTPConnectionHandler(this, _log);
+            streamingConnectionHandler = new StreamingHTTPConnectionHandler(this, _log);
             streamingConnectionHandler.addEventListener(Event.OPEN, streamOpenHandler);
             streamingConnectionHandler.addEventListener(Event.COMPLETE, streamCompleteHandler);
             streamingConnectionHandler.addEventListener(HTTPStatusEvent.HTTP_STATUS, streamHttpStatusHandler);
             streamingConnectionHandler.addEventListener(IOErrorEvent.IO_ERROR, streamIoErrorHandler);
             streamingConnectionHandler.addEventListener(SecurityErrorEvent.SECURITY_ERROR, streamSecurityErrorHandler);
-            streamingConnectionHandler.addEventListener(StatusEvent.STATUS, streamStatusHandler);
-        }
-        streamingConnectionHandler.openStreamingConnection();
-    }
-
+            streamingConnectionHandler.addEventListener(StatusEvent.STATUS, streamStatusHandler);
+        }
+        streamingConnectionHandler.openStreamingConnection();
+    }
+
     //--------------------------------------------------------------------------
     //
     // Private Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  If the streaming connection receives an open event the channel is setup
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  If the streaming connection receives an open event the channel is setup
      *  and gets ready for messaging.
-     *
+     *
      *  @param event The OPEN Event.
      */
     private function streamOpenHandler(event:Event):void
     {
-       connectSuccess();
-    }
-
+       connectSuccess();
+    }
+
     /**
      *  A complete event indicates that the streaming connection has been closed by the server.
      *  This is a no-op if the channel is disconnected on the client, otherwise notifies the client
      *  channel that it has disconnected.
-     *
+     *
      *  @param event The COMPLETE Event.
      */
     private function streamCompleteHandler(event:Event):void
@@ -251,21 +264,21 @@
             internalDisconnect();
         }
     }
-
+
     /**
      *  Handles HTTP status events dispatched by the streaming connection.
-     *
+     *
      *  @param event The HTTPStatusEvent.
      */
     private function streamHttpStatusHandler(event:HTTPStatusEvent):void
     {
-    	// No-op because most of the times, HTTP status is zero.
-        // See ioErrorHandler.
-    }
-
+        // No-op because most of the times, HTTP status is zero.
+        // See ioErrorHandler.
+    }
+
     /**
      *  Handles IO error events dispatched by the streaming connection.
-     *
+     *
      *  @param event The IOErrorEvent.
      */
     private function streamIoErrorHandler(event:IOErrorEvent):void
@@ -288,23 +301,23 @@
             connectFailed(faultEvent);
         }
     }
-
+
     /**
      *  Handles security error events dispatched by the streaming connection.
-     *
+     *
      *  @param event The SecurityErrorEvent.
      */
     private function streamSecurityErrorHandler(event:SecurityErrorEvent):void
     {
-		// Just log as we'll never reach this handler because the prior ping will trigger
-        // a security error before we try to establish the streaming connection.
-    	if (Log.isDebug())
-    		_log.debug("'{0}' channel encountered a security error: {1}", id, event.text);
-    }
-
+        // Just log as we'll never reach this handler because the prior ping will trigger
+        // a security error before we try to establish the streaming connection.
+        if (Log.isDebug())
+            _log.debug("'{0}' channel encountered a security error: {1}", id, event.text);
+    }
+
     /**
      *  Handle status events dispatched by the streaming connection.
-     *
+     *
      *  @param event The StatusEvent.
      */
     private function streamStatusHandler(event:StatusEvent):void
@@ -314,8 +327,8 @@
         {
             streamingConnectionHandler.closeStreamingConnection();
             disconnectSuccess(true /* rejected */);
-        }
-    }
+        }
+    }
 }

 }
@@ -323,7 +336,7 @@
 //------------------------------------------------------------------------------
 //
 // Private Classes
-//
+//
 //------------------------------------------------------------------------------

 import flash.net.ObjectEncoding;
@@ -341,53 +354,53 @@
  *  A helper class that is used by the streaming channels to open an internal
  *  HTTP connection to the server that is held open to allow the server to
  *  stream data down to the client with no poll overhead.
- */
+ */
 class StreamingHTTPConnectionHandler extends StreamingConnectionHandler
-{
+{
     //--------------------------------------------------------------------------
     //
     // Constructor
-    //
-    //--------------------------------------------------------------------------
-
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  Creates an new StreamingHTTPConnectionHandler instance.
      *
-	 *  @param channel The Channel that uses this class.
-	 *  @param log Reference to the logger for the associated Channel.
+     *  @param channel The Channel that uses this class.
+     *  @param log Reference to the logger for the associated Channel.
      */
     public function StreamingHTTPConnectionHandler(channel:Channel, log:ILogger)
     {
-		super(channel, log);
-    }
-
+        super(channel, log);
+    }
+
     //--------------------------------------------------------------------------
     //
     // Protected Methods
-    //
-    //--------------------------------------------------------------------------
-
-	/**
-	 *  Used by the streamProgressHandler to read an AMFX encoded message.
-	 */
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Used by the streamProgressHandler to read an AMFX encoded message.
+     */
     override protected function readMessage():IMessage
     {
-    	var message:IMessage;
-		chunkBuffer.position = dataOffset - 1;
-		var messageBytes:ByteArray = new ByteArray();
-		messageBytes.objectEncoding = ObjectEncoding.AMF3;
-		try
-    	{
-			chunkBuffer.readBytes(messageBytes, 0, dataBytesToRead);
-			var messageString:String = messageBytes.readUTFBytes(dataBytesToRead);
-			var messageObject:Object = AMFXDecoder.decodeValue(XML(messageString), new AMFXContext());
-			message = IMessage(messageObject);
-    	}
-    	catch(error:Error)
-    	{
-			if (Log.isError())
-	        	_log.error("'{0}' channel encountered an error while reading a message from the streaming connection: {1}", channel.id, error.message);
-    	}
-		return message;
-    }
+        var message:IMessage;
+        chunkBuffer.position = dataOffset - 1;
+        var messageBytes:ByteArray = new ByteArray();
+        messageBytes.objectEncoding = ObjectEncoding.AMF3;
+        try
+        {
+            chunkBuffer.readBytes(messageBytes, 0, dataBytesToRead);
+            var messageString:String = messageBytes.readUTFBytes(dataBytesToRead);
+            var messageObject:Object = AMFXDecoder.decodeValue(XML(messageString), new AMFXContext());
+            message = IMessage(messageObject);
+        }
+        catch(error:Error)
+        {
+            if (Log.isError())
+                _log.error("'{0}' channel encountered an error while reading a message from the streaming connection: {1}", channel.id, error.message);
+        }
+        return message;
+    }
 }


Implement IMXMLObject. Some defaults and checks.

--- src/flails/resource/Resource.as
+++ src/flails/resource/Resource.as
@@ -9,17 +9,17 @@
   import flails.request.ResourcePathBuilder;
   import flails.request.JSONFilter;

-  import flash.utils.getQualifiedClassName;
-
   import mx.core.IMXMLObject;

-  public class Resource {
+  public class Resource implements IMXMLObject {
     public var name:String;
     public var instanceClass:Class;

     public function Resource() {}

     public function initialized(parent:Object, id:String):void {
+      if (name == null) throw new Error("Name not set for resource.");
+      if (instanceClass == null) instanceClass = Record;
     }

     public function index(resultHandler:Function, errorHandler:Function = null):void {


Fixed bug where BeforeClass and AfterClass were called once by the Parameterized runner and once by the TestClassRunnerForParameters, causing duplication of BeforeClass and AfterClass calls

--- FlexUnit4/src/org/flexunit/runners/Parameterized.as
+++ FlexUnit4/src/org/flexunit/runners/Parameterized.as
@@ -39,6 +39,7 @@
 	import org.flexunit.internals.dependency.IExternalRunnerDependencyWatcher;
 	import org.flexunit.internals.runners.ErrorReportingRunner;
 	import org.flexunit.internals.runners.InitializationError;
+	import org.flexunit.internals.runners.statements.IAsyncStatement;
 	import org.flexunit.runner.IDescription;
 	import org.flexunit.runner.IRunner;
 	import org.flexunit.runner.external.IExternalDependencyRunner;
@@ -46,7 +47,7 @@
 	import org.flexunit.runner.notification.StoppedByUserException;
 	import org.flexunit.runners.model.FrameworkMethod;
 	import org.flexunit.runners.model.IRunnerBuilder;
-	import org.flexunit.token.AsyncTestToken;
+	import org.flexunit.token.AsyncTestToken;

 	public class Parameterized extends ParentRunner implements IExternalDependencyRunner {
 		private var runners:Array;
@@ -174,6 +175,11 @@

 			IRunner( child ).run( notifier, childRunnerToken );
 		}
+
+		//we don't want the BeforeClass and AfterClass on this run to execute, this will be handled by the TestClassRunnerForParameters
+		override protected function classBlock( notifier:IRunNotifier ):IAsyncStatement {
+			return childrenInvoker( notifier );
+		}
 		// end Items copied from Suite
 	}
 }


- fixed a bug when scaling up

- fixed a bug when scaling up

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@551 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/utils/GeomUtil.as
+++ src/reprise/utils/GeomUtil.as
@@ -67,7 +67,7 @@
 				{
 					return;
 				}
-				ratio = Math.max(targetRect.width / sourceRect.width,
+				ratio = Math.min(targetRect.width / sourceRect.width,
 					targetRect.height / sourceRect.height);
 				sourceRect.width *= ratio;
 				sourceRect.height *= ratio;


Fix alpha threshold on multi pass phong effect

--- src/aerys/minko/render/material/phong/multipass/ZPrepassShader.as
+++ src/aerys/minko/render/material/phong/multipass/ZPrepassShader.as
@@ -1,20 +1,25 @@
 package aerys.minko.render.material.phong.multipass
 {
     import aerys.minko.render.RenderTarget;
+    import aerys.minko.render.material.basic.BasicProperties;
     import aerys.minko.render.shader.SFloat;
     import aerys.minko.render.shader.Shader;
     import aerys.minko.render.shader.ShaderSettings;
+    import aerys.minko.render.shader.part.DiffuseShaderPart;
     import aerys.minko.render.shader.part.animation.VertexAnimationShaderPart;
     import aerys.minko.type.enum.ColorMask;

     public class ZPrepassShader extends Shader
     {
 		private var _vertexAnimationPart	: VertexAnimationShaderPart;
+		private var _diffuseShaderPart 		: DiffuseShaderPart;

         public function ZPrepassShader(renderTarget : RenderTarget  = null,
                                        priority     : Number        = 0.0)
         {
             super(renderTarget, priority);
+
+			_diffuseShaderPart 		= new DiffuseShaderPart(this);
 			_vertexAnimationPart	= new VertexAnimationShaderPart(this);
         }

@@ -31,7 +36,18 @@
         }

         override protected function getPixelColor():SFloat
-        {
+        {
+			if (meshBindings.propertyExists(BasicProperties.ALPHA_THRESHOLD))
+			{
+				var diffuseColor : SFloat = _diffuseShaderPart.getDiffuseColor(false);
+
+				var alphaThreshold : SFloat = meshBindings.getParameter(
+					BasicProperties.ALPHA_THRESHOLD, 1
+				);
+
+				kill(subtract(0.5, lessThan(diffuseColor.w, alphaThreshold)));
+			}
+
             return float4(0, 0, 0, 0);
         }
     }


[feat] remove unneeded test

[feat] remove unneeded test

--- src/test/actionscript/com/dotfold/dotvimstat/mediator/MediatorTest.as
+++ src/test/actionscript/com/dotfold/dotvimstat/mediator/MediatorTest.as
@@ -1,8 +0,0 @@
-package com.dotfold.dotvimstat.mediator
-{
-	public class MediatorTest
-	{
-
-
-	}
-}


Transferred from the Adobe Open Source Subversion Repository

Revision: 21944
Author:   tkraikit@adobe.com
Date:     2011-08-12T00:29:34.330722Z

Log Message:
-----------
SDK-31121: handle null input to selectedDate cleanly. also:

* avoid null values set on displayMode
* set the year range by default to 1601-9999
* clean up displayMode flag processing at startup
* optimize dispatchEvent() calls to only occur if listeners are present
* fix date rollback bug that came from multiple spinner animation fix

QE notes: n/a
Doc notes: n/a
Bugs: SDK-311121
Reviewer: Chiedo
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1263852 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
+++ frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
@@ -181,9 +181,6 @@
      */
     protected static const MERIDIAN_ITEM:String = "meridianItem";

-    // number of years to show by default in DATE mode
-    private static const DEFAULT_YEAR_RANGE:int = 200;
-
     // number of days to show by default in DATE_AND_TIME mode
     private static const DEFAULT_DATE_RANGE:int = 730;

@@ -212,8 +209,6 @@
     public function DateSpinner()
     {
         super();
-
-        displayMode = DateSelectorDisplayMode.DATE;

         // TODO: the DateTimeFormatter should use the same styles as this DateSpinner
         // dateTimeFormatter.styleParent = this;
@@ -350,16 +345,17 @@
     //  displayMode
     //----------------------------------

-    private var _displayMode:String;
-
-    private var displayModeChanged:Boolean;
+    private var _displayMode:String = DateSelectorDisplayMode.DATE;
+
+    private var displayModeChanged:Boolean = false;

     [Inspectable(category="General", enumeration="date,time,dateAndTime", defaultValue="date")]

     /**
      *  Mode the DateSpinner is currently using for display. See
-     *  DateSelectorDisplayMode
-     *
+     *  DateSelectorDisplayMode.
+     *
+     *  @default DateSelectorDisplayMode.DATE
      *  @langversion 3.0
      *  @playerversion AIR 3
      *  @productversion Flex 4.5.2
@@ -371,7 +367,7 @@

     public function set displayMode(value:String):void
     {
-        if (_displayMode == value)
+        if (_displayMode == value || value == null)
             return;

         _displayMode = value;
@@ -391,24 +387,12 @@
             populateHourDataProvider = true;
             populateMinuteDataProvider = true;
             populateMeridianDataProvider = true;
-
-            // set default min/max dates
-            _minDateDefault = new Date(selectedDate.time);
-            _minDateDefault.date -= Math.floor(DEFAULT_DATE_RANGE / 2);
-            _maxDateDefault = new Date(selectedDate.time);
-            _maxDateDefault.date += Math.floor(DEFAULT_DATE_RANGE / 2);
         }
         else // default mode is DATE
         {
             populateYearDataProvider = true;
             populateMonthDataProvider = true;
             populateDateDataProvider = true;
-
-            // set default min/max dates
-            _minDateDefault = new Date(selectedDate.time);
-            _minDateDefault.fullYear -= Math.floor(DEFAULT_YEAR_RANGE / 2);
-            _maxDateDefault = new Date(selectedDate.time);
-            _maxDateDefault.fullYear += Math.floor(DEFAULT_YEAR_RANGE / 2);
         }

         syncSelectedDate = true; // force lists to spin to current selected date
@@ -559,9 +543,12 @@
      */
     public function set selectedDate(value:Date):void
     {
+        // no-op if null; there must always be a selectedDate
+        if (value == null)
+            return;
+
         // short-circuit if no change
-        if ((_selectedDate && value && value.time == _selectedDate.time)
-            || (_selectedDate == null && value == null))
+        if (value.time == _selectedDate.time)
             return;

         _selectedDate = value;
@@ -595,6 +582,15 @@
     //
     //--------------------------------------------------------------------------

+    override protected function attachSkin():void
+    {
+        super.attachSkin();
+
+        displayModeChanged = true;
+
+        invalidateProperties();
+    }
+
     override protected function commitProperties():void
     {
         super.commitProperties();
@@ -628,6 +624,8 @@
         if (displayModeChanged)
         {
             setupDateItemLists();
+
+            setDefaultRangeValues();

             displayModeChanged = false;
             listsNewlyCreated = true;
@@ -701,7 +699,8 @@
         if (selectedDateModifiedByUser)
         {
             selectedDateModifiedByUser = false;
-            dispatchEvent(new Event(Event.CHANGE));
+            if (hasEventListener(Event.CHANGE))
+                dispatchEvent(new Event(Event.CHANGE));
         }
     }

@@ -756,15 +755,15 @@
         // if itemIndex == itemCount - 1, align as last column

         var s:SpinnerList = SpinnerList(createDynamicPartInstance("dateItemList"));
-//        s.addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_START, dateItemList_touchEventHandler);
-//        s.addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_END, dateItemList_touchEventHandler);
+        //        s.addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_START, dateItemList_touchEventHandler);
+        //        s.addEventListener(TouchInteractionEvent.TOUCH_INTERACTION_END, dateItemList_touchEventHandler);
         //      TODO: s.itemRenderer = // ...; for first column (or equivalent)
         return s;
     }

     /**
+     *  @private
      *  Sets up the date item lists based on the current mode. Clears pre-existing lists.
-     *
      */
     private function setupDateItemLists():void
     {
@@ -1129,7 +1128,8 @@
             goToIndex(meridianList, newIndex, listsNewlyCreated);
         }

-        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+        if (hasEventListener(FlexEvent.VALUE_COMMIT))
+            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
     }

     // modify existing date item spinner list data providers to mark
@@ -1429,6 +1429,22 @@
             dayMonthDateFormatter.clearStyle("locale");
     }

+    private function setDefaultRangeValues():void
+    {
+        if (displayMode == DateSelectorDisplayMode.DATE_AND_TIME)
+        {
+            _minDateDefault = new Date(selectedDate.time);
+            _minDateDefault.date -= Math.floor(DEFAULT_DATE_RANGE / 2);
+            _maxDateDefault = new Date(selectedDate.time);
+            _maxDateDefault.date += Math.floor(DEFAULT_DATE_RANGE / 2);
+        }
+        else if (displayMode == DateSelectorDisplayMode.DATE)
+        {
+            _minDateDefault = new Date(1601, 0, 1);
+            _maxDateDefault = new Date(9999, 12, 31);
+        }
+    }
+
     //----------------------------------------------------------------------------------------------
     //
     //  Event handlers
@@ -1457,6 +1473,8 @@

         var numLists:int = listContainer.numElements;
         var currentList:SpinnerList;
+
+        var dateRolledBack:Boolean = false;

         // loop through all lists in the container and adjust selectedDate to their values
         for (var i:int = 0; i < numLists; i++)
@@ -1473,7 +1491,10 @@
                         tempDate = new Date(selectedDate.fullYear, newValue.data, 1);
                         cd = new CalendarDate(tempDate);
                         if (dateList.selectedItem.data > cd.numDaysInMonth)
+                        {
                             newDate.date = cd.numDaysInMonth;
+                            dateRolledBack = true;
+                        }
                     }
                     newDate.month = newValue.data;
                     break;
@@ -1486,7 +1507,7 @@
                         newDate.month = spinnerDate.month;
                         newDate.date = spinnerDate.date;
                     }
-                    else
+                    else if (!dateRolledBack) // don't tamper with date if we already rolled it back
                     {
                         newDate.date = newValue.data;
                     }