Transferred from the Adobe Open Source Subversion Repository

Revision: 20644
Author:   mhorn@adobe.com
Date:     2011-03-07T18:49:20.181589Z

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledActionButtonSkin.as</path>
<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/TabbedViewNavigatorTabBarFirstTabSkin.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/TabbedViewNavigatorTabBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.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/ViewMenuSkin.mxml</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/TransparentNavigationButtonSkin.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/TabbedViewNavigatorTabBarLastTabSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewMenuItemSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonBarButtonClassFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.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/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/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.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/HScrollBarThumbSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/BeveledBackButtonSkin.as
@@ -164,6 +164,9 @@
         }
     }

+    /**
+     *  @private
+     */
     override protected function drawBackground(unscaledWidth:Number, unscaledHeight:Number):void
     {
         // omit call to super.drawBackground(), apply tint instead and don't draw fill


Transferred from the Adobe Open Source Subversion Repository

Revision: 18699
Author:   smgilson@adobe.com
Date:     2010-11-18T15:27:25.899689Z

Log Message:
-----------
ASDoc updates for DataGrid

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
@@ -44,7 +44,7 @@
 public interface IGridItemRenderer extends IDataRenderer, IVisualElement
 {
     /**
-     *  The zero-based index of the row being edited.
+     *  The zero-based index of the row being rendered.
      *  That means that values are 0, 1, 2, ... , n - 1,
      *  where n is the total number of rows.
      *
@@ -149,9 +149,8 @@
     function set showsCaret(value:Boolean):void;

     /**
-     *  The zero-based index of the column being edited.
-     *  That means that values are 0, 1, 2, ... , n - 1,
-     *  where n is the total number of columns.
+     *  The GridColumn object representing the column
+     *  associated with this item renderer.
      *
      *
This property is set by the item renderer owner by its
      *  updateDisplayList() method.


Transferred from the Adobe Open Source Subversion Repository

Revision: 17466
Author:   rfrishbe@adobe.com
Date:     2010-08-24T19:58:32.424056Z

Log Message:
-----------
Fixing up logic for Scroller determining when it can scroll horizontally and/or vertically.  This code has moved in to ScrollerLayout(), and the properties are now set in ScorllerLayout.udl() rather than trying to directly calculate it in another method.

QE notes: None
Doc notes: None
Bugs: SDK-27368
Reviewer: Hans
Tests run: checkintests
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -32,10 +32,36 @@
  */
 public class ScrollerLayout extends LayoutBase
 {
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  SDT - Scrollbar Display Threshold.  If the content size exceeds the
+     *  viewport's size by SDT, then we show a scrollbar.  For example, if the
+     *  contentWidth >= viewport width + SDT, show the horizontal scrollbar.
+     */
+    mx_internal static const SDT:Number = 1.0;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
     public function ScrollerLayout()
     {
         super();
     }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------

     /**
      *  @private
@@ -67,6 +93,52 @@
         if (((cw == 0) && (ch == 0)) || (isNaN(cw) || isNaN(ch)))
             return new Point(0,0);
         return MatrixUtil.transformSize(cw, ch, viewport.getLayoutMatrix());
+    }
+
+    //----------------------------------
+    //  canScrollHorizontally
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _canScrollHorizontally:Boolean;
+
+    /**
+     *  @private
+     *  Helper function to determine whether the viewport scrolls horizontally.
+     *
+     *
This is used for touch scrolling purposes to
+     *  determine if one can scroll horizontally.

+     *
+     *
The value is set in updateDisplayList()

+     */
+    mx_internal function get canScrollHorizontally():Boolean
+    {
+        return _canScrollHorizontally;
+    }
+
+    //----------------------------------
+    //  canScrollVertically
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _canScrollVertically:Boolean;
+
+    /**
+     *  @private
+     *  Helper function to determine whether the viewport scrolls vertically.
+     *
+     *
This is used for touch scrolling purposes to
+     *  determine if one can scroll vertically.

+     *
+     *
The value is set in updateDisplayList()

+     */
+    mx_internal function get canScrollVertically():Boolean
+    {
+        return _canScrollVertically;
     }

     //----------------------------------
@@ -238,7 +310,13 @@
         var vsb:ScrollBarBase = getScroller().verticalScrollBar;
         return (w >= vsb.getPreferredBoundsWidth()) && (h >= vsb.getMinBoundsHeight());
     }
-
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overidden Methods
+    //
+    //--------------------------------------------------------------------------
+
     /**
      * @private
      *  Computes the union of the preferred size of the visible scrollbars
@@ -313,8 +391,8 @@
                 var viewportPreferredW:Number =  viewport.getPreferredBoundsWidth();
                 var viewportContentW:Number = contentSize.x;
                 var viewportW:Number = viewport.getLayoutBoundsWidth();  // "current" size
-                var currentSizeNoHSB:Boolean = !isNaN(viewportW) && ((viewportW + Scroller.SDT) > viewportContentW);
-                if (hAuto && !showHSB && ((viewportPreferredW + Scroller.SDT) <= viewportContentW) && currentSizeNoHSB)
+                var currentSizeNoHSB:Boolean = !isNaN(viewportW) && ((viewportW + SDT) > viewportContentW);
+                if (hAuto && !showHSB && ((viewportPreferredW + SDT) <= viewportContentW) && currentSizeNoHSB)
                     measuredW += viewportW;
                 else
                     measuredW += Math.max(viewportPreferredW, (showHSB) ? hsb.getMinBoundsWidth() : 0);
@@ -322,8 +400,8 @@
                 var viewportPreferredH:Number = viewport.getPreferredBoundsHeight();
                 var viewportContentH:Number = contentSize.y;
                 var viewportH:Number = viewport.getLayoutBoundsHeight();  // "current" size
-                var currentSizeNoVSB:Boolean = !isNaN(viewportH) && ((viewportH + Scroller.SDT) > viewportContentH);
-                if (vAuto && !showVSB && ((viewportPreferredH + Scroller.SDT) <= viewportContentH) && currentSizeNoVSB)
+                var currentSizeNoVSB:Boolean = !isNaN(viewportH) && ((viewportH + SDT) > viewportContentH);
+                if (vAuto && !showVSB && ((viewportPreferredH + SDT) <= viewportContentH) && currentSizeNoVSB)
                     measuredH += viewportH;
                 else
                     measuredH += Math.max(viewportPreferredH, (showVSB) ? vsb.getMinBoundsHeight() : 0);
@@ -422,13 +500,14 @@
                 if (hsb && viewport)
                 {
                     hAuto = true;
-                    hsbVisible = (contentW >= (viewportW + Scroller.SDT));
+                    hsbVisible = (contentW >= (viewportW + SDT));
                 }
                 break;

             default:
                 hsbVisible = false;
         }
+        _canScrollHorizontally = hsbVisible;

         var vAuto:Boolean = false;
         var vsbTakeUpSpace:Boolean = true; // if visible
@@ -442,13 +521,14 @@
                 if (vsb && viewport)
                 {
                     vAuto = true;
-                    vsbVisible = (contentH >= (viewportH + Scroller.SDT));
+                    vsbVisible = (contentH >= (viewportH + SDT));
                 }
                 break;

             default:
                 vsbVisible = false;
         }
+        _canScrollVertically = vsbVisible;

         // if in touch mode, only show scrollbars if a scroll is currently in progress
         if (scroller.getStyle("interactionMode") == InteractionMode.TOUCH)
@@ -479,10 +559,10 @@
         var hsbIsDependent:Boolean = false;
         var vsbIsDependent:Boolean = false;

-        if (vsbVisible && !hsbVisible && hAuto && (contentW >= (viewportW + Scroller.SDT)))
-            hsbVisible = hsbIsDependent = true;
-        else if (!vsbVisible && hsbVisible && vAuto && (contentH >= (viewportH + Scroller.SDT)))
-            vsbVisible = vsbIsDependent = true;
+        if (vsbVisible && !hsbVisible && hAuto && (contentW >= (viewportW + SDT)))
+            hsbVisible = hsbIsDependent = _canScrollHorizontally = true;
+        else if (!vsbVisible && hsbVisible && vAuto && (contentH >= (viewportH + SDT)))
+            vsbVisible = vsbIsDependent = _canScrollVertically = true;

         // If the HSB doesn't fit, hide it and give the space back.   Likewise for VSB.
         // If both scrollbars are supposed to be visible but they don't both fit,
@@ -533,6 +613,14 @@
         else if (vsbVisible && vsbTakeUpSpace && !vsbFits(w, h))  // just trying to show VSB, but it doesn't fit
             vsbVisible = false;

+        // if the only reason for showing one particular scrollbar was because the
+        // other scrollbar was visible, and we're now not showing the other scrollbar,
+        // then there's no need to allow scrolling in that direction anymore.
+        if (hsbIsDependent && !vsbVisible)
+            _canScrollHorizontally = false;
+        if (vsbIsDependent && !hsbVisible)
+            _canScrollVertically = false;
+
         // Reset the viewport's width,height to account for the visible scrollbars, unless
         // the viewport's size was explicitly set, then we just use that.


Transferred from the Adobe Open Source Subversion Repository

Revision: 14571
Author:   deeptika@adobe.com
Date:     2010-03-04T07:17:40.283901Z

Log Message:
-----------
Merging revision 14570 from 4.x branch
QE notes:
Doc notes:
Bugs:
Reviewer:
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/delegates/core/UIComponentAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_air/src/mx/automation/delegates/controls/FlexNativeMenuAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/delegates/controls/SWFLoaderAutomationImpl.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/tabularData/SparkListBaseTabularData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/mx/automation/delegates/core/UIFTETextFieldAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/delegates/core/UITextFieldAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkDropDownListBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_dmv/src/mx/automation/delegates/advancedDataGrid/AdvancedDataGridAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkListBaseAutomationImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/tabularData/OLAPDataGridTabularData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/codec/RendererPropertyCodec.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/delegates/TextFieldAutomationHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/automation/src/mx/automation/codec/AutomationObjectPropertyCodec.as</path>

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

--- frameworks/projects/automation_air/src/mx/automation/delegates/controls/FlexNativeMenuAutomationImpl.as
+++ frameworks/projects/automation_air/src/mx/automation/delegates/controls/FlexNativeMenuAutomationImpl.as
@@ -20,6 +20,7 @@
 	import flash.events.EventDispatcher;

 	import mx.automation.Automation;
+	import mx.automation.AutomationConstants;
 	import mx.automation.IAutomationManager;
 	import mx.automation.IAutomationObject;
 	import mx.automation.events.AutomationFlexNativeMenuEvent;
@@ -156,7 +157,8 @@
 		 */
 		public function set automationDelegate(value:Object):void
 		{
-			trace("Invalid setter function call. Should have been called on the component");
+			Automation.automationDebugTracer.traceMessage("FlexNativeMenuAutomationImpl", "set automationDelegate()",
+				AutomationConstants.invalidDelegateMethodCall);
 		}

 		/**
@@ -164,7 +166,8 @@
 		 */
 		public function get automationDelegate():Object
 		{
-			trace("Invalid getter function call. Should have been called on the component");
+			Automation.automationDebugTracer.traceMessage("FlexNativeMenuAutomationImpl", "get automationDelegate()",
+				AutomationConstants.invalidDelegateMethodCall);
 			return this;
 		}

@@ -287,7 +290,8 @@
 		 */
 		public function get showInAutomationHierarchy():Boolean
 		{
-			trace("Reading should not be done here");
+			Automation.automationDebugTracer.traceMessage("FlexNativeMenuAutomationImpl", "get showInAutomationHierarchy()",
+				AutomationConstants.invalidDelegateMethodCall);
 			return true;
 		}

@@ -296,7 +300,8 @@
 		 */
 		public function set showInAutomationHierarchy(value:Boolean):void
 		{
-			trace("Setting should not be done here");
+			Automation.automationDebugTracer.traceMessage("FlexNativeMenuAutomationImpl", "set showInAutomationHierarchy()",
+				AutomationConstants.invalidDelegateMethodCall);
 			if(menu is IAutomationObject)
 				IAutomationObject(menu).showInAutomationHierarchy = value;
 		}
@@ -522,7 +527,6 @@
 		protected function menuShowHandler(event:FlexNativeMenuEvent):void
 		{
 			var am:IAutomationManager = Automation.automationManager;
-			trace("In show");
 			if (am && am.recording)
 			{
 				var automatedEvent:AutomationFlexNativeMenuEvent = new AutomationFlexNativeMenuEvent(AutomationFlexNativeMenuEvent.MENU_SHOW);


Transferred from the Adobe Open Source Subversion Repository

Revision: 21441
Author:   deeptika@adobe.com
Date:     2011-06-23T05:51:57.289491Z

Log Message:
-----------
Fetching itemRenderer so that it gets instantiated and doesn't get purged in same run.

QE notes:
Doc notes:
Bugs: FLEXDMV-2577 (AdvancedDataGrid crash with rowHeight is set and editable=true)
Reviewer: Sameer
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as

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

--- frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
+++ frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as
@@ -6281,6 +6281,8 @@
         if (itemsNeedMeasurement)
         {
             itemsNeedMeasurement = false;
+			// fetch the itemRenderer so that it gets initialized
+			var obj:Object = itemRenderer;
             if (isNaN(explicitRowHeight))
             {
                 if (iterator && columns.length > 0)
@@ -6319,11 +6321,6 @@
                 else
                     setRowHeight(20);
             }
-			else
-			{
-				// fetch the itemRenderer so that it gets initialized
-				var obj:Object = itemRenderer;
-			}
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18295
Author:   cframpto@adobe.com
Date:     2010-10-22T20:55:39.284343Z

Log Message:
-----------
Tweak previous commit.  Attempt to preserve "singleCell" or "singleRow" selection when the dataProvider is reset.  This usually means either the dataProvider source has changed or all items have been removed from the dataProvider.  It is possible that the selected item is in the new source, and if so, preserve the selection.

QE notes: to test
Doc notes:
Bugs:
Reviewer:  Hans
Tests run: cyclone
Is noteworthy for integration: yes - DataGrid preserveSelection supported just for "singleRow" and "singleCell" selection modes

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as
@@ -1337,40 +1337,46 @@
      *  The sort or filter on the collection changed.
      */
     private function dataProviderCollectionRefresh(event:CollectionEvent):void
-    {
-        // Not preserving selection so this is similiar to a RESET.
-        if (!selectedItem)
-        {
-            removeSelection();
-            ensureRequiredSelection();
-            return;
-        }
-
+    {
+        handleRefreshAndReset(event);
+    }
+
+    /**
+     *  @private
+     *  If preserving the selection and the selected item is in the new view,
+     *  keep the item selected.  Otherwise, clear the selection (or maintain one
+     *  if requireSelection is true), including the selectAllFlag if it is set.
+     */
+    private function handleRefreshAndReset(event:CollectionEvent):void
+    {
         // Is the selectedItem still in the collection?
-        const view:ICollectionView = event.currentTarget as ICollectionView;
-        if (view && view.contains(selectedItem))
-        {
-            // Selection is in view so move it to the new row location.
-            const newRowIndex:int = grid.dataProvider.getItemIndex(selectedItem);
-            if (selectionMode == GridSelectionMode.SINGLE_ROW)
-            {
-                internalSetCellRegion(newRowIndex);
-            }
-            else
-            {
-                var oldSelectedCell:CellPosition = allCells()[0];
-                internalSetCellRegion(newRowIndex, oldSelectedCell.columnIndex);
-            }
-        }
-        else
-        {
-            // Selection not in current view so remove selection.
-            removeSelection();
-            ensureRequiredSelection();
-            return;
-        }
-    }
-
+        if (selectedItem)
+        {
+            const view:ICollectionView = event.currentTarget as ICollectionView;
+            if (view && view.contains(selectedItem))
+            {
+                // Selection is in view so move it to the new row location.
+                const newRowIndex:int = grid.dataProvider.getItemIndex(selectedItem);
+                if (selectionMode == GridSelectionMode.SINGLE_ROW)
+                {
+                    internalSetCellRegion(newRowIndex);
+                }
+                else
+                {
+                    var oldSelectedCell:CellPosition = allCells()[0];
+                    internalSetCellRegion(newRowIndex, oldSelectedCell.columnIndex);
+                }
+                return;
+            }
+        }
+
+        // Not preserving selection or selection not in current view so remove
+        // selection.
+        removeSelection();
+        ensureRequiredSelection();
+        return;
+    }
+
     /**
      *  @private
      *  An item has been removed from the collection.
@@ -1432,13 +1438,13 @@

     /**
      *  @private
-     *  The data source changed so don't preserve the selection.  Clear the
-     *  selectAll flag if set.
+     *  The data source changed or all the items were removed from the data
+     *  source.  If there is a preserved selected item and it is in the new
+     *  data source the selection will be maintained.
      */
     private function dataProviderCollectionReset(event:CollectionEvent):void
-    {
-        removeSelection();
-        ensureRequiredSelection();
+    {
+        handleRefreshAndReset(event);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11984
Author:   jimurphy@adobe.com
Date:     2009-11-19T15:30:34.821822Z

Log Message:
-----------
Merged 3.x revisions 11672,11898,11927,11952 -> trunk
........
  r11672 | clucier@adobe.com | 2009-11-11 17:07:26 -0500 (Wed, 11 Nov 2009) | 10 lines

  Bugs: SDK-23661
........
  r11898 | clucier@adobe.com | 2009-11-17 12:38:44 -0500 (Tue, 17 Nov 2009) | 10 lines

  Bugs: SDK-22721
........
  r11927 | clucier@adobe.com | 2009-11-18 08:42:28 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-16241
........
  r11952 | clucier@adobe.com | 2009-11-18 15:42:08 -0500 (Wed, 18 Nov 2009) | 10 lines

  Bugs: SDK-15988
........

The majority of files in this change list are svn property changes - removing the svn:mergeinfo property

The following paths are the actual changes from 3.x that were merged:
frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
frameworks/projects/framework/src/mx/formatters/NumberFormatter.as
frameworks/projects/framework/src/mx/formatters/NumberBase.as
frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as
frameworks/projects/framework/src/mx/controls/ColorPicker.as

Modified Paths:
--------------
127 paths were modified

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

--- frameworks/projects/framework/src/mx/formatters/NumberFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/NumberFormatter.as
@@ -584,6 +584,12 @@
         var isNegative:Boolean = (Number(value) < 0);

         var numStr:String = value.toString();
+
+        numStr.toLowerCase();
+        var e:int = numStr.indexOf("e");
+        if (e != -1)  //deal with exponents
+            numStr = dataFormatter.expandExponents(numStr);
+
         var numArrTemp:Array = numStr.split(".");
         var numFraction:int = numArrTemp[1] ? String(numArrTemp[1]).length : 0;


Transferred from the Adobe Open Source Subversion Repository

Revision: 22511
Author:   aharui@adobe.com
Date:     2011-09-12T20:44:56.540693Z

Log Message:
-----------
Prevent memory leaks from CSSStyleDeclarations.  Clear the prototype after creating each step in the chain.  The prototype can reference a factory in an MXML instance.

Clearing the prototype is deemed safe by the VM guys.

QE notes: none
Doc notes: none
Bugs: SDK-30550
Reviewer: Glenn
Tests run: Mustella Cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as

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

--- frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
+++ frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as
@@ -931,6 +931,7 @@
                 };
                 emptyObjectFactory.prototype = chain;
                 chain = new emptyObjectFactory();
+                emptyObjectFactory.prototype = null;
             }

             nodeAddedToChain = true;
@@ -961,6 +962,7 @@

             defaultFactory.prototype = chain;
             chain = new defaultFactory();
+            defaultFactory.prototype = null;

             if (filterMap)
                 chain = applyFilter(originalChain, chain, filterMap);
@@ -990,6 +992,7 @@
             objectFactory = new factory();
             factory.prototype = chain;
             chain = new factory();
+            factory.prototype = null;
         }

         // If someone has called setStyle() on this CSSStyleDeclaration,
@@ -1007,6 +1010,7 @@
                 };
                 emptyObjectFactory.prototype = chain;
                 chain = new emptyObjectFactory();
+                emptyObjectFactory.prototype = null;
             }

             for (var p:String in overrides)
@@ -1045,6 +1049,7 @@
         };
         filterObjectFactory.prototype = originalChain;
         filteredChain = new filterObjectFactory();
+        filterObjectFactory.prototype = null;

         for (var i:String in chain)
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4857
Author:   cframpto@adobe.com
Date:     2009-02-05T16:57:23.111917Z

Log Message:
-----------
Tweak rev 4670 so that the cursor for focusSelectionFormat is black, not the selection color.

QE Notes:
Doc Notes:
Bugs: SDK-19106
Reviewers: will be Gordon

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -1584,9 +1584,10 @@
             selectionVisibility == TextSelectionVisibility.ALWAYS ?
             1.0 : 0.0;

+        // The cursor is black.
         interactionManager.focusSelectionFormat = new SelectionFormat(
             selectionColor, 1.0, BlendMode.NORMAL,
-            selectionColor, 1.0, BlendMode.NORMAL);
+            0x000000, 1.0, BlendMode.NORMAL);

         interactionManager.noFocusSelectionFormat = new SelectionFormat(
             unfocusedSelectionColor, unfocusedAlpha, BlendMode.NORMAL,