Transferred from the Adobe Open Source Subversion Repository

Revision: 6404
Author:   rfrishbe@adobe.com
Date:     2009-04-30T00:34:09.399480Z

Log Message:
-----------
Finishing up VideoPlayer/VideoElement. Added support for streaming videos and fixed a few of the bugs.  Added the skins from XD.  These still need a little tweaking, and I'll go over them with XD. For the skins, I had to add some new sub-components, like the VideoPlayerVolumeBar and VideoPlayScrubBar.

Also added 3 new events for TrackBase (thumbDrag, thumbPress, thumbRelease).  These were in Halo's Slider, and I needed them for the VideoPlayerScrubBar.

Also fixed some other bugs, like needing to call removeDynamicPartInstance() on the Slider when the dataTip is removed.  Also fixed a bug around alternatingItemsColor for ItemRenderer.

QE Notes: -
Doc Notes: -
Bugs: SDK-19486, SDK-20105, SDK-20789
Reviewer: Glenn, Jason
tests: checkintests, some mustella tests were failing, but seemed like random 1 pixel differences in DropDownList.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBarMuteButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerPlayPauseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarMuteButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/StreamItem.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarMuteButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarThumbSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarThumbSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/VideoElement.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HSlider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/StreamingVideoSource.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarThumbSkin.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerMuteButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenScrubBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerScrubBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VSlider.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenFullScreenButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenPlayPauseButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/templates/swfobject/index.template.html</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerScrubBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.as
+++ frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.as
@@ -0,0 +1,258 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+
+package spark.components
+{
+
+import flash.display.DisplayObject;
+import flash.display.DisplayObjectContainer;
+import flash.display.InteractiveObject;
+import flash.events.Event;
+
+import mx.core.IVisualElement;
+
+/**
+ *  The VideoScrubBar class is a video scrubbar/timeline that can show the
+ *  current playHead, the amount previously played, and the buffered video.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
+ */
+public class VideoPlayerScrubBar extends HSlider
+{
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function VideoPlayerScrubBar()
+    {
+        super();
+
+        dataTipFormatFunction = formatTimeValue;
+    }
+
+    protected function formatTimeValue(value:Number):String
+    {
+        // default format: hours:minutes:seconds
+        var hours:uint = Math.floor(value/3600) % 24;
+        var minutes:uint = Math.floor(value/60) % 60;
+        var seconds:uint = Math.round(value) % 60;
+
+        var result:String = "";
+        if (hours != 0)
+            result = hours + ":";
+
+        if (result && minutes < 10)
+            result += "0" + minutes + ":";
+        else
+            result += minutes + ":";
+
+        if (seconds < 10)
+            result += "0" + seconds;
+        else
+            result += seconds;
+
+        return result;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Skin Parts
+    //
+    //--------------------------------------------------------------------------
+
+    [SkinPart(required="false")]
+
+    /**
+     *  An optional skin part for the area on the track
+     *  representing the video that's been played.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var playedArea:IVisualElement;
+
+    [SkinPart(required="false")]
+
+    /**
+     *  An optional skin part for the area on the track
+     *  representing the buffered video.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var bufferedArea:IVisualElement;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------
+
+    private var tempTrackSize:Number = NaN;
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //---------------------------------
+    // bufferedValue
+    //---------------------------------
+
+    private var _bufferedValue:Number;
+
+    /**
+     *  The value of the video that's been buferred in.  This property
+     *  should be greater than value and less than maximum.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get bufferedValue():Number
+    {
+        return _bufferedValue;
+    }
+
+    /**
+     *  @private
+     */
+    public function set bufferedValue(value:Number):void
+    {
+        if (value == _bufferedValue)
+            return;
+
+        _bufferedValue = value;
+        invalidateDisplayList();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function partAdded(partName:String, instance:Object):void
+    {
+        super.partAdded(partName, instance);
+
+        if (instance == playedArea)
+        {
+            if (playedArea is InteractiveObject)
+                InteractiveObject(playedArea).mouseEnabled = false;
+            if (playedArea is DisplayObjectContainer)
+                DisplayObjectContainer(playedArea).mouseChildren = false;
+
+            invalidateDisplayList();
+        }
+        else if (instance == bufferedArea)
+        {
+            if (bufferedArea is InteractiveObject)
+                InteractiveObject(bufferedArea).mouseEnabled = false;
+            if (bufferedArea is DisplayObjectContainer)
+                DisplayObjectContainer(bufferedArea).mouseChildren = false;
+
+            invalidateDisplayList();
+        }
+        else if (instance == track)
+        {
+            tempTrackSize = NaN;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    override protected function updateDisplayList(unscaledWidth:Number,
+                                                  unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        sizeBufferedArea(valueToPosition(bufferedValue) + thumbSize);
+        sizePlayedArea(valueToPosition(value) + thumbSize);
+    }
+
+    /**
+     *  @private
+     *  Force the component to set itself up correctly now that the
+     *  track is completely loaded.
+     */
+    override protected function track_updateCompleteHandler(event:Event):void
+    {
+        super.track_updateCompleteHandler(event);
+
+        //TODO: Consider the case where the track moves (like the move
+        //effect). Perhaps this handler should run every time...
+        if (trackSize != tempTrackSize)
+        {
+            sizeBufferedArea(valueToPosition(bufferedValue) + thumbSize);
+            sizePlayedArea(valueToPosition(value) + thumbSize);
+            tempTrackSize = trackSize;
+        }
+    }
+
+    /**
+     *  Sets the size of the buffered area
+     *
+     *  @param bufferedAreaSize The new size of the buffered area
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function sizeBufferedArea(bufferedAreaSize:Number):void
+    {
+        if (bufferedArea)
+            DisplayObject(bufferedArea).width = Math.round(bufferedAreaSize);
+    }
+
+    /**
+     *  Sets the size of the played area
+     *
+     *  @param playedAreaSize The new size of the played area
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function sizePlayedArea(playedAreaSize:Number):void
+    {
+        if (playedArea)
+            DisplayObject(playedArea).width = Math.round(playedAreaSize);
+    }
+}
+}


added getXRange() getYRange()

added getXRange() getYRange()

--- WeaveJS/src/weavejs/geom/Bounds2D.as
+++ WeaveJS/src/weavejs/geom/Bounds2D.as
@@ -564,6 +564,16 @@
 			xMax += xOffset;
 			yMin += yOffset;
 			yMax += yOffset;
+		}
+
+		public function getXRange():/*/[number, number]/*/Array
+		{
+			return [xMin, xMax];
+		}
+
+		public function getYRange():/*/[number, number]/*/Array
+		{
+			return [yMin, yMax];
 		}

 		public function setXRange(xMin:Number, xMax:Number):void


Fixed crash bug in WeaveProperties validator function.

Change-Id: Ie6322af40e176e2458034f860b8de4a54e25c75e

--- WeaveUI/src/weave/WeaveProperties.as
+++ WeaveUI/src/weave/WeaveProperties.as
@@ -81,7 +81,7 @@
 		private function verifyAlpha(value:Number):Boolean { return 0 <= value && value <= 1; }
 		private function verifyWindowSnapGridSize(value:String):Boolean
 		{
-			if (value.substr(-1) == '%')
+			if (value && value.substr(-1) == '%')
 				return StandardLib.asNumber(value.substr(0, -1)) > 0;
 			return StandardLib.asNumber(value) >= 1;
 		}


FLEX-33741 stop propagation of escape key when drop down is shown

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -2647,11 +2647,12 @@
         }
         else if (event.keyCode == Keyboard.ESCAPE)
         {
-            if (showingDropdown)
+            if (showingDropdown) {
                 selectedDate = lastSelectedDate;
-            displayDropdown(false, event);
-			if (!editable)
-           		event.stopPropagation();
+            	displayDropdown(false, event);
+				if (!editable)
+           			event.stopPropagation();
+			}
         }
         else if (event.keyCode == Keyboard.ENTER)
         {


Check for input focus before applying camera presets in editor. Closes #81.

--- Bin/Data/Scripts/Editor/EditorUI.as
+++ Bin/Data/Scripts/Editor/EditorUI.as
@@ -1085,7 +1085,7 @@
     else if (key == KEY_F4)
         ToggleOctreeDebug();

-    else if (key == KEY_NUMPAD1) // Front view
+    else if (key == KEY_NUMPAD1 && ui.focusElement is null) // Front view
     {
         Vector3 pos = cameraNode.position;
         pos.z = -pos.length * viewDirection;
@@ -1096,7 +1096,7 @@
         ReacquireCameraYawPitch();
     }

-    else if (key == KEY_NUMPAD3) // Side view
+    else if (key == KEY_NUMPAD3 && ui.focusElement is null) // Side view
     {
         Vector3 pos = cameraNode.position;
         pos.x = pos.length * viewDirection;
@@ -1107,7 +1107,7 @@
         ReacquireCameraYawPitch();
     }

-    else if (key == KEY_NUMPAD7) // Top view
+    else if (key == KEY_NUMPAD7 && ui.focusElement is null) // Top view
     {
         Vector3 pos = cameraNode.position;
         pos.y = pos.length * viewDirection;


Fix sort error in Emitter3D

Fix sort error in Emitter3D

--- src/org/flintparticles/threeD/emitters/Emitter3D.as
+++ src/org/flintparticles/threeD/emitters/Emitter3D.as
@@ -156,8 +156,13 @@
 		override protected function initParticle( particle:Particle ):void
 		{
 			var p:Particle3D = Particle3D( particle );
-			p.position = _position.clone();
-			p.rotation = _rotation.clone();
+			p.position.x = _position.x;
+			p.position.y = _position.y;
+			p.position.z = _position.z;
+			p.rotation.w = _rotation.w;
+			p.rotation.x = _rotation.x;
+			p.rotation.y = _rotation.y;
+			p.rotation.z = _rotation.z;
 		}

 		/**
@@ -170,7 +175,7 @@
 		{
 			if( spaceSort )
 			{
-				_particles.sortOn( "x", Array.NUMERIC );
+				_particles.sort( sortOnX );
 				var len:int = _particles.length;
 				for( var i:int = 0; i < len; ++i )
 				{
@@ -178,5 +183,10 @@
 				}
 			}
 		}
+
+		private function sortOnX( p1:Particle3D, p2:Particle3D ):int
+		{
+			return p1.position.x - p2.position.x;
+		}
 	}
 }


fixed compiler warning

fixed compiler warning

--- WeaveCore/src/weave/core/LinkableFunction.as
+++ WeaveCore/src/weave/core/LinkableFunction.as
@@ -297,7 +297,7 @@
 				indent++;
 			for (var i:int = 0; i < lines.length; i++)
 			{
-				var line:String = lines[i];
+				line = lines[i];
 				var t:int = 0;
 				var spaces:String = '';
 				while (line.charAt(t) == '\t')


Transferred from the Adobe Open Source Subversion Repository

Revision: 8207
Author:   smgilson@adobe.com
Date:     2009-06-24T22:55:28.494485Z

Log Message:
-----------
Fix ASDoc version tags

QE Notes: None
Doc Notes: None
Bugs: -

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RectangularDropShadow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/DropDownEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/events/TrackBaseEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -566,7 +566,7 @@
      *
      *  @langversion 3.0
      *  @playerversion AIR 1.5
-     *  @productversion Flex 3
+     *  @productversion Flex 4
      */
     [SkinPart (required="false")]
     public var statusText:TextGraphicElement;


Transferred from the Adobe Open Source Subversion Repository

Revision: 18296
Author:   jszeto@adobe.com
Date:     2010-10-22T22:37:53.945787Z

Log Message:
-----------
ViewMenu features and bug fixes

Changed ViewMenuLayout to place all the smaller rows at the top instead of alternating. Implemented the proper keyboard
navigation.

SDK-28292 - Pressing the Menu button when there are no ViewMenuItems for a View shows an empty menu

Pressing the Menu button will now be ignored in this situation

SDK-28162 - No events when ViewMenu is opened or closed

Added private events viewMenuOpen and viewMenuClose on View. These are undocumented and not meant for public usage.

SDK-28135 - ViewMenuItem size is incorrect if defined in AS and icon is used

Problem is due to the icon not getting fully loaded by the time the ViewMenu is measured and positioned. The solution is to reposition the ViewMenu on a resize.

SDK-28111 - ViewMenu 5-way navigation does not respond to up-down move

Implemented proper keyboard navigation.

SDK-28066 - ViewMenu is closed when clicking on the disabled item

Disabled items no longer respond to click, SPACE key or 5-way press.

SDK-28063 - ViewMenu can have one item in caret state and another one in down state

Once the user presses on the ViewMenu, the caret is cleared and the menu ignores any 5-way navigation.

QE notes: Shouldn't be any visual changes in this submission
Doc notes: None
Bugs: SDK-28292, SDK-28162, SDK-28135, SDK-28111, SDK-28066, SDK-28063
Reviewer:
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/layouts/ViewMenuLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileApplicationBase.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/layouts/ViewMenuLayout.as
+++ frameworks/projects/mobilecomponents/src/spark/layouts/ViewMenuLayout.as
@@ -73,6 +73,8 @@
         super();
     }

+    private var numColsInRow:Array;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -226,6 +228,8 @@
         if (!layoutTarget)
             return;

+        numColsInRow = [];
+
         var xPos:Number = 0;
         var yPos:Number = 0;
         var itemIndex:int = 0;
@@ -236,15 +240,16 @@
         var numRows:int = Math.ceil(numItems / requestedMaxColumnCount);
         var numColumns:int = Math.ceil(numItems / numRows);
         // Calculate the number of empty spots by getting the inverse of the column mod
-        var emptySpots:int = (numItems % numColumns) > 0 ? numColumns - numItems % numColumns : 0;
-        // Figure out whether the first row has more or fewer items. Default is fewer.
-        var useMaxColumns:Boolean = (numRows % 2 == 1) ? Math.floor(numRows / 2) == emptySpots: false;
+        var emptySpots:int = (numItems % numColumns) > 0 ? numColumns - numItems % numColumns : 0;

         for (var rowIndex:int = 0; rowIndex < numRows; rowIndex++)
         {
-            var currentRowColumns:int = (emptySpots > 0) && !useMaxColumns ? numColumns - 1 : numColumns;
+            var currentRowColumns:int = (emptySpots > 0) ? numColumns - 1 : numColumns;
             var viewWidth:Number = width - (currentRowColumns - 1) * horizontalGap;
             var w:Number = itemW = Math.floor(viewWidth / currentRowColumns);
+
+            numColsInRow.push(currentRowColumns);
+
             // Keep track of the extra pixels since we round off the item widths
             extraWidth = Math.round(viewWidth - w * currentRowColumns);

@@ -270,7 +275,6 @@
             yPos += rowHeight + verticalGap;

             numItems -= currentRowColumns;
-            useMaxColumns = !useMaxColumns;

             emptySpots = (numItems % numColumns) > 0 ? numColumns - numItems % numColumns : 0;
         }
@@ -281,34 +285,87 @@
      */
     override public function getNavigationDestinationIndex(currentIndex:int, navigationUnit:uint, arrowKeysWrapFocus:Boolean):int
     {
-        // TODO (jszeto) Currently we just support LEFT/RIGHT. Need to add logic for UP/DOWN/PGUP/PGDN
         if (!target || target.numElements < 1)
             return -1;

         var maxIndex:int = target.numElements - 1;
-        var newIndex:int;
+        var newIndex:int = 0;
+        var numRows:int = Math.ceil(target.numElements / requestedMaxColumnCount);

         if (currentIndex == -1)
         {
-            if (navigationUnit == NavigationUnit.LEFT)
-                return maxIndex;
-            else if (navigationUnit == NavigationUnit.RIGHT)
+            if (navigationUnit == NavigationUnit.RIGHT || navigationUnit == NavigationUnit.DOWN)
                 return 0;
-        }
-
-        if (navigationUnit == NavigationUnit.LEFT)
-            newIndex = currentIndex - 1;
-        else if (navigationUnit == NavigationUnit.RIGHT)
-            newIndex = currentIndex + 1;
-        else
-            return currentIndex;
+            else
+                return -1;
+        }
+
+        var currentRow:int = getRowForIndex(currentIndex);
+        var currentColCount:int;
+        var newColCount:int;
+
+        if (navigationUnit == NavigationUnit.LEFT ||
+            navigationUnit == NavigationUnit.RIGHT)
+
+        {
+            newIndex = currentIndex + (navigationUnit == NavigationUnit.LEFT ? -1 : 1);
+
+            // We don't support wrapping, so if the old and new index are
+            // on different rows, then don't change the index.
+            if (getRowForIndex(newIndex) != currentRow)
+                newIndex = currentIndex;
+        }
+        else if (navigationUnit == NavigationUnit.UP)
+        {
+            if (currentRow == 0)
+                return currentIndex;
+
+            currentColCount = numColsInRow[currentRow];
+            newColCount = numColsInRow[currentRow - 1];
+
+            newIndex = currentIndex - newColCount;
+
+            // If the newIndex isn't on the previous row, then we need to shift
+            // it back one more spot. This situation only occurs when the
+            // number of columns in the two rows are different
+            if ((getRowForIndex(newIndex) != currentRow - 1) && (currentColCount != newColCount))
+            {
+                newIndex--;
+            }
+        }
+        else if (navigationUnit == NavigationUnit.DOWN)
+        {
+            if (currentRow == numRows - 1)
+                return currentIndex;
+
+            // Assumes that the smaller column rows are always above the larger column rows
+            newIndex = currentIndex + numColsInRow[currentRow];
+        }

         if (newIndex > maxIndex)
+            newIndex = maxIndex;
+        else if (newIndex < 0)
             newIndex = 0;
-        else if (newIndex < 0)
-            newIndex = maxIndex;

         return newIndex;
+    }
+
+    // Helper function that figures out the row of a particular index
+    private function getRowForIndex(index:int):int
+    {
+        var currentRow:int = 0;
+
+        while (currentRow < numColsInRow.length)
+        {
+            index -= numColsInRow[currentRow];
+
+            if (index >= 0)
+                currentRow++;
+            else
+                break;
+        }
+
+        return currentRow;
     }

     // Helper function


Transferred from the Adobe Open Source Subversion Repository

Revision: 3450
Author:   rfrishbe@adobe.com
Date:     2008-10-02T04:54:40.265411Z

Log Message:
-----------
Couple of changes to Group and DataGroup:

1.  Got rid of content_changing, content_changed, dataProvider_changing, and dataProvider_changed events.  The events both group and datagroup emit are the item add and item remove events.  Fixed up Selector, DataComponent, and ItemsComponent to not key off of these events anymore.

2.  Clean up Group's canShareDisplayObject from the blendMode change

3.  Fix up DataGroup to deal with a case where a GraphicElement's itemRenderer's group was holding on to the display object.  When the graphic element was pushed into another itemRenderer, we tried to remove the graphic element's display object from its parent, but calling removeChild() on a Group RTE's.  We need to revisit the fix here, and possibly add methods for removing display objects to Group, or don't RTE in Group on removeChild/addChild, or add some code so itemRenderer's can clean themselves up afterwards...at any rate, this fix will be revisited.

QE: Yes
Doc: Yes - event removed
Bugs: SDK-17135
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/DataComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ItemsComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -21,16 +21,6 @@
 import mx.core.IFactory;
 import mx.managers.IFocusManagerContainer;

-/**
- *  Dispatched prior to the dataProvider being changed.
- */
-[Event(name="dataProviderChanging", type="flex.events.FlexEvent")]
-
-/**
- *  Dispatched after the dataProvider has changed.
- */
-[Event(name="dataProviderChanged", type="flex.events.FlexEvent")]
-
 [DefaultProperty("dataProvider")]

 /**
@@ -83,7 +73,7 @@
 	//  content
 	//----------------------------------

-	private var _dataProvider:*;
+	private var _dataProvider:IList;

 	/**
 	 *  @copy flex.core.DataGroup#dataProvider
@@ -205,7 +195,7 @@
 	{
 		if (instance == dataGroup)
 		{
-			if (_dataProvider != undefined)
+			if (_dataProvider != null)
 			{
 				dataGroup.dataProvider = _dataProvider;
 			}
@@ -216,46 +206,8 @@
 				dataGroup.itemRenderer = _itemRenderer;
 				dataGroup.itemRendererFunction = _itemRendererFunction;
 			}
-
-			dataGroup.addEventListener(
-			    FlexEvent.DATA_PROVIDER_CHANGING, dataGroup_dataProviderChangingHandler);
-			dataGroup.addEventListener(
-			    FlexEvent.DATA_PROVIDER_CHANGED, dataGroup_dataProviderChangedHandler);
 		}
 	}
-
-	/**
-	 *  Called when a skin part is removed.
-	 */
-	override protected function partRemoved(partName:String, instance:Object):void
-	{
-		if (instance == dataGroup)
-		{
-			dataGroup.removeEventListener(
-			    FlexEvent.DATA_PROVIDER_CHANGING, dataGroup_dataProviderChangingHandler);
-			dataGroup.removeEventListener(
-			    FlexEvent.DATA_PROVIDER_CHANGED, dataGroup_dataProviderChangedHandler);
-		}
-	}
-
-
-	//--------------------------------------------------------------------------
-	//
-	//  Event Handlers
-	//
-	//--------------------------------------------------------------------------
-
-	private function dataGroup_dataProviderChangingHandler(event:FlexEvent):void
-	{
-		// Re-dispatch the event
-		dispatchEvent(event);
-	}
-
-	private function dataGroup_dataProviderChangedHandler(event:FlexEvent):void
-	{
-		// Re-dispatch the event
-		dispatchEvent(event);
-	}
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4958
Author:   rfrishbe@adobe.com
Date:     2009-02-13T23:07:46.243121Z

Log Message:
-----------
Change the initialization sequence of FxComponent and Group.  Basically now children (including the skin) should get created at createChildren() time and follow the correct lifecycle pattern.  Unfortunately, this change got mingled in with all my PARB changes, so I'm submitting a bunch of PARB changes for Group, DataGroup, FxContainer, and FxDataContainer, outlined below:

1.     New event classes/names for Group/FxContainer and DataGroup ("elementAdd" and "elementRemove" event of type ElementExistenceEvent for Group/FxContainer and "rendererAdd" and "rendererRemove" event of type RendererExistenceEvent for DataGroup). It was just one event class of ItemExistenceChangedEvent before.
2.     LayoutBase.clipContent->clipAndEnableScrolling (same with IViewport.clipContent and GroupBase.clipContent)
3.     GroupBase.getLayoutELementAt()->getElementAt()
4.     GroupBase.numLayoutElements -> numElements.
5.     LayoutBase.virtualLayout -> useVirtualLayout
6.     ScrollUnit constants are now changed to be uints instead of typed as ScrollUnit.  This means the signature for getHorizontalScrollPositionDelta(unit:ScrollUnit):Number has changed to getHorizontalScrollPositionDelta(scrollUnit:uint):Number (and ditto for getVerticalScrollPositionDelta())
7.  DataGroup.getRendererForItemAt() -> getElementAt()
8.  DataGroup.getItemIndexForRenderer() -> getElementIndex()

Other changes:
 - Change IVisualElement interface so that it's smaller now.  It also extends ILayoutElement now.  The properties removed from IVisualElement are: rotation, rotationX, rotationY, rotationZ, transformX, transformY, offsets, x, y, z, scaleX, scaleY, scaleZ, explicitWidth, explicitMinWidth, explicitMaxWidth, explicitHeight, explicitMinHeight, explicitMaxHeight)
-  Fix in DataGroup so we don’t remove/add elements if we’re gonna do it later anyways.  I also need to do some other work in here around cleaning up of renderers.
- AddItems fix around handling IVisualElementContainers more effeciently
- get mxmlContent now returns a copy of the Array rather than the one we're using internally
- Had to update mustella since there was special case logic for dealing with getLayoutElementAt().  I added this logic for getElementAt(), which replaces that method.

QE Notes: Thanks for changing all the tests and working on the cyclone
Doc Notes: Made some ASDoc changes to some core classes to move the comments into the interfaces.  I did update the comments a bit as well.
Bugs: SDK-18115, SDK-19004
Reviewer: Jason, Glenn, Hans for initialization sequence change and Hans for all PARB changes
tests: checkintests, all mustella tests

Modified Paths:
--------------
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as" copyfrom-rev="4812" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ElementExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/layouts/WheelLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/RendererExistenceEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/ItemExistenceChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ScrollUnit.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/states/AddItems.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/mustella/mustella.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.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/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -17,29 +17,11 @@
 import mx.components.baseClasses.FxContainerBase;
 import mx.core.IFactory;
 import mx.core.IViewport;
-import mx.core.ScrollUnit;
 import mx.events.FlexEvent;
-import mx.events.ItemExistenceChangedEvent;
 import mx.events.PropertyChangeEvent;
 import mx.layout.LayoutBase;
 import mx.managers.IFocusManagerContainer;
 import mx.utils.BitFlagUtil;
-
-/**
- *  Dispatched when an item is added to the content holder.
- *  event.
- *
- *  @eventType mx.events.ItemExistenceChangedEvent.ITEM_ADD
- */
-[Event(name="itemAdd", type="mx.events.ItemExistenceChangedEvent")]
-
-/**
- *  Dispatched when an item is removed from the content holder.
- *  event.
- *
- *  @eventType mx.events.ItemExistenceChangedEvent.ITEM_REMOVE
- */
-[Event(name="itemRemove", type="mx.events.ItemExistenceChangedEvent")]

 include "../styles/metadata/BasicCharacterFormatTextStyles.as"
 include "../styles/metadata/BasicContainerFormatTextStyles.as"
@@ -73,7 +55,7 @@
     /**
      *  @private
      */
-    private static const CLIP_CONTENT_PROPERTY_FLAG:uint = 1 << 0;
+    private static const CLIP_AND_ENABLE_SCROLLING_PROPERTY_FLAG:uint = 1 << 0;

     /**
      *  @private
@@ -167,32 +149,32 @@
     //--------------------------------------------------------------------------

     //----------------------------------
-    //  clipContent
-    //----------------------------------
-
-    /**
-     *  @inheritDoc
-     */
-    public function get clipContent():Boolean
-    {
-        return (dataGroup)
-            ? dataGroup.clipContent
-            : dataGroupProperties.clipContent;
-    }
-
-    /**
-     *  @private
-     */
-    public function set clipContent(value:Boolean):void
+    //  clipAndEnableScrolling
+    //----------------------------------
+
+    /**
+     *  @inheritDoc
+     */
+    public function get clipAndEnableScrolling():Boolean
+    {
+        return (dataGroup)
+            ? dataGroup.clipAndEnableScrolling
+            : dataGroupProperties.clipAndEnableScrolling;
+    }
+
+    /**
+     *  @private
+     */
+    public function set clipAndEnableScrolling(value:Boolean):void
     {
         if (dataGroup)
         {
-            dataGroup.clipContent = value;
-            dataGroupProperties = BitFlagUtil.update(dataGroupProperties as uint,
-                                                     CLIP_CONTENT_PROPERTY_FLAG, true);
-        }
-        else
-            dataGroupProperties.clipContent = value;
+            dataGroup.clipAndEnableScrolling = value;
+            dataGroupProperties = BitFlagUtil.update(dataGroupProperties as uint,
+                                                     CLIP_AND_ENABLE_SCROLLING_PROPERTY_FLAG, true);
+        }
+        else
+            dataGroupProperties.clipAndEnableScrolling = value;
     }

     //----------------------------------
@@ -416,19 +398,19 @@
     /**
      *  @inheritDoc
      */
-    public function getHorizontalScrollPositionDelta(unit:ScrollUnit):Number
+    public function getHorizontalScrollPositionDelta(scrollUnit:uint):Number
     {
         return (dataGroup) ?
-            dataGroup.getHorizontalScrollPositionDelta(unit) : 0;
-    }
-
-    /**
-     *  @inheritDoc
-     */
-    public function getVerticalScrollPositionDelta(unit:ScrollUnit):Number
+            dataGroup.getHorizontalScrollPositionDelta(scrollUnit) : 0;
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function getVerticalScrollPositionDelta(scrollUnit:uint):Number
     {
         return (dataGroup) ?
-            dataGroup.getVerticalScrollPositionDelta(unit) : 0;
+            dataGroup.getVerticalScrollPositionDelta(scrollUnit) : 0;
     }

     //--------------------------------------------------------------------------
@@ -448,11 +430,11 @@

             var newDataGroupProperties:uint = 0;

-            if (dataGroupProperties.clipContent !== undefined)
-            {
-                dataGroup.clipContent = dataGroupProperties.clipContent;
-                newDataGroupProperties = BitFlagUtil.update(newDataGroupProperties as uint,
-                                                            CLIP_CONTENT_PROPERTY_FLAG, true);
+            if (dataGroupProperties.clipAndEnableScrolling !== undefined)
+            {
+                dataGroup.clipAndEnableScrolling = dataGroupProperties.clipAndEnableScrolling;
+                newDataGroupProperties = BitFlagUtil.update(newDataGroupProperties as uint,
+                                                            CLIP_AND_ENABLE_SCROLLING_PROPERTY_FLAG, true);
             }

             if (dataGroupProperties.layout !== undefined)
@@ -499,10 +481,6 @@

             dataGroupProperties = newDataGroupProperties;

-            dataGroup.addEventListener(
-                ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddedHandler);
-            dataGroup.addEventListener(
-                ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemovedHandler);
             dataGroup.addEventListener(
                 PropertyChangeEvent.PROPERTY_CHANGE, dataGroup_propertyChangeHandler);
         }
@@ -513,18 +491,14 @@
         if (instance == dataGroup)
         {
             dataGroup.removeEventListener(
-                ItemExistenceChangedEvent.ITEM_ADD, dataGroup_itemAddedHandler);
-            dataGroup.removeEventListener(
-                ItemExistenceChangedEvent.ITEM_REMOVE, dataGroup_itemRemovedHandler);
-            dataGroup.removeEventListener(
                 PropertyChangeEvent.PROPERTY_CHANGE, dataGroup_propertyChangeHandler);

             // copy proxied values from dataGroup (if explicitely set) to dataGroupProperties

             var newDataGroupProperties:Object = {};

-            if (BitFlagUtil.isSet(dataGroupProperties as uint, CLIP_CONTENT_PROPERTY_FLAG))
-                newDataGroupProperties.clipContent = dataGroup.clipContent;
+            if (BitFlagUtil.isSet(dataGroupProperties as uint, CLIP_AND_ENABLE_SCROLLING_PROPERTY_FLAG))
+                newDataGroupProperties.clipAndEnableScrolling = dataGroup.clipAndEnableScrolling;

             if (BitFlagUtil.isSet(dataGroupProperties as uint, LAYOUT_PROPERTY_FLAG))
                 newDataGroupProperties.layout = dataGroup.layout;
@@ -556,18 +530,6 @@
     //
     //--------------------------------------------------------------------------

-    private function dataGroup_itemAddedHandler(event:ItemExistenceChangedEvent):void
-    {
-        // Re-dispatch the event
-        dispatchEvent(event);
-    }
-
-    private function dataGroup_itemRemovedHandler(event:ItemExistenceChangedEvent):void
-    {
-        // Re-dispatch the event
-        dispatchEvent(event);
-    }
-
    /**
     * @private
     */


Transferred from the Adobe Open Source Subversion Repository

Revision: 18586
Author:   hmuller@adobe.com
Date:     2010-11-15T18:58:09.086468Z

Log Message:
-----------
Added GridLayout/clampColumnWidth()  to apply GridColumn minWidth, maxWidth.   Now using it in updateTypcialCellSizes().

QE notes:
Doc notes:
Bugs: SDK-28109
Reviewer: Kevin
Tests run: checkin, mustella
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -564,6 +564,23 @@
 	//  Updating the GridDimensions' typicalCell sizes and columnWidths
 	//
 	//--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Return width clamped to the column's minWidth and maxWidth properties.
+     */
+    private static function clampColumnWidth(width:Number, column:GridColumn):Number
+    {
+       const minColumnWidth:Number = column.minWidth;
+       const maxColumnWidth:Number = column.maxWidth;
+
+       if (!isNaN(minColumnWidth))
+           width = Math.max(width, minColumnWidth);
+       if (!isNaN(maxColumnWidth))
+           width = Math.min(width, maxColumnWidth);
+
+       return width;
+    }

     /**
 	 *  @private
@@ -654,7 +671,7 @@
                 var renderer:IGridItemRenderer = createTypicalItemRenderer(columnIndex);
                 if (isNaN(cellWidth))
                 {
-                    cellWidth = renderer.getPreferredBoundsWidth();
+                    cellWidth = clampColumnWidth(renderer.getPreferredBoundsWidth(), column);
                     gridDimensions.setTypicalCellWidth(columnIndex, cellWidth);
                 }
                 if (isNaN(cellHeight))
@@ -715,7 +732,7 @@
                 var renderer:IGridItemRenderer = createTypicalItemRenderer(columnIndex);
                 if (isNaN(cellWidth))
                 {
-                    cellWidth = renderer.getPreferredBoundsWidth();
+                    cellWidth = clampColumnWidth(renderer.getPreferredBoundsWidth(), column);
                     gridDimensions.setTypicalCellWidth(columnIndex, cellWidth);
                 }
                 if (isNaN(cellHeight))
@@ -769,15 +786,7 @@
             if (isNaN(gridColumn.width)) // if this column's width wasn't explicitly specified
             {
                 flexibleColumnCount += 1;
-
-                // Clamp columnWidth to the gridColumn's min,maxWidth
-
-                var minColumnWidth:Number = gridColumn.minWidth;
-                var maxColumnWidth:Number = gridColumn.maxWidth;
-                if (!isNaN(minColumnWidth))
-                    columnWidth = Math.max(columnWidth, minColumnWidth);
-                if (!isNaN(maxColumnWidth))
-                    columnWidth = Math.min(columnWidth, maxColumnWidth);
+                columnWidth = clampColumnWidth(columnWidth, gridColumn);
             }
             else
                 columnWidth = gridColumn.width;
@@ -808,14 +817,7 @@
             {
                 var oldColumnWidth:Number = gridDimensions.getColumnWidth(columnIndex);
                 columnWidth = oldColumnWidth + Math.min(availableWidth, columnWidthDelta);
-
-                minColumnWidth = gridColumn.minWidth;
-                maxColumnWidth = gridColumn.maxWidth;
-                if (!isNaN(minColumnWidth))
-                    columnWidth = Math.max(columnWidth, minColumnWidth);
-                if (!isNaN(maxColumnWidth))
-                    columnWidth = Math.min(columnWidth, maxColumnWidth);
-
+                columnWidth = clampColumnWidth(columnWidth, gridColumn);
                 gridDimensions.setColumnWidth(columnIndex, columnWidth);  // store the column width
                 availableWidth -= (columnWidth - oldColumnWidth);
             }


Added workaround for ExternalInterface not escaping backslash.

--- WeaveAPI/src/weave/api/WeaveAPI.as
+++ WeaveAPI/src/weave/api/WeaveAPI.as
@@ -212,9 +212,9 @@
 				{
 					var instance:Object = getSingletonInstance(theInterface);
 					var classInfo:Object = describeTypeJSON(theInterface, DescribeType.INCLUDE_TRAITS | DescribeType.INCLUDE_METHODS | DescribeType.HIDE_NSURI_METHODS | DescribeType.USE_ITRAITS);
-					// add a callback for each external interface function
+					// register each external interface function
 					for each (var methodInfo:Object in classInfo.traits.methods)
-						generateExternalInterfaceCallback(instance, methodInfo);
+						new ExternalMethod(instance, methodInfo);
 				}

 				var prev:Boolean = ExternalInterface.marshallExceptions;
@@ -303,8 +303,9 @@

 			// Try to get the JSON interface - if not available, settle with the flawed ExternalInterface.call() parameters feature.
 			// If a parameter is an Object, we can't trust ExternalInterface.call() since it doesn't quote keys in object literals.
-			// For example, if you give {"Content-Type": "foo"} as a parameter, ExternalInterface generates the following invalid
-			// object literal: {Content-Type: "foo"}.
+			// It also does not escape the backslash in String values.
+			// For example, if you give {"Content-Type": "foo\\"} as a parameter, ExternalInterface generates the following invalid
+			// object literal: {Content-Type: "foo\"}.
 			try {
 				json = getDefinitionByName("JSON");
 			} catch (e:Error) { }
@@ -342,6 +343,9 @@
 			// concatenate all code inside a function wrapper
 			code = 'function(' + pNames.join(',') + '){\n' + code + '}';

+			// work around bug where ExternalInterface does not escape backslash.
+			code = code.split('\\').join('\\\\');
+
 			// if there are no parameters, just run the code
 			if (pNames.length == 0)
 				return ExternalInterface.call(code);
@@ -358,26 +362,6 @@
 			else
 				ErrorManager.reportError(e);
 		}
-
-		/**
-		 * @private
-		 */
-		private static function generateExternalInterfaceCallback(instance:Object, methodInfo:Object):void
-		{
-			var method:Function = instance[methodInfo.name] as Function;
-			// find the number of required parameters
-			var paramCount:int = 0;
-			while (paramCount < method.length && !methodInfo.parameters[paramCount].optional)
-				paramCount++;
-			function callback(...args):*
-			{
-				if (args.length < paramCount)
-					args.length = paramCount;
-				return method.apply(null, args);
-			}
-			ExternalInterface.addCallback(methodInfo.name, callback);
-		}
-

 		/**************************************/

@@ -551,8 +535,182 @@
 		 */
 		public static function externalTrace(...params):void
 		{
-			params.unshift('console.log');
-			ExternalInterface.call.apply(null, params);
+			executeJavaScript(
+				{"params": params},
+				"console.log.apply(console, params)"
+			);
 		}
 	}
 }
+
+import flash.external.ExternalInterface;
+import flash.utils.getDefinitionByName;
+
+import mx.utils.UIDUtil;
+
+import weave.api.WeaveAPI;
+
+internal class ExternalMethod
+{
+	/**
+	 * A pointer to JSON.
+	 */
+	private static var json:Object;
+
+	private static var stringify:Function;
+
+	/**
+	 * Maps a method name to the corresponding ExternalMethod object.
+	 */
+	private static const registeredMethods:Object = {};
+
+	/**
+	 * This is the name of the generic external interface function which uses JSON.stringify().
+	 */
+	public static const JSON_CALL:String = "_jsonCall";
+
+	/**
+	 * Used as the second parameter to JSON.stringify
+	 */
+	public static const JSON_REPLACER:String = "_jsonReplacer";
+
+	/**
+	 * Used as the second parameter to JSON.parse
+	 */
+	public static const JSON_REVIVER:String = "_jsonReviver";
+
+	private static const JSON_SUFFIX:String = ';' + UIDUtil.createUID();
+
+	private static const NOT_A_NUMBER:String = NaN + JSON_SUFFIX;
+	private static const UNDEFINED:String = undefined + JSON_SUFFIX;
+	private static const INFINITY:String = Infinity + JSON_SUFFIX;
+	private static const NEGATIVE_INFINITY:String = -Infinity + JSON_SUFFIX;
+
+	/**
+	 * Handles a JavaScript request.
+	 * @param methodName The name of the method to call.
+	 * @param paramsJson An Array of parameters to pass to the method, stringified with JSON.
+	 * @return The result of calling the method, stringified with JSON.
+	 */
+	private static function handleJsonCall(methodName:String, paramsJson:String):String
+	{
+		var em:ExternalMethod = registeredMethods[methodName];
+		if (!em)
+			throw new Error("No such method: " + methodName);
+
+		var params:Array = json.parse(paramsJson, _jsonReviver);
+		if (params.length < em.paramCount)
+			params.length = em.paramCount;
+		var result:* = em.method.apply(null, params);
+		var resultJson:String = json.stringify(result, _jsonReplacer);
+
+		// work around bug where ExternalInterface does not escape backslash.
+		resultJson = resultJson.split('\\').join('\\\\');
+
+		return resultJson;
+	}
+
+	private static function _jsonReplacer(key:String, value:*):*
+	{
+		if (value === undefined)
+			return UNDEFINED;
+		if (typeof value != 'number' || isFinite(value))
+			return value;
+		if (value == Infinity)
+			return INFINITY;
+		if (value == -Infinity)
+			return NEGATIVE_INFINITY;
+		return NOT_A_NUMBER;
+	}
+
+	private static function _jsonReviver(key:String, value:*):*
+	{
+		if (value === NOT_A_NUMBER)
+			return NaN;
+		if (value === UNDEFINED)
+			return undefined;
+		if (value === INFINITY)
+			return Infinity;
+		if (value === NEGATIVE_INFINITY)
+			return -Infinity;
+		return value;
+	}
+
+	/**
+	 * @param host The host object containing the method.
+	 * @param methodInfo Metadata from describeTypeJSON()
+	 */
+	public function ExternalMethod(host:Object, methodInfo:Object)
+	{
+		if (!json)
+		{
+			// one-time external initialization
+			json = getDefinitionByName("JSON");
+			ExternalInterface.addCallback(JSON_CALL, handleJsonCall);
+			WeaveAPI.executeJavaScript(
+				{
+					"JSON_REPLACER": JSON_REPLACER,
+					"JSON_REVIVER": JSON_REVIVER,
+					"NOT_A_NUMBER": NOT_A_NUMBER,
+					"UNDEFINED": UNDEFINED,
+					"INFINITY": INFINITY,
+					"NEGATIVE_INFINITY": NEGATIVE_INFINITY
+				},
+				"weave[JSON_REPLACER] = function(key, value){",
+				"    if (value === undefined)",
+				"        return UNDEFINED;",
+				"    if (typeof value != 'number' || isFinite(value))",
+				"        return value;",
+				"    if (value == Infinity)",
+				"        return INFINITY;",
+				"    if (value == -Infinity)",
+				"        return NEGATIVE_INFINITY;",
+				"    return NOT_A_NUMBER;",
+				"};",
+				"weave[JSON_REVIVER] = function(key, value){",
+				"    if (value === NOT_A_NUMBER)",
+				"        return NaN;",
+				"    if (value === UNDEFINED)",
+				"        return undefined;",
+				"    if (value === INFINITY)",
+				"        return Infinity;",
+				"    if (value === NEGATIVE_INFINITY)",
+				"        return -Infinity;",
+				"    return value;",
+				"};"
+			);
+		}
+
+		var name:String = methodInfo.name;
+		method = host[name];
+		// find the number of required parameters
+		paramCount = 0;
+		while (paramCount < method.length && !methodInfo.parameters[paramCount].optional)
+			paramCount++;
+
+		WeaveAPI.executeJavaScript(
+			{
+				"JSON_CALL": JSON_CALL,
+				"JSON_REPLACER": JSON_REPLACER,
+				"JSON_REVIVER": JSON_REVIVER,
+				"methodName": name,
+				"paramCount": paramCount
+			},
+			"weave[methodName] = function(){",
+			"    var params = new Array(paramCount);",
+			"    for (var i in arguments)",
+			"        params[i] = arguments[i];",
+			"    var paramsJson = JSON.stringify(params, weave[JSON_REPLACER]);",
+			"    //console.log('input:', methodName, paramsJson);",
+			"    var resultJson = weave[JSON_CALL](methodName, paramsJson);",
+			"    //console.log('output:', resultJson);",
+			"    return JSON.parse(resultJson, weave[JSON_REVIVER]);",
+			"}"
+		);
+
+		registeredMethods[name] = this;
+	}
+
+	public var method:Function;
+	public var paramCount:int;
+}


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

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

 package mx.collections
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/series/items/BubbleSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/BubbleSeriesItem.as
@@ -0,0 +1,285 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.series.items
+{
+
+import mx.charts.ChartItem;
+import mx.charts.series.BubbleSeries;
+import mx.graphics.IFill;
+
+/**
+ *  Represents the information required to render an item as part of a BubbleSeries. The BubbleSeries class passes these items to its itemRenderer when rendering.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class BubbleSeriesItem extends ChartItem
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  @param  element The owning series.
+     *  @param  data    The item from the dataProvider that this ChartItem represents.
+     *  @param  index   The index of the item from the series's dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function BubbleSeriesItem(element:BubbleSeries = null,
+                                     data:Object = null, index:uint = 0)
+    {
+        super(element, data, index);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    // fill
+    //----------------------------------
+    [Inspectable(environment="none")]
+
+    /**
+     *  Holds the fill color of the item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+     public var fill:IFill;
+
+    //----------------------------------
+    //  x
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var x:Number;
+
+    //----------------------------------
+    //  xFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, filtered against the horizontal axis of the containing chart. This value is NaN if the value lies outside the axis' range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xFilter:Number;
+
+    //----------------------------------
+    //  xNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, converted to a number by the horizontal axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xNumber:Number;
+
+    //----------------------------------
+    //  xValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xValue:Object;
+
+    //----------------------------------
+    //  y
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var y:Number;
+
+    //----------------------------------
+    //  yFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yFilter:Number;
+
+    //----------------------------------
+    //  yNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yNumber:Number;
+
+    //----------------------------------
+    //  yValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The y value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var yValue:Object;
+
+    //----------------------------------
+    //  z
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The z value of this item converted into a pixel-based radius.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var z:Number;
+
+    //----------------------------------
+    //  zFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The z value of this item, filtered against the radius axis of the containing chart. This value is NaN if the value lies outside the axis' range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var zFilter:Number;
+
+    //----------------------------------
+    //  zNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The z value of this item, converted to a number by the radius axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var zNumber:Number;
+
+    //----------------------------------
+    //  zValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The z value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var zValue:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Returns a copy of this ChartItem.
+     */
+    override public function clone():ChartItem
+    {
+        var result:BubbleSeriesItem = new BubbleSeriesItem(BubbleSeries(element),item,index);
+        result.itemRenderer = itemRenderer;
+        return result;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 12952
Author:   cframpto@adobe.com
Date:     2009-12-15T14:38:06.277941Z

Log Message:
-----------
Remove two FIXMEs and fix a comment.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -187,8 +187,7 @@

     /**
      *  @private
-	 *  The TextLines and Shapes created to render the text.
-	 *  (Shapes are used to render the backgroundColor format.)
+	 *  The TextLines created to render the text.
      */
     mx_internal var textLines:Vector.<DisplayObject> =
     	new Vector.<DisplayObject>();


Updated the asdoc comments for assert functions

--- FlexUnit4/src/org/flexunit/Assert.as
+++ FlexUnit4/src/org/flexunit/Assert.as
@@ -46,6 +46,7 @@
 			return _assertCount;
 		}

+
 		/**
 		 * Resets the count for the number of assertions that have been made back to zero
 		 */
@@ -64,8 +65,11 @@
 		}

 		/**
-		 * Asserts that two provided values are equal. If three values are
-		 * provided the first is the message to be displayed on fail.
+		 * Asserts that two provided values are equal.
+		 *
+		 * @param rest
+		 * 			a comma-delimited list of arguments with possible length of 3.
+		 * 			If the length is three the first item is used as the error message.
 		 */
 		public static function assertEquals(... rest):void
 		{
@@ -86,7 +90,12 @@
 		}

 		/**
+		 * /**
 		 * Asserts that the provided values are strictly equal.
+		 *
+		 * @param rest
+		 * 			a comma-delimited list of arguments with possible length of 3.
+		 * 			If the length is three the first item is used as the error message.
 		 */
 		public static function assertStrictlyEquals(... rest):void
 		{
@@ -111,9 +120,8 @@
 		 *  AssertionFailedError with the given message.
 		 *
 		 * @param rest
-		 * 			array of length one or two. Contains the value to be
-		 * 			tested. If the length is two the first index contains
-		 * 			the error message to be thrown.
+		 * 			a comma-delimited list of arguments of length one or two.
+		 * 			If the length is two the first item is used as the error message.
 		 */
 		public static function assertTrue(... rest):void
 		{
@@ -138,9 +146,8 @@
 		 *  AssertionFailedError with the given message.
 		 *
 		 * @param rest
-		 * 			array of length one or two. Contains the value to be
-		 * 			tested. If length is two the first index contains
-		 * 			the error message to be thrown.
+		 * 			a comma-delimited list of arguments of length one or two.
+		 * 			If the length is two the first item is used as the error message.
 		 */
 		public static function assertFalse(... rest):void
 		{
@@ -166,9 +173,8 @@
 		 * is thrown with the given message.
 		 *
 		 * @param rest
-		 * 			array of length one or two. Contains the Object to be
-		 * 			null checked. If the length is two the first index contains
-		 *          the identifying message for the  AssertionFailedError
+		 * 			a comma-delimited list of arguments of length one or two.
+		 * 			If the length is two the first item is used as the AssertionFailedError message.
 		 * 			(null okay)
 		 */
 		public static function assertNull(... rest):void
@@ -195,9 +201,8 @@
 		 * thrown with the given message.
 		 *
 		 * @param rest
-		 * 			array of length one or two. Contains the Object to be
-		 * 			null checked. If length is two the first index contains
-		 * 			the identifying message for the  AssertionFailedError
+		 * 			a comma-delimited list of arguments of length one or two.
+		 * 			If the length is two the first item is used as the AssertionFailedError message.
 		 * 			(null okay)
 		 */
 		public static function assertNotNull(... rest):void


Fix null exception in multiple nodes duplication. Closes #632.

--- bin/Data/Scripts/Editor/EditorScene.as
+++ bin/Data/Scripts/Editor/EditorScene.as
@@ -653,7 +653,7 @@
     {
         XMLElement rootElem = sceneCopyBuffer[i].root;
         String mode = rootElem.name;
-        if (mode == "component")
+        if (mode == "component" && editNode !is null)
         {
             // If this is the root node, do not allow to create duplicate scene-global components
             if (editNode is editorScene && CheckForExistingGlobalComponent(editNode, rootElem.GetAttribute("type")))
@@ -685,7 +685,7 @@
                 // If we are duplicating, paste into the selected nodes parent
                 if (duplication)
                 {
-                    if (editNode.parent !is null)
+                    if (editNode !is null && editNode.parent !is null)
                         newNode = editNode.parent.CreateChild("", rootElem.GetBool("local") ? LOCAL : REPLICATED);
                     else
                         newNode = editorScene.CreateChild("", rootElem.GetBool("local") ? LOCAL : REPLICATED);


:memo:

:memo:

--- index.as
+++ index.as
@@ -25,6 +25,10 @@
 // [ ] uintx / intx -> pointer-sized
 // [ ] byte -> uint8

+// [ ] Sequence failure (fix parsing after error)
+
+// [ ] Namespace (allow for structs/functions inside function)
+
 // [ ] Error on duplicate method names
 // [ ] Error on method names conflicting with record member names
 // [ ] Error on impl not in same module


this should probably not use createJS components

--- examples/ListsTest/src/products/ProductItemRenderer.as
+++ examples/ListsTest/src/products/ProductItemRenderer.as
@@ -18,7 +18,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 package products
 {
-	import org.apache.flex.createjs.staticControls.Label;
+	import org.apache.flex.html.staticControls.Label;
 	import org.apache.flex.html.staticControls.Image;
 	import org.apache.flex.html.staticControls.supportClasses.DataItemRenderer;


Add a roadmap (of sorts)

Add a roadmap (of sorts)

--- index.as
+++ index.as
@@ -0,0 +1,103 @@
+// [ ] Variable declaration
+let name: type = expression;
+
+// [ ] Basic types (arrow)
+/*
+
+byte (8-bit, unsigned)
+bool (1-bit[*])
+
+int8
+int16
+int32
+int64
+int128
+
+uint8
+uint16
+uint32
+uint64
+uint128
+
+intptr (size of a pointer, signed)
+uintptr (size of a pointer, unsigned)
+
+char (32-bit, unsigned)
+
+float16
+float32
+float64
+float128
+
+*/
+
+// [ ] Expressions
+// [ ]    - Add
+// [ ]    - Subtract
+// [ ]    - Multiply
+// [ ]    - Divide
+// [ ]    - Modulo
+// [ ]    - Logical And
+// [ ]    - Logical Or
+// [ ]    - Logical Not
+// [ ]    - Relational GT
+// [ ]    - Relational GE
+// [ ]    - Relational LT
+// [ ]    - Relational LE
+// [ ]    - Relational And
+// [ ]    - Relational Or
+// [ ]    - Bitwise And
+// [ ]    - Bitwise Or
+// [ ]    - Bitwise Xor
+// [ ]    - Bitwise Not
+
+// [ ] Pointers
+// [ ]    - Type
+// [ ]    - Address Of
+// [ ]    - Dereference
+
+// [ ] Cast
+
+// [ ] Function declaration
+def main() {
+}
+
+// [ ] Extern function declaration
+extern def puts(s: *byte);
+
+// [ ] Extern function declaration w/ABI
+extern "stdcall" def CreateWindowExA();
+
+// [ ] Function call (extern AND local)
+main();
+puts("Hello");
+
+// [ ] Extern import
+extern import "stdint.h";
+
+// [ ] Module (namespace)
+module cstdint { extern import "stdint.h"; }
+
+// [ ] c module (built-in)
+import "c";
+
+/*
+
+// [ ] Basic types (in C)
+c.char
+c.uchar
+c.schar
+c.int
+c.uint
+c.short
+c.ushort
+c.long
+c.ulong
+c.float
+c.double
+c.ldouble
+
+*/
+
+// [ ] BigInt
+int  // (∞-bit, signed)


Transferred from the Adobe Open Source Subversion Repository

Revision: 1218
Author:   jimurphy@adobe.com
Date:     2008-04-15T16:09:32.174552Z

Log Message:
-----------
merge 3.0.x[1069:1202] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/PNGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/JPEGEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaTypeRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/codec/IImageEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPFault.as</path>
<path kind="file" action="M">/flex/sdk/trunk/build.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloColors.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/SliderThumbSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/IXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/RoundedRectangle.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/SOAPHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLBinding.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLBinding.as
+++ frameworks/projects/rpc/src/mx/rpc/wsdl/WSDLBinding.as
@@ -23,6 +23,12 @@
  */
 public class WSDLBinding
 {
+   /**
+    * Creates a new WSDLBinding. Currently, only SOAP binding is
+    * supported for WSDL.
+    *
+    * @param name The unique name of this binding.
+    */
     public function WSDLBinding(name:String)
     {
         super();


Transferred from the Adobe Open Source Subversion Repository

Revision: 17004
Author:   cframpto@adobe.com
Date:     2010-07-21T20:54:17.524014Z

Log Message:
-----------
When the selectionMode goes to none, make sure all the selection visuals are removed and only reset the caret if a selection isn't required.
When the column's headerText is changed, make sure the ColumnHeaderBar is updated.

QE notes:
Doc notes:
Bugs: SDK-26844, SDK-26888
Reviewer: Hans
Tests run: none
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -1393,8 +1393,11 @@

             anchorRowIndex = 0;
             anchorColumnIndex = 0;
-            caretRowIndex = -1;
-            caretColumnIndex = -1;
+            if (!requireSelection)
+            {
+                caretRowIndex = -1;
+                caretColumnIndex = -1;
+            }

             invalidateDisplayList();


Transferred from the Adobe Open Source Subversion Repository

Revision: 16772
Author:   hmuller@adobe.com
Date:     2010-07-01T16:10:56.127425Z

Log Message:
-----------
The following changes apply to Spark DataGrid only.   Code reviews have been deferred until the implementation is closer to completion.

Added variableRowHeight and rowHeight properties to Grid,DataGrid.

GridLayout now (lazily) computes typical item cell widths/heights at measure() time.

Removed temporary fixedRowHeight property from Grid.

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

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -524,38 +524,6 @@
         }

         //----------------------------------
-        //  fixedRowHeight
-        //----------------------------------
-
-        [Bindable("fixedRowHeightChanged")]
-
-        /**
-         *  If fixedRowHeight is set, calling getRowBounds() will return
-         *  its value as the height for every row. Individual cell heights are not
-         *  affected, but calling getCellBounds will return bounds
-         *  respecting fixedRowHeight. The fixedRowHeight is always
-         *  bounded by the minRowHeight and maxRowHeight.
-         *
-         *  @default NaN
-         */
-        public function get fixedRowHeight():Number
-        {
-            return gridDimensions.fixedRowHeight;
-        }
-
-        /**
-         *  @private
-         */
-        public function set fixedRowHeight(value:Number):void
-        {
-            if (value == fixedRowHeight)
-                return;
-
-            gridDimensions.fixedRowHeight = value;
-            dispatchChangeEvent("fixedRowHeightChanged");
-        }
-
-        //----------------------------------
         //  hoverIndicator
         //----------------------------------

@@ -1253,6 +1221,52 @@
         }

         //----------------------------------
+        //  rowHeight
+        //----------------------------------
+
+        [Inspectable(category="General", minValue="0.0")]
+
+        [Bindable("rowBackgroundChanged")]
+
+        private var _rowHeight:Number = NaN;
+
+        /**
+         *  If variableRowHeight is false, then
+         *  this property specifies the actual height of each row, in pixels.
+         *
+         *
If variableRowHeight is true,
+         *  the default, then this property has no effect.

+         *
+         *
If variableRowHeight is false,
+         *  the default value of this property is the maximum preferred height
+         *  of the per-column renderers created for the typicalItem.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4.5
+         */
+        public function get rowHeight():Number
+        {
+            return (variableRowHeight) ? gridDimensions.defaultRowHeight : gridDimensions.fixedRowHeight;
+        }
+
+        /**
+         *  @private
+         */
+        public function set rowHeight(value:Number):void
+        {
+            if (_rowHeight == value)
+                return;
+
+            _rowHeight = value;
+            if (!variableRowHeight)
+                gridDimensions.fixedRowHeight = value;
+            dispatchChangeEvent("rowHeightChanged");
+        }
+
+
+        //----------------------------------
         //  rowSeparator
         //----------------------------------

@@ -1412,6 +1426,42 @@
             invalidateSize();
             invalidateDisplayList();
         }
+
+        //----------------------------------
+        //  variableRowHeight
+        //----------------------------------
+
+        [Bindable("variableRowHeightChanged")]
+
+        /**
+         *  If true, each row's height is the maximum of preferred heights of the cells displayed so far.
+         *
+         *
If false, the height of each row is just the value of rowHeight.
+         *
+         *  @default true
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4.5
+         */
+        public function get variableRowHeight():Boolean
+        {
+            return isNaN(gridDimensions.fixedRowHeight);
+        }
+
+        /**
+         *  @private
+         */
+        public function set variableRowHeight(value:Boolean):void
+        {
+            if (value == variableRowHeight)
+                return;
+
+            gridDimensions.fixedRowHeight = rowHeight;
+            dispatchChangeEvent("variableRowHeightChanged");
+        }
+

         //--------------------------------------------------------------------------
         //


Transferred from the Adobe Open Source Subversion Repository

Revision: 16679
Author:   rfrishbe@adobe.com
Date:     2010-06-25T21:09:29.726791Z

Log Message:
-----------
Check-in for touch lists so that List item renderers don't highlight immediately, and they are cancellable after a scroll starts.  In addition, in touch mode, we don't get a select event until mouse up.

QE notes: None
Doc notes: None
Bugs: -
Reviewer: None - this will get reviewed later
Tests run: checkintests, full mustella run (some tests failed and were off by a few pixels)
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/List.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="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.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@1279675 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -16,10 +16,12 @@
 import flash.events.Event;
 import flash.events.KeyboardEvent;
 import flash.events.MouseEvent;
+import flash.events.TimerEvent;
 import flash.geom.Point;
 import flash.system.ApplicationDomain;
 import flash.text.TextField;
 import flash.ui.Keyboard;
+import flash.utils.Timer;

 import mx.collections.ArrayCollection;
 import mx.collections.IList;
@@ -44,6 +46,7 @@
 import spark.core.NavigationUnit;
 import spark.events.IndexChangeEvent;
 import spark.events.RendererExistenceEvent;
+import spark.events.TouchScrollEvent;
 import spark.layouts.supportClasses.DropLocation;

 use namespace mx_internal;  //ListBase and List share selection properties that are mx_internal
@@ -315,6 +318,8 @@
                 Class(ApplicationDomain.currentDomain.getDefinition(
                     "spark.components.RichEditableText"));
         }
+
+        addEventListener(TouchScrollEvent.TOUCH_SCROLL_STARTING, touchScrollStartingHandler);
     }

     //--------------------------------------------------------------------------
@@ -1176,6 +1181,20 @@
             return selectedIndices.indexOf(index) != -1;

         return index == selectedIndex;
+    }
+
+    /**
+     *  @private
+     */
+    override mx_internal function shouldItemAppearSelected(index:int):Boolean
+    {
+        if (getStyle("inputMode") == "touch")
+        {
+            if (pendingSelectionOnMouseUp && mouseDownIndex == index && mouseDownSelectTimer && !mouseDownSelectTimer.running)
+                return true;
+        }
+
+        return isItemIndexSelected(index);
     }

     //--------------------------------------------------------------------------
@@ -1506,6 +1525,8 @@
         else
             newIndex = dataGroup.getElementIndex(event.currentTarget as IVisualElement);

+        mouseDownCancelledFromScroll = false;
+
         if (!allowMultipleSelection)
         {
             // Single selection case, set the selectedIndex
@@ -1518,11 +1539,20 @@
             }

             // Check to see if we're deselecting the currently selected item
-            if (event.ctrlKey && selectedIndex == newIndex)
+            if ((event.ctrlKey && selectedIndex == newIndex) || (getStyle("inputMode") == "touch" && scroller.viewport.clipAndEnableScrolling))
             {
                 pendingSelectionOnMouseUp = true;
-                pendingSelectionCtrlKey = true;
+                pendingSelectionCtrlKey = event.ctrlKey;
                 pendingSelectionShiftKey = event.shiftKey;
+
+                if (getStyle("inputMode") == "touch" && scroller.viewport.clipAndEnableScrolling)
+                {
+                    if (selectedIndex != newIndex)
+                    {
+                        // visually select the item here
+                        selectMouseDownItemAfterDelay(150);
+                    }
+                }
             }
             else
                 setSelectedIndex(newIndex, true);
@@ -1531,11 +1561,22 @@
         {
             // Don't commit the selection immediately, but wait to see if the user
             // is actually dragging. If they don't drag, then commit the selection
-            if (isItemIndexSelected(newIndex))
+            if (isItemIndexSelected(newIndex) || (getStyle("inputMode") == "touch" && scroller.viewport.clipAndEnableScrolling))
             {
                 pendingSelectionOnMouseUp = true;
                 pendingSelectionShiftKey = event.shiftKey;
                 pendingSelectionCtrlKey = event.ctrlKey;
+
+                if (getStyle("inputMode") == "touch" && scroller.viewport.clipAndEnableScrolling)
+                {
+                    if (!isItemIndexSelected(newIndex))
+                    {
+                        // visually select the item here
+                        selectMouseDownItemAfterDelay(150);
+
+                        // FIXME (rfrishbe): Need to also deselect the old item
+                    }
+                }
             }
             else
             {
@@ -1554,7 +1595,7 @@
         mouseDownPoint = event.target.localToGlobal(new Point(event.localX, event.localY));
         mouseDownIndex = newIndex;

-        var listenForDrag:Boolean = (dragEnabled && selectedIndices && this.selectedIndices.indexOf(newIndex) != -1);
+        var listenForDrag:Boolean = (dragEnabled && getStyle("inputMode") == "mouse" && selectedIndices && this.selectedIndices.indexOf(newIndex) != -1);
         // Handle any drag gestures that may have been started
         if (listenForDrag)
         {
@@ -1569,6 +1610,24 @@
         {
             systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_UP_SOMEWHERE, mouseUpHandler, false, 0, true);
             systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler, false, 0, true);
+        }
+    }
+
+    private var mouseDownSelectTimer:Timer;
+
+    private function selectMouseDownItemAfterDelay(delay:Number):void
+    {
+        mouseDownSelectTimer = new Timer(delay, 1);
+        mouseDownSelectTimer.addEventListener(TimerEvent.TIMER_COMPLETE, mouseDownSelectTimer_timerCompleteHandler);
+        mouseDownSelectTimer.start();
+    }
+
+    private function mouseDownSelectTimer_timerCompleteHandler(event:TimerEvent):void
+    {
+        if (mouseDownIndex != -1)
+        {
+            // select item visually now
+            itemSelected(mouseDownIndex, true);
         }
     }

@@ -1620,14 +1679,20 @@
         }
     }

+    private var mouseDownCancelledFromScroll:Boolean = false;
+
     private function removeMouseHandlersForDragStart():void
     {
         // If dragging failed, but we had a pending selection, commit it here
-        if (pendingSelectionOnMouseUp && !DragManager.isDragging)
+        if (pendingSelectionOnMouseUp && !DragManager.isDragging && !mouseDownCancelledFromScroll)
         {
             if (allowMultipleSelection)
             {
                 setSelectedIndices(calculateSelectedIndices(mouseDownIndex, pendingSelectionShiftKey, pendingSelectionCtrlKey), true);
+            }
+            else if (getStyle("inputMode") == "touch" && selectedIndex == NO_SELECTION)
+            {
+                setSelectedIndex(mouseDownIndex, true);
             }
             else
             {
@@ -1894,6 +1959,32 @@

         // Destroy the dropIndicator instance
         destroyDropIndicator();
+    }
+
+    /**
+     *  @private
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    // FIXME (rfrishbe): this should really be on start, not starting...
+    private function touchScrollStartingHandler(event:TouchScrollEvent):void
+    {
+        if (event.scrollingObject == this.scroller)
+        {
+            // cancel actual selection
+            mouseDownCancelledFromScroll = true;
+
+            // remove visual selection indicator
+            mouseDownSelectTimer.stop();
+            mouseDownSelectTimer = null;
+            itemSelected(mouseDownIndex, false);
+            mouseDownIndex = -1;
+            mouseDownPoint = null;
+            pendingSelectionOnMouseUp = false;
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 4211
Author:   jszeto@adobe.com
Date:     2008-12-02T00:51:56.799456Z

Log Message:
-----------
GraphicElement re-layering optimization and removal of change events

SDK-18055 Optimize invalidation of layering for GraphicElements

For the properties that affect whether GraphicElement needs a displayObject, in their setters we add checks to see if we need to recalculate layering.

SDK-18054  Remove non-critical change events from GraphicElement

Removed a bunch of change events from properties that only get set programmatically.

QE Notes: Most change events from GraphicElement and its subclasses have been removed
Doc Notes:
Bugs: SDK-18054, SDK-18055
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Line.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/FilledElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Rect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/Line.as
+++ frameworks/projects/spark/src/spark/primitives/Line.as
@@ -54,8 +54,6 @@

     private var _xFrom:Number = 0;

-
-    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -74,12 +72,9 @@
      */
     public function set xFrom(value:Number):void
     {
-        var oldValue:Number = _xFrom;
-
-        if (value != oldValue)
+        if (value != _xFrom)
         {
             _xFrom = value;
-            dispatchPropertyChangeEvent("xFrom", oldValue, value);
             invalidateSize();
         }
     }
@@ -90,8 +85,6 @@

     private var _xTo:Number = 0;

-
-    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -109,13 +102,10 @@
      *  @private
      */
     public function set xTo(value:Number):void
-    {
-        var oldValue:Number = _xTo;
-
-        if (value != oldValue)
+    {
+        if (value != _xTo)
         {
             _xTo = value;
-            dispatchPropertyChangeEvent("xTo", oldValue, value);
             invalidateSize();
         }
     }
@@ -126,7 +116,6 @@

     private var _yFrom:Number = 0;

-    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -145,12 +134,9 @@
      */
     public function set yFrom(value:Number):void
     {
-        var oldValue:Number = _yFrom;
-
-        if (value != oldValue)
+        if (value != _yFrom)
         {
             _yFrom = value;
-            dispatchPropertyChangeEvent("yFrom", oldValue, value);
             invalidateSize();
         }
     }
@@ -161,7 +147,6 @@

     private var _yTo:Number = 0;

-    [Bindable("propertyChange")]
     [Inspectable(category="General")]

     /**
@@ -179,13 +164,10 @@
      *  @private
      */
     public function set yTo(value:Number):void
-    {
-        var oldValue:Number = _yTo;
-
-        if (value != oldValue)
+    {
+        if (value != _yTo)
         {
             _yTo = value;
-            dispatchPropertyChangeEvent("yTo", oldValue, value);
             invalidateSize();
         }
     }