Transferred from the Adobe Open Source Subversion Repository

Revision: 4492
Author:   gosmith@adobe.com
Date:     2009-01-12T22:47:10.154251Z

Log Message:
-----------
Simplified how an accessibility class gets hooked into its corresponding component class.

We now do the hooking in the static method enableAccessibility(), which is called by code that is autogenerated by the compiler. Previously this method did nothing and the hooking happened at static initialization time. This allows us to remove the static var accessibilityHooked and the static method hookAccessibility() in each accessibility class.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Deepa and Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ColorPickerAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DataGridAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateFieldAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/SliderAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/CheckBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/LinkButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/RadioButtonAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TabBarAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TreeAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/PanelAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/DateChooserAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/MenuAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ListBaseAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AlertAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/ComboBoxAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/TitleWindowAccImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/accessibility/AccordionHeaderAccImpl.as</path>

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

--- frameworks/projects/mx/src/mx/accessibility/ComboBaseAccImpl.as
+++ frameworks/projects/mx/src/mx/accessibility/ComboBaseAccImpl.as
@@ -23,13 +23,8 @@
 use namespace mx_internal;

 /**
- *  The ComboBaseAccImpl class is the accessibility class for ComboBase.
- *  Since ComboBox inherits from ComboBase,
- *  this class is inherited by ComboBoxAccImpl.
- *
- *  @helpid 3004
- *  @tiptext This is the ComboBase Accessibility Class.
- *  @review
+ *  ComboBaseAccImpl is a subclass of AccessibilityImplementation
+ *  which implements accessibility for the ComboBase class.
  */
 public class ComboBaseAccImpl extends AccImpl
 {
@@ -37,79 +32,66 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Class initialization
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  Static variable triggering the hookAccessibility() method.
-	 *  This is used for initializing ComboBaseAccImpl class to hook its
-	 *  createAccessibilityImplementation() method to ComboBase class
-	 *  before it gets called from UIComponent.
-	 */
-	private static var accessibilityHooked:Boolean = hookAccessibility();
-
-	/**
-	 *  @private
-	 *  Static method for swapping the createAccessibilityImplementation()
-	 *  method of ComboBase with the ComboBaseAccImpl class.
-	 */
-	private static function hookAccessibility():Boolean
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static const ROLE_SYSTEM_LISTITEM:uint = 0x22;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
+
+	/**
+	 *  @private
+	 */
+	private static const STATE_SYSTEM_SELECTED:uint = 0x00000002;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_VALUECHANGE:uint = 0x800E;
+
+	/**
+	 *  @private
+	 */
+	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Enables accessibility in the ComboBase class.
+	 *
+	 *
This method is called by application startup code
+	 *  that is autogenerated by the MXML compiler.
+	 *  Afterwards, when instances of ComboBase are initialized,
+	 *  their accessibilityImplementation property
+	 *  will be set to an instance of this class.

+	 */
+	public static function enableAccessibility():void
 	{
 		ComboBase.createAccessibilityImplementation =
 			createAccessibilityImplementation;
-
-		return true;
-	}
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class constants
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 */
-	private static const ROLE_SYSTEM_LISTITEM:uint = 0x22;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_FOCUSED:uint = 0x00000004;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTABLE:uint = 0x00200000;
-
-	/**
-	 *  @private
-	 */
-	private static const STATE_SYSTEM_SELECTED:uint = 0x00000002;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_VALUECHANGE:uint = 0x800E;
-
-	/**
-	 *  @private
-	 */
-	private static const EVENT_OBJECT_SELECTION:uint = 0x8006;
-
-	//--------------------------------------------------------------------------
-	//
-	//  Class methods
-	//
-	//--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  Method for creating the Accessibility class.
-	 *  This method is called from UIComponent.
-	 *  @review
+	}
+
+	/**
+	 *  @private
+	 *  Creates a ComboBase's AccessibilityImplementation object.
+	 *  This method is called from UIComponent's
+	 *  initializeAccessibility() method.
 	 */
 	mx_internal static function createAccessibilityImplementation(
 								component:UIComponent):void
@@ -118,15 +100,6 @@
 			new ComboBaseAccImpl(component);
 	}

-	/**
-	 *  Method call for enabling accessibility for a component.
-	 *  this method is required for the compiler to activate
-	 *  the accessibility classes for a component.
-	 */
-	public static function enableAccessibility():void
-	{
-	}
-
 	//--------------------------------------------------------------------------
 	//
 	//  Constructor
@@ -191,7 +164,6 @@
 	 *  @param childID uint
 	 *
 	 *  @return Value String
-	 *  @review
 	 */
 	override public function get_accValue(childID:uint):String
 	{
@@ -266,7 +238,6 @@
 	 *  @param childID uint
 	 *
 	 *  @return Name String
-	 *  @review
 	 */
 	override protected function getName(childID:uint):String
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 19635
Author:   aharui@adobe.com
Date:     2011-01-07T00:25:18.039632Z

Log Message:
-----------
revert the layout changes from svn 18635.  Management feels that there isn't enough time to thoroughly test the changes.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.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/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.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/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.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/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.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/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -14,18 +14,13 @@
 import flash.events.Event;
 import flash.geom.Point;
 import flash.geom.Rectangle;
-import flash.utils.Dictionary;

 import mx.containers.utilityClasses.Flex;
-import mx.core.FlexVersion;
-import mx.core.IInvalidating;
 import mx.core.ILayoutElement;
 import mx.core.IVisualElement;
 import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
-import mx.events.FlexEvent;
 import mx.events.PropertyChangeEvent;
-import mx.managers.ILayoutManagerClient;

 import spark.components.DataGroup;
 import spark.components.supportClasses.GroupBase;
@@ -131,28 +126,6 @@
      */
     private var llv:LinearLayoutVector;

-    /**
-     *  @private
-     *  total percentages of children.  used to calculate estimatedWidth
-     */
-    private var totalPercentWidth:Number;
-
-    /**
-     *  @private
-     *  actual space that is flexible.  used to calculate estimatedWidth
-     */
-    private var flexibleWidth:Number;
-
-    /**
-     *  @private
-     */
-    private var lastEstimatedHeight:Number;
-
-    /**
-     *  @private
-     */
-    private var inUpdateDisplayListVirtual:Boolean;
-
     //--------------------------------------------------------------------------
     //
     //  Class methods
@@ -215,22 +188,6 @@
         // Don't drag-scroll in the vertical direction
         dragScrollRegionSizeVertical = 0;
     }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    // used to communicate between the loop and the event handlers
-    private var dontCacheMeasurements:Boolean;
-    private var notFinalTargets:Array;
-
-    // indexes that have reported that a size should not be cached
-    private var notFinalIndexes:Array;
-    // components that have reported that they are not final
-    private var notFinalComponents:Dictionary;
-

     //--------------------------------------------------------------------------
     //
@@ -963,14 +920,7 @@
         {
             var layoutTarget:GroupBase = target;
             if (layoutTarget)
-            {
-                if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
-                {
-                    layoutTarget.invalidateSize();
-                    layoutTarget.invalidateEstimatedSizesOfChildren();
-                }
                 layoutTarget.invalidateDisplayList();
-            }
         }
     }

@@ -998,56 +948,6 @@
     }

     //----------------------------------
-    //  target
-    //----------------------------------
-
-    private var _target:GroupBase;
-
-    /**
-     * @private
-     */
-    override public function set target(value:GroupBase):void
-    {
-        if (_target == value)
-            return;
-
-        if (_target)
-        {
-            if (useVirtualLayout)
-                _target.removeEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler);
-        }
-        _target = value;
-        super.target = value;
-        if (value)
-        {
-            if (useVirtualLayout)
-                value.addEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler, false, 0, true);
-        }
-    }
-
-    //----------------------------------
-    //  useVirtualLayout
-    //----------------------------------
-
-    /**
-     * @private
-     */
-    override public function set useVirtualLayout(value:Boolean):void
-    {
-        if (_useVirtualLayout == value)
-            return;
-
-        if (_target)
-        {
-            if (value)
-                _target.addEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler, false, 0, true);
-            else
-                _target.removeEventListener(FlexEvent.MEASURED_SIZE_PRELIMINARY, measuredSizePreliminaryHandler);
-        }
-        super.useVirtualLayout = value;
-    }
-
-    //----------------------------------
     //  typicalLayoutElementBaselinePosition
     //----------------------------------

@@ -1068,45 +968,6 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 *  customize handling of a few cases
-	 */
-    override protected function estimateSizeOfElement(layoutElement:ILayoutElement,
-                                                               percentWidth:Number,
-                                                               percentHeight:Number,
-                                                               parentEstimatedWidth:Number,
-                                                               parentEstimatedHeight:Number,
-                                                               estimatedSize:Point):void
-    {
-        super.estimateSizeOfElement(layoutElement,
-                                            percentWidth * 100 / totalPercentWidth,
-                                            percentHeight,
-                                            flexibleWidth,
-                                            parentEstimatedHeight,
-                                            estimatedSize);
-
-		if (isNaN(estimatedSize.y))
-		{
-			var c:Number = target.estimatedHeight;
-			if (isNaN(c) && !isNaN(target.explicitHeight))
-				c = target.explicitHeight;
-			if (!isNaN(c))
-			{
-				// if verticalAlign is "justify" or "contentJustify",
-				// restrict the height to estimatedHeight.  Otherwise,
-				// size it normally
-				if (verticalAlign == VerticalAlign.JUSTIFY)
-					estimatedSize.y = c;
-			}
-			else
-			{
-				if (!isNaN(layoutElement.percentHeight) && !isNaN(target.height) && target.height > 0)
-					estimatedSize.y = calculatePercentHeight(layoutElement, target.height);
-			}
-		}
-	}
-
     /**
      *  @private
      */
@@ -1130,64 +991,6 @@
         llv = null;
     }

-    /**
-     * @private
-     * if the estimated sizes changed, toss the cached sizes
-     */
-    override public function estimateSizesOfElements():void
-    {
-        if (llv && target.estimatedHeight != lastEstimatedHeight && llv.minorSizeBasedOnLayoutSize)
-        {
-            llv.minorSize = 0;
-            llv.minMinorSize = 0;
-        }
-        lastEstimatedHeight = target.estimatedHeight;
-
-        var size:SizesAndLimit = new SizesAndLimit();
-        var spaceToDistribute:Number = !isNaN(target.explicitWidth) ? target.explicitWidth : target.estimatedWidth;
-        spaceToDistribute -= paddingLeft + paddingRight;
-        totalPercentWidth = useVirtualLayout ? 100 : 0;
-		if (!useVirtualLayout)
-		{
-	        var layoutElement:ILayoutElement;
-
-	        // columnWidth can be expensive to compute
-	        var cw:Number = (variableColumnWidth) ? NaN : Math.ceil(columnWidth);
-	        var count:int = target.numElements;
-	        var totalCount:int = count; // number of elements to use in gap calculation
-
-	        // If the child is flexible, track total % in case of total %'s
-	        // add up to more than 100.
-	        // For non-flexible children, take its size away from the total amount
-	        // of flexible room
-	        for (var index:int = 0; index < count; index++)
-	        {
-	            layoutElement = target.getElementAt(index);
-	            if (!layoutElement || !layoutElement.includeInLayout)
-	            {
-	                totalCount--;
-	                continue;
-	            }
-
-	            if (!isNaN(layoutElement.percentWidth) && variableColumnWidth)
-	            {
-	                totalPercentWidth += layoutElement.percentWidth;
-	            }
-	            else
-	            {
-	                getElementWidth(layoutElement, cw, size);
-	                spaceToDistribute -= Math.ceil(size.preferredSize);
-	            }
-	        }
-
-	        if (totalCount > 1)
-	            spaceToDistribute -= (totalCount-1) * gap;
-
-	        flexibleWidth = spaceToDistribute;
-		}
-        super.estimateSizesOfElements();
-    }
-
     /**
      *  @private
      */
@@ -1779,17 +1582,6 @@
         var typicalElt:ILayoutElement = typicalLayoutElement;
         if (typicalElt)
         {
-            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
-            {
-                // warning:  If the data for a renderer is an IVisualElement
-                // the typicalElt's data will still be valid, but the data
-                // will likely have been re-parented to an actual renderer
-                // causing new measurements here to be off.  This is supposedly
-                // compensated for when we factor in the renderers we have created
-                // into measurement.
-                if (typicalElt is ILayoutManagerClient)
-                    UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(typicalElt), true);
-            }
             var typicalWidth:Number = typicalElt.getPreferredBoundsWidth();
             var typicalHeight:Number = typicalElt.getPreferredBoundsHeight();
             llv.defaultMinorSize = typicalHeight;
@@ -1863,7 +1655,6 @@
             // paddingRight is already taken into account as the majorAxisOffset of the llv
             // Measured size according to the cached actual size:
             var measuredWidth:Number = llv.end(measuredEltCount - 1) + paddingRight;
-            var measuredHeight:Number = llv.minorSize + vPadding;

             // For the live ItemRenderers use the preferred size
             // instead of the cached actual size:
@@ -1878,17 +1669,12 @@
                     {
                         measuredWidth -= llv.getMajorSize(i);
                         measuredWidth += element.getPreferredBoundsWidth();
-                        measuredHeight = Math.max(measuredHeight, element.getPreferredBoundsHeight() + vPadding);
                     }
                 }
             }

             layoutTarget.measuredWidth = measuredWidth;
-            if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
-                layoutTarget.measuredHeight = measuredHeight;
-            else
-                layoutTarget.measuredHeight = llv.minorSize + vPadding;
-
+
             if (oldLength != -1)
                 llv.length = oldLength;
         }
@@ -1896,8 +1682,8 @@
         {
             var hgap:Number = (measuredEltCount > 1) ? (measuredEltCount - 1) * gap : 0;
             layoutTarget.measuredWidth = (measuredEltCount * columnWidth) + hgap + hPadding;
-            layoutTarget.measuredHeight = llv.minorSize + vPadding;
-        }
+        }
+        layoutTarget.measuredHeight = llv.minorSize + vPadding;

         layoutTarget.measuredMinWidth = layoutTarget.measuredWidth;
         layoutTarget.measuredMinHeight = (verticalAlign == VerticalAlign.JUSTIFY) ?
@@ -2203,7 +1989,7 @@
         // simply start from minVisibleX - SDK-22497.
         var startIndex:int = llv.indexOf(Math.max(0, minVisibleX + gap));
         if (startIndex == -1)
-            return;
+            return;

         var fixedColumnWidth:Number = NaN;
         if (!variableColumnWidth)
@@ -2218,80 +2004,19 @@
         var index:int = startIndex;
         var y0:Number = paddingTop;

-        var w:Number;
-        var h:Number;
-        var elt:ILayoutElement;
-
         // First pass: compute element x,y,width,height based on
         // current contentHeight; cache computed widths/heights in llv.
         for (; (x < maxVisibleX) && (index < eltCount); index++)
         {
-            // reset this flag so components like Image can tell us
-            // not to cache measurements
-            dontCacheMeasurements = false;
-            // reset this array so we can find out what components are
-            // not final
-			if (!notFinalTargets)
-				notFinalTargets = [];
-			// request element, but skip validation (especially of the displaylist)
-			elt = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight, true);
-			// then validate everything but the displaylist so there are valid
-			// default size
-			if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
-				if (elt is ILayoutManagerClient)
-					UIComponentGlobals.layoutManager.validateClient(ILayoutManagerClient(elt), true);
-			w = fixedColumnWidth; // NaN for variable width columns
-            h = calculateElementHeight(elt, targetHeight, containerHeight); // can be NaN
+            var elt:ILayoutElement = layoutTarget.getVirtualElementAt(index);
+            var w:Number = fixedColumnWidth; // NaN for variable width columns
+            var h:Number = calculateElementHeight(elt, targetHeight, containerHeight); // can be NaN
             elt.setLayoutBoundsSize(w, h);
             w = elt.getLayoutBoundsWidth();
             h = elt.getLayoutBoundsHeight();
             var y:Number = y0 + calculateElementY(elt, h, containerHeight);
             elt.setLayoutBoundsPosition(x, y);
-			// this flag potentially set by an event dispatched in the previous lines of code
-            if (dontCacheMeasurements)
-            {
-                // associate the index with the target
-                // so if the target is recycled to another
-                // index we know the current index
-                for each (var t:* in notFinalTargets)
-				{
-					if (!notFinalComponents)
-						notFinalComponents = new Dictionary(true);
-					notFinalComponents[t] = index;
-
-				}
-                notFinalTargets.length = 0;
-				if (!notFinalIndexes)
-					notFinalIndexes = [];
-                // remember that this index didn't want to be cached
-                notFinalIndexes[index] = index;
-            }
-            else
-            {
-                if (notFinalIndexes && notFinalIndexes[index] != null)
-                {
-                    // we were previously told not to cache measurements.
-                    // clear it from the table.  We'll put it back in
-                    // if needed
-                    notFinalIndexes[index] = null;
-                    // scan the components that have dispatched a notFinal
-                    // to see if any are associated with this index
-                    for each(var p:* in notFinalComponents)
-                    {
-                        if (p == index)
-                        {
-                            // still a component that isn't final
-                            // so re-add it
-                            notFinalIndexes[index] = index;
-                            break;
-                        }
-                    }
-                    if (notFinalIndexes[index] == null)
-                        llv.cacheDimensions(index, elt);
-                }
-                else
-                    llv.cacheDimensions(index, elt);
-            }
+            llv.cacheDimensions(index, elt);
             x += w + gap;
         }
         var endIndex:int = index - 1;
@@ -2306,7 +2031,7 @@
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN, true);
+                    elt = layoutTarget.getVirtualElementAt(index);
                     h = calculateElementHeight(elt, targetHeight, containerHeight); // can be NaN
                     elt.setLayoutBoundsSize(elt.getLayoutBoundsWidth(), h);
                     h = elt.getLayoutBoundsHeight();
@@ -2336,7 +2061,7 @@
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN, true);
+                    elt = layoutTarget.getVirtualElementAt(index, NaN, NaN);
                     elt.setLayoutBoundsPosition(dx + elt.getLayoutBoundsX(), elt.getLayoutBoundsY());
                 }
                 contentWidth += dx;
@@ -2604,20 +2329,11 @@
             if (layoutTarget.numElements == 0)
                 layoutTarget.setContentSize(Math.ceil(paddingLeft + paddingRight),
                                             Math.ceil(paddingTop + paddingBottom));
-            if (notFinalTargets)
-                notFinalTargets.length = 0;
             return;
         }

         if (useVirtualLayout)
-        {
-            inUpdateDisplayListVirtual = true;
-            updateDisplayListVirtual();
-            inUpdateDisplayListVirtual = false;
-
-            if (notFinalTargets)
-                notFinalTargets.length = 0;
-        }
+            updateDisplayListVirtual();
         else
             updateDisplayListReal();
     }
@@ -2645,42 +2361,6 @@
         g.invalidateDisplayList();
     }

-    /**
-     *  React to indications that measurements are not final
-     *  and should not be cached
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    private function measuredSizePreliminaryHandler(event:FlexEvent):void
-    {
-        if (!inUpdateDisplayListVirtual)
-            return;
-
-        event.target.addEventListener(FlexEvent.MEASURED_SIZE_FINAL, measuredSizeFinalHandler, false, 0, true);
-		if (!notFinalTargets)
-			notFinalTargets = [];
-        notFinalTargets.push(event.target);
-        dontCacheMeasurements = true;
-    }
-
-    /**
-     *  React to indications that measurements are final
-     *  and can be cached
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10.2
-     *  @playerversion AIR 2.0
-     *  @productversion Flex 4.5
-     */
-    private function measuredSizeFinalHandler(event:FlexEvent):void
-    {
-		if (notFinalComponents)
-        	delete notFinalComponents[event.target];
-    }
-
     //--------------------------------------------------------------------------
     //
     //  Drop methods


Transferred from the Adobe Open Source Subversion Repository

Revision: 16784
Author:   aharui@adobe.com
Date:     2010-07-02T00:23:38.805179Z

Log Message:
-----------
numElements is an int, so use int in the loops so -1 doesn't get coerced silently to 2^32

QE notes: none
Doc notes: none
Bugs: SDK-25716
Reviewer: Corey
Tests run: checkintests mustella/gumbo/layout
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as
@@ -1313,7 +1313,7 @@
      */
     private function measureVirtual(layoutTarget:GroupBase):void
     {
-        var eltCount:uint = layoutTarget.numElements;
+        var eltCount:int = layoutTarget.numElements;
         var measuredEltCount:int = (requestedColumnCount != -1) ? requestedColumnCount :
                                                                   Math.max(requestedMinColumnCount, eltCount);

@@ -1753,7 +1753,7 @@
         var targetHeight:Number = Math.max(0, layoutTarget.height - paddingTop - paddingBottom);

         var layoutElement:ILayoutElement;
-        var count:uint = layoutTarget.numElements;
+        var count:int = layoutTarget.numElements;

         // If verticalAlign is top, we don't need to figure out the contentHeight.
         // Otherwise the contentHeight is used to position the element and even size
@@ -1887,8 +1887,8 @@

         // columnWidth can be expensive to compute
         var cw:Number = (variableColumnWidth) ? 0 : Math.ceil(columnWidth);
-        var count:uint = target.numElements;
-        var totalCount:uint = count; // number of elements to use in gap calculation
+        var count:int = target.numElements;
+        var totalCount:int = count; // number of elements to use in gap calculation

         // If the child is flexible, store information about it in the
         // childInfoArray. For non-flexible children, just set the child's


Added new function replaceStyles

Added new function replaceStyles

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/util/UIUtil.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/util/UIUtil.as
@@ -77,37 +77,45 @@
 			}
 		}

-		public static function addStyleName(component:UIComponent, styleName:String):void {
+		public static function addStyleName(component:UIComponent, styleName:String, applyImmediately:Boolean = true):String {
+			var componentStyleName:String = component.styleName as String;
 			if(!hasStyleName(component, styleName)) {
-				var componentStyleName:String = component.styleName as String;
 				if(StringUtil.isBlank(componentStyleName)){
 					componentStyleName = "";
 				} else {
 					componentStyleName += " ";
 				}
 				componentStyleName += styleName;
-				component.styleName = componentStyleName;
+				if(applyImmediately) {
+					component.styleName = componentStyleName;
+				}
 			}
+			return componentStyleName;
 		}

-		public static function addStyleNames(component:UIComponent, styleNames:Array):void {
+		public static function addStyleNames(component:UIComponent, styleNames:Array, applyImmediately:Boolean = true):String {
 			for each(var styleName:String in styleNames) {
-				addStyleName(component, styleName);
+				addStyleName(component, styleName, applyImmediately);
 			}
+			return component.styleName as String;
 		}

-		public static function removeStyleName(component:UIComponent, styleName:String):void {
+		public static function removeStyleName(component:UIComponent, styleName:String, applyImmediately:Boolean = true):String {
+			var componentStyleName:String = component.styleName as String;
 			if(hasStyleName(component, styleName)) {
-				var componentStyleName:String = component.styleName as String;
 				componentStyleName = componentStyleName.replace(styleName, "");
-				component.styleName = componentStyleName;
+				if(applyImmediately) {
+					component.styleName = componentStyleName;
+				}
 			}
+			return componentStyleName;
 		}

-		public static function removeStyleNames(component:UIComponent, styleNames:Array):void {
+		public static function removeStyleNames(component:UIComponent, styleNames:Array, applyImmediately:Boolean = true):String {
 			for each(var styleName:String in styleNames) {
-				removeStyleName(component, styleName);
+				removeStyleName(component, styleName, applyImmediately);
 			}
+			return component.styleName as String;
 		}

 		public static function hasStyleName(component:UIComponent, styleName:String):Boolean {
@@ -117,6 +125,16 @@
 			}
 			return false;
 		}
-
+
+		public static function replaceStyleNames(component:UIComponent, newStyles:Array, oldStyles:Array, applyImmediately:Boolean = true):String {
+			var cleanedStyle:String = removeStyleNames(component, oldStyles);
+			var newStylesConcat:String = StringUtil.concat(" ", newStyles);
+			var result:String = cleanedStyle + " " + newStylesConcat;
+			if(applyImmediately) {
+				component.styleName = result;
+			}
+			return result;
+		}
+
 	}
 }


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@1265932 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2010 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.skins.mobile.supportClasses
 {


set return type for functions

set return type for functions

SVN-Revision: 3134

--- software/sasFlex/src/gov/nih/nci/cbiit/casas/components/FormulaPanel.as
+++ software/sasFlex/src/gov/nih/nci/cbiit/casas/components/FormulaPanel.as
@@ -1,7 +1,8 @@
 package gov.nih.nci.cbiit.casas.components
 {
 	import flash.display.MovieClip;
-
+	import flash.net.FileReference;
+
 	import learnmath.windows.apps.EditorApp;

 	import mx.controls.Alert;
@@ -14,7 +15,7 @@
 			return;
 		}

-		override public function openAction()
+		override  public function openAction():*
 		{
 //			var _loc_1:* = String(ExternalInterface.call("getMathMLFromJavascript"));
 //			if (_loc_1 != null)
@@ -29,12 +30,14 @@
 //			}
 //			this.editor.newFormula();
 //			this.editor.insert(_loc_1, this.lastStyle);
-			Alert.show("open is cliked...","Scientific Algorithm Service:openAction()");
+
+			var myFileReference:FileReference = new FileReference();
+			myFileReference.browse();
 			super.openAction();
 			return;
 		}// end function

-		override public function saveAction()
+		override public function saveAction():*
 		{
 //			var _loc_1:* = this.convToMathML(this.editor.getMathMLString());
 //			ExternalInterface.call("saveMathMLToJavascript", _loc_1);


Fixed Draw.curve() ignoring the camera position.

--- net/flashpunk/utils/Draw.as
+++ net/flashpunk/utils/Draw.as
@@ -319,8 +319,8 @@
 		{
 			_graphics.clear();
 			_graphics.lineStyle(1, 0xFF0000);
-			_graphics.moveTo(x1, y1);
-			_graphics.curveTo(x2, y2, x3, y3);
+			_graphics.moveTo(x1 - _camera.x, y1 - _camera.y);
+			_graphics.curveTo(x2 - _camera.x, y2 - _camera.y, x3 - _camera.x, y3 - _camera.y);
 			_target.draw(FP.sprite, null, null, blend);
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19321
Author:   mhorn@adobe.com
Date:     2010-12-13T19:48:59.851835Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoSource.as</path>

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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CollatorBase.as
@@ -103,7 +103,7 @@
      *

      *
Inheriting the style from a UIComponent by calling
      *          the UIComponent's addStyleClient method with
-	 * 			an instance of this object as the parameter.

+     *          an instance of this object as the parameter.

      *
By using the class in an MXML declaration and inheriting the
      *          locale style from the document that contains the
      *          declaration.
@@ -128,11 +128,13 @@
      *
If the locale style is not set by one of the above
      *  techniques, the
      *  methods of this class that depend on the locale set the
-	 *  lastOperationStatus property to
-	 *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

-     *
+     *  lastOperationStatus property to
+     *  spark.globalization.LastOperationStatus.LOCALE_UNDEFINED_ERROR.

+     *
+     *  @param initialMode Sets the initial collation options for two use cases: sorting and matching.
+     *
      *  @see flash.globalization.Collator
-	 *  @see spark.globalization.LastOperationStatus
+     *  @see spark.globalization.LastOperationStatus
      *  @langversion 3.0
      *  @playerversion Flash 10.1
      *  @playerversion AIR 2.5


Transferred from the Adobe Open Source Subversion Repository

Revision: 19449
Author:   cframpto@adobe.com
Date:     2010-12-17T14:42:26.473553Z

Log Message:
-----------
Fix invalidateCell() to take into account the padding rows returned in visibleRowIndices().  Also [ExcludeClass] GridSelection and change both createGridSelection() methods to mx_internal since GridSelection has not gone thru PARB.

QE notes:
Doc notes:
Bugs: SDK-28905
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -3287,7 +3287,7 @@
      *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
-    protected function createGridSelection():GridSelection
+    mx_internal function createGridSelection():GridSelection
     {
         return new GridSelection();
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4039
Author:   gosmith@adobe.com
Date:     2008-11-07T01:52:22.633017Z

Log Message:
-----------
The setter for the 'content' property of TextGraphic now stringifies the value you set with toString(), and then parses the result as markup, as a last resort.

QE Notes: The same problem as SDK-17847 exists in FxTextArea, But this will be fixed as part of my next commit, not this one.
Doc Notes: None
Bugs: SDK-17847
Reviewer: Deepa

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -513,7 +513,7 @@
             }
             else
             {
-                throw new Error("invalid content");
+                textFlow = createTextFlowFromMarkup(_content.toString());
             }
             textInvalid = true;
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4960
Author:   gosmith@adobe.com
Date:     2009-02-14T02:23:27.721068Z

Log Message:
-----------
Decreased the number of Gumbo style buckets.

Combined AdvancedCharacterFormatTextStyles.as, AdvancedParagraphFormatTextStyles.as, and AdvancedContainerFormatTextStyles.as into AdvancedTextLayoutFormatStyles.as.

Combined BasicCharacterFormatTextStyles.as, BasicParagraphFormatTextStyles.as, and BasicContainerFormatTextStyles.as into BasicTextLayoutFormatStyles.as.

The reason for doing this is that TLF combined its CharacterFormat, ParagraphFormat, and ContainerFormat classes into a single TextLayoutFormat.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: None; no functional change

Modified Paths:
--------------
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/AdvancedCharacterFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/BasicContainerFormatTextStyles.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/AdvancedParagraphFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/BasicCharacterFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/AdvancedTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/BasicParagraphFormatTextStyles.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/AdvancedContainerFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/BasicTextLayoutFormatStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -30,12 +30,8 @@
 import mx.managers.IFocusManagerComponent;
 import flash.display.InteractiveObject;

-include "../styles/metadata/AdvancedCharacterFormatTextStyles.as"
-include "../styles/metadata/AdvancedContainerFormatTextStyles.as"
-include "../styles/metadata/AdvancedParagraphFormatTextStyles.as"
-include "../styles/metadata/BasicCharacterFormatTextStyles.as"
-include "../styles/metadata/BasicContainerFormatTextStyles.as"
-include "../styles/metadata/BasicParagraphFormatTextStyles.as"
+include "../styles/metadata/AdvancedTextLayoutFormatStyles.as"
+include "../styles/metadata/BasicTextLayoutFormatStyles.as"
 include "../styles/metadata/SelectionFormatTextStyles.as"

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 20398
Author:   jszeto@adobe.com
Date:     2011-02-19T00:01:17.270135Z

Log Message:
-----------
TextArea and Scroller interaction bug fixes

http://bugs.adobe.com/jira/browse/SDK-29577 - TextArea does not autoscroll(cursor disappers) if TA height is specified
http://bugs.adobe.com/jira/browse/SDK-29572 - TextArea no longer scrolls to the end when calling appendText().

Restored the logic in TextAreaSkin for the case when the caret was at the end of the text. This ensures we call validateNow to resize the Group before setting the scroll position.

- Added support for devices that don't support soft keyboard

Changed caretBoundsEventHandler to always call ensureElementBoundsIsVisible unless we captured a softKeyboard activate event.

- Fixed caret position auto scroll bug

Fixed logic to compare the dimensions of the scrollable area and the element instead of comparing the top and bottom bounds.

QE notes: none
Doc notes: none
Bugs: SDK-29577, SDK-29572
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<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/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -756,6 +756,11 @@
      */
     private var lastFocusedElementCaretBounds:Rectangle;

+    /**
+     *  @private
+     */
+    private var captureNextCaretBoundsChange:Boolean = false;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -1880,6 +1885,9 @@
         {
             addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,
                 softKeyboardActivateHandler, false,
+                EventPriority.DEFAULT, true);
+            addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,
+                softKeyboardActivateCaptureHandler, true,
                 EventPriority.DEFAULT, true);
             addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,
                 softKeyboardDeactivateHandler, false,
@@ -2627,8 +2635,25 @@

     /**
      *  @private
-     *  Called when the soft keyboard is activated. Tells the top level
-     *  application to resize itself
+     *  Called when the soft keyboard is activated.
+     *
+     *  There are three use cases for Scroller and text component interaction
+     *
+     *  A. Pressing a TextInput to open up the soft keyboard
+     *  B. Pressing in the middle of a TextArea to open up the soft keyboard
+     *  C. Pressing in a text component on a device that doesn't support soft keyboard
+     *
+     *  For use case A, lastFocusedElementCaretBounds is never set, so we just
+     *  call ensureElementIsVisible on the TextInput
+     *
+     *  For use case B, we first get a softKeyboard active event in the
+     *  capture phase. We then receive a caretBoundsChange event from the
+     *  TextArea skin. We store the bounds in lastFocusedElementCaretBounds
+     *  and use that value in the call to ensureElementPositionIsVisible in
+     *  the softKeyboard activate bubble phase.
+     *
+     *  For use case C, we never receive a soft keyboard activate event, so
+     *  we just listen for caretBoundsChange.
      */
     private function softKeyboardActivateHandler(event:SoftKeyboardEvent):void
     {
@@ -2662,6 +2687,22 @@
     }

     /**
+     *  @private
+     *  Listen for softKeyboard activate in the capture phase so we know if
+     *  we need to delay calling ensureElementPositionIsVisible if we get
+     *  a caretBoundsChange event
+     */
+    private function softKeyboardActivateCaptureHandler(event:SoftKeyboardEvent):void
+    {
+        var keyboardRect:Rectangle = stage.softKeyboardRect;
+
+        if (keyboardRect.width > 0 && keyboardRect.height > 0)
+        {
+            captureNextCaretBoundsChange = true;
+        }
+    }
+
+    /**
      *  @private
      *  Called when the soft keyboard is deactivated. Tells the top level
      *  application to resize itself and fix the scroll position if necessary
@@ -2690,23 +2731,26 @@

     /**
      *  @private
+     *
+     *  If we just received a softKeyboardActivate event in the capture phase,
+     *  we will wait until the bubble phase to call ensureElementPositionIsVisible
+     *  For now, store the caret bounds to be used.
      */
     private function caretBoundsChangeHandler(event:CaretBoundsChangeEvent):void
     {
         if (event.isDefaultPrevented())
             return;

-        // If the soft keyboard is not up yet, then just store the caretBounds
-        // It will be used in the softKeyboardActivateHandler
-        if (!isNaN(oldSoftKeyboardHeight))
-        {
-            ensureElementPositionIsVisible(lastFocusedElement, event.newCaretBounds, false);
-            event.preventDefault();
-        }
-
-        lastFocusedElementCaretBounds = event.newCaretBounds;
-
-
+        event.preventDefault();
+
+        if (captureNextCaretBoundsChange)
+        {
+            lastFocusedElementCaretBounds = event.newCaretBounds;
+            captureNextCaretBoundsChange = false;
+            return;
+        }
+
+        ensureElementPositionIsVisible(lastFocusedElement, event.newCaretBounds, false);
     }
 }


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@1258857 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/controls/ProgressBarMode.as
+++ frameworks/projects/framework/src/mx/controls/ProgressBarMode.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 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.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 5647
Author:   pfarland@adobe.com
Date:     2009-03-27T13:59:54.760468Z

Log Message:
-----------
Fixing programmatic usages of 'mx.components' to the spark equivalent after the rename.

Also fixing calls to StyleManager.getStyleDeclaration() that use an unqualified type name. Type selectors should be referenced via fully qualified ActionScript class names at runtime. When compatibility version is set to 3, getStyleDeclaration will remove the package name to match type selectors in the legacy unqualified manner.

QE: This fixes bug SDK-20253, and potentially a few other edge cases like the CursorManager RTE.
Doc: No
Checkintests: Pass

Bugs:
SDK-20253 - [rename_work] Spark RadioButton and CheckBox focus ring now highlights the label of the RadioButton

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/FocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/printing/FlexPrintJob.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/halo/src/mx/skins/halo/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/haloclassic/src/haloclassic/BusyCursor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/BusyCursor.as</path>

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

--- frameworks/projects/framework/src/mx/managers/DragManagerImpl.as
+++ frameworks/projects/framework/src/mx/managers/DragManagerImpl.as
@@ -278,7 +278,7 @@
 		{
 			// No drag image specified, use default
 			var dragManagerStyleDeclaration:CSSStyleDeclaration =
-				StyleManager.getStyleDeclaration("DragManager");
+				StyleManager.getStyleDeclaration("mx.managers.DragManager");
 			var dragImageClass:Class =
 				dragManagerStyleDeclaration.getStyle("defaultDragImageSkin");
 			dragImage = new dragImageClass();


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@1273866 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/messaging/management/MBeanInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/management/MBeanInfo.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.messaging.management
 {