Transferred from the Adobe Open Source Subversion Repository

Revision: 4170
Author:   egeorgie@adobe.com
Date:     2008-11-23T21:12:27.092823Z

Log Message:
-----------
1.	mx.layout.ILayoutItem gets renamed to mx.layout.ILayoutElement
2.	get actualPosition() -> getLayoutPositionX(postTransform:Boolean=true):Number, getLayoutPositionY(postTransform:Boolean=true):Number
3.	get actualSize() -> getLayoutWidth(postTransform:Boolean=true):Number, getLayoutHeight(postTransform:Boolean=true):Number
4.	get preferredSize() -> getPreferredWidth(postTransform:Boolean=true):Number, getPreferredHeight(postTransform:Boolean=true):Number
5.	get minSize() -> getMinWidth(postTransform:Boolean=true):Number, getMinHeight(postTransform:Boolean=true):Number
6.	get maxSize() -> getMaxWidth(postTransform:Boolean=true):Number, getMaxHeight(postTransform:Boolean=true):Number
7.	setActualSize() -> setlayoutSize(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
8.	setActualPosition() -> setLayoutPosition(width:Number=NaN, height:Number=NaN, postTransform:Boolean=true):void
10.     Add support for custom 3D layouts by exposing access to transform matrices through the ILayoutElement interface.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Hans
tests: checkintests, mustella (gumbo/components)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.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/FxHSlider.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.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/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/graphics/GraphicTags_checkintests.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.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/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFactory.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemFDO.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/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemHelper.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as" copyfrom-rev="4137" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementUIC.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -19,7 +19,7 @@

 import mx.components.baseClasses.GroupBase;
 import mx.core.ScrollUnit;
-import mx.layout.ILayoutItem;
+import mx.layout.ILayoutElement;
 import mx.utils.OnDemandEventDispatcher;

@@ -31,14 +31,14 @@
     //
     //--------------------------------------------------------------------------

-    internal static function hasPercentWidth(layoutItem:ILayoutItem):Boolean
-    {
-        return !isNaN( layoutItem.percentWidth );
-    }
-
-    internal static function hasPercentHeight(layoutItem:ILayoutItem):Boolean
-    {
-        return !isNaN( layoutItem.percentHeight );
+    internal static function hasPercentWidth(layoutElement:ILayoutElement):Boolean
+    {
+        return !isNaN(layoutElement.percentWidth);
+    }
+
+    internal static function hasPercentHeight(layoutElement:ILayoutElement):Boolean
+    {
+        return !isNaN(layoutElement.percentHeight);
     }

     //--------------------------------------------------------------------------
@@ -191,7 +191,7 @@
         if (!g)
             return 0;

-        var maxIndex:int = g.numLayoutItems -1;
+        var maxIndex:int = g.numLayoutElements -1;
         if (maxIndex < 0)
             return 0;

@@ -236,7 +236,7 @@
         if (!g)
             return 0;

-        var maxIndex:int = g.numLayoutItems -1;
+        var maxIndex:int = g.numLayoutElements -1;
         if (maxIndex < 0)
             return 0;

@@ -275,16 +275,16 @@
     /**
      *  LayoutBase::getScrollPositionDelta() computes the
      *  vertical and horizontalScrollPosition deltas needed to
-     *  scroll the item at the specified index into view.
-     *
-     *  If clipContent is true and the item at the specified index is not
+     *  scroll the element at the specified index into view.
+     *
+     *  If clipContent is true and the element at the specified index is not
      *  entirely visible relative to the target's scrollRect, then
      *  return the delta to be added to horizontalScrollPosition and
-     *  verticalScrollPosition that will scroll the item completely
+     *  verticalScrollPosition that will scroll the element completely
      *  within the scrollRect's bounds.
      *
-     *  If the specified item is partially visible and larger than the
-     *  scrollRect, i.e. it's already the only item visible, then
+     *  If the specified element is partially visible and larger than the
+     *  scrollRect, i.e. it's already the only element visible, then
      *  null is returned.
      *
      *  This method attempts to minmimze the change to verticalScrollPosition
@@ -293,13 +293,13 @@
      *  If the specified index is invalid, or target is null, then
      *  null is returned.
      *
-     *  If the item at the specified index is null or includeInLayout
+     *  If the element at the specified index is null or includeInLayout
      *  false, then null is returned.
      *
-     *  @param index The index of the item to be scrolled into view.
+     *  @param index The index of the element to be scrolled into view.
      *  @return A Point that contains offsets to horizontalScrollPosition
      *      and verticalScrollPosition that will scroll the specified
-     *      item into view, or null if no change is needed.
+     *      element into view, or null if no change is needed.
      *
      *  @see clipContent
      *  @see verticalScrollPosition
@@ -311,44 +311,47 @@
          if (!target || !clipContent)
             return null;

-         var n:int = target.numLayoutItems;
+         var n:int = target.numLayoutElements;
          if ((index < 0) || (index >= n))
             return null;

-         var item:ILayoutItem = target.getLayoutItemAt(index);
-         if (!item || !item.includeInLayout)
+         var element:ILayoutElement = target.getLayoutElementAt(index);
+         if (!element || !element.includeInLayout)
             return null;

          var scrollR:Rectangle = target.scrollRect;
          if (!scrollR)
             return null;
-
-         var itemXY:Point = item.actualPosition;
-         var itemWH:Point = item.actualSize;
-         var itemR:Rectangle = new Rectangle(itemXY.x, itemXY.y, itemWH.x, itemWH.y);

-         if (scrollR.containsRect(itemR) || itemR.containsRect(scrollR))
+         // TODO EGeorgie: helper method?
+         var elementX:Number = element.getLayoutPositionX();
+         var elementY:Number = element.getLayoutPositionY();
+         var elementW:Number = element.getLayoutWidth();
+         var elementH:Number = element.getLayoutHeight();
+         var elementR:Rectangle = new Rectangle(elementX, elementY, elementW, elementH);
+
+         if (scrollR.containsRect(elementR) || elementR.containsRect(scrollR))
             return null;

-         var dxl:Number = itemR.left - scrollR.left;     // left justify item
-         var dxr:Number = itemR.right - scrollR.right;   // right justify item
-         var dyt:Number = itemR.top - scrollR.top;       // top justify item
-         var dyb:Number = itemR.bottom - scrollR.bottom; // bottom justify item
+         var dxl:Number = elementR.left - scrollR.left;     // left justify element
+         var dxr:Number = elementR.right - scrollR.right;   // right justify element
+         var dyt:Number = elementR.top - scrollR.top;       // top justify element
+         var dyb:Number = elementR.bottom - scrollR.bottom; // bottom justify element

          // minimize the scroll
          var dx:Number = (Math.abs(dxl) < Math.abs(dxr)) ? dxl : dxr;
          var dy:Number = (Math.abs(dyt) < Math.abs(dyb)) ? dyt : dyb;

-         // scrollR "contains"  itemR in just one dimension
-         if ((itemR.left >= scrollR.left) && (itemR.right <= scrollR.right))
+         // scrollR "contains"  elementR in just one dimension
+         if ((elementR.left >= scrollR.left) && (elementR.right <= scrollR.right))
             dx = 0;
-         else if ((itemR.bottom >= scrollR.bottom) && (itemR.top <= scrollR.top))
+         else if ((elementR.bottom >= scrollR.bottom) && (elementR.top <= scrollR.top))
             dy = 0;

-         // itemR "contains" scrollR in just one dimension
-         if ((itemR.left <= scrollR.left) && (itemR.right >= scrollR.right))
+         // elementR "contains" scrollR in just one dimension
+         if ((elementR.left <= scrollR.left) && (elementR.right >= scrollR.right))
             dx = 0;
-         else if ((itemR.bottom <= scrollR.bottom) && (itemR.top >= scrollR.top))
+         else if ((elementR.bottom <= scrollR.bottom) && (elementR.top >= scrollR.top))
             dy = 0;

          return new Point(dx, dy);


avoid any object creation in decrypt() add comments implement encrypt() (not used in this context, but will be pushed to as3-crypto)

--- src/org/mangui/HLS/utils/FastAESKey.as
+++ src/org/mangui/HLS/utils/FastAESKey.as
@@ -2,7 +2,15 @@
    import flash.utils.ByteArray;
    import com.hurlant.crypto.symmetric.ISymmetricKey;

+
+/* word based AES encryption/decryption
+ * inspired by
+ * https://code.google.com/p/crypto-js/source/browse/tags/3.1.2/src/aes.js
+ */
+
    public class FastAESKey implements ISymmetricKey {
+
+      /* private data, specific to each key */
       private var keySize:uint;
       private var nRounds:uint;
       private var ksRows:uint;
@@ -11,7 +19,7 @@
       private var keyWords:Vector.<uint>;
       private var state:Vector.<uint>;

-      // Lookup tables
+      // static Lookup tables
       private static var _SBOX:Vector.<uint>;
       private static var _INV_SBOX:Vector.<uint>;
       private static var _SUB_MIX_0:Vector.<uint>;
@@ -99,8 +107,9 @@
          nRounds = keySize + 6;
          // Compute number of key schedule rows
          ksRows = (nRounds + 1) * 4;
+         state = new Vector.<uint>(keySize);
+         keyWords = new Vector.<uint>(keySize);
          key.position=0;
-         keyWords = new Vector.<uint>(keySize);
          for(var i:uint=0; i< keySize ; i++) {
             keyWords[i] = key.readUnsignedInt();
          }
@@ -155,7 +164,6 @@

       public function decrypt(block : ByteArray, index : uint = 0) : void {
-         this.state = new Vector.<uint>(keySize);
          block.position = index;
          for(var i:uint=0; i< keySize ; i++) {
             //state.push(block.readUnsignedInt());
@@ -191,6 +199,7 @@
             var t1:uint;
             var t2:uint;
             var t3:uint;
+
             // Rounds
             for (var round:uint = 1; round < nRounds; round++) {
                 // Shift rows, sub bytes, mix columns, add round key
@@ -223,6 +232,16 @@
       }

       public function encrypt(block : ByteArray, index : uint = 0) : void {
+         block.position = index;
+         for(var i:uint=0; i< keySize ; i++) {
+            //state.push(block.readUnsignedInt());
+            state[i] = block.readUnsignedInt();
+         }
+         _doCryptBlock(keySchedule,_SUB_MIX_0, _SUB_MIX_1,_SUB_MIX_2,_SUB_MIX_3, _SBOX);
+         block.position = index;
+         for(i=0; i< keySize ; i++) {
+            block.writeUnsignedInt(state[i]);
+         }
       }

       public function getBlockSize() : uint {


Change 20081211-maxcarlson-I by maxcarlson@Bank.lan on 2008-12-11 01:08:07 PST
    in /Users/maxcarlson/openlaszlo/trunk-clean
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Avoid hiding suring setSource for clickable sprites

Bugs Fixed: LPP-4957 - onclick event lost after doing setSource onmouseover

Technical Reviewer: andre.bargull@udo.edu
QA Reviewer: hminsky

Details: Only hide sprite during setSource() if the sprite is not clickable - behavior now consistent across swf8, 9 and dhtml.

Tests: See updated testcase for LPP-4957

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12066 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as
+++ WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as
@@ -79,8 +79,11 @@
     //this.owner.resource = src;
     //if (this.owner.onresource) this.owner.onresource.sendEvent( src );

-    this.owner.__LZvizLoad = false;
-    this.owner.__LZupdateShown();
+    if (! this.__LZbuttonRef) {
+        // only hide if we're not clickable - see LPP-4957
+        this.owner.__LZvizLoad = false;
+        this.owner.__LZupdateShown();
+    }
     this.loader.request(src, cache, headers, filetype);
 }


Remove unused import

Remove unused import

--- src/aerys/minko/render/shader/node/leaf/Sampler.as
+++ src/aerys/minko/render/shader/node/leaf/Sampler.as
@@ -1,6 +1,5 @@
 package aerys.minko.render.shader.node.leaf
 {
-	import aerys.minko.render.shader.compiler.visitor.IShaderNodeVisitor;
 	import aerys.minko.render.shader.node.IFragmentNode;
 	import aerys.minko.render.shader.node.INode;


?Vector??WritingBuffer????????????Flash Player 9?Flash Player 9?????Array??????

--- as3/com/netease/protobuf/WritingBuffer.as
+++ as3/com/netease/protobuf/WritingBuffer.as
@@ -17,49 +17,44 @@
 		public function WritingBuffer() {
 			endian = Endian.LITTLE_ENDIAN
 		}
-		private const slices:ByteArray = new ByteArray
+		/*
+			// for Flash Player 9
+			[ArrayElementType("uint")]
+			private const slices:Array = []
+		/*/
+			// for Flash Player 10
+			private const slices:Vector.<uint> = new Vector.<uint>
+		//*/
 		public function beginBlock():uint {
-			slices.writeUnsignedInt(position)
+			slices.push(position)
 			const beginSliceIndex:uint = slices.length
-			if (beginSliceIndex % 8 != 4) {
-				throw new IllegalOperationError
-			}
-			slices.writeDouble(0)
-			slices.writeUnsignedInt(position)
+			slices.length += 2
+			slices.push(position)
 			return beginSliceIndex
 		}
 		public function endBlock(beginSliceIndex:uint):void {
-			if (slices.length % 8 != 0) {
-				throw new IllegalOperationError
-			}
-			slices.writeUnsignedInt(position)
-			slices.position = beginSliceIndex + 8
-			const beginPosition:uint = slices.readUnsignedInt()
-			slices.position = beginSliceIndex
-			slices.writeUnsignedInt(position)
+			slices.push(position)
+			const beginPosition:uint = slices[beginSliceIndex + 2]
+			slices[beginSliceIndex] = position
 			WriteUtils.write$TYPE_UINT32(this, position - beginPosition)
-			slices.writeUnsignedInt(position)
-			slices.position = slices.length
-			slices.writeUnsignedInt(position)
+			slices[beginSliceIndex + 1] = position
+			slices.push(position)
 		}
 		public function toNormal(output:IDataOutput):void {
-			if (slices.length % 8 != 0) {
-				throw new IllegalOperationError
-			}
-			slices.position = 0
+			var i:uint = 0
 			var begin:uint = 0
-			while (slices.bytesAvailable > 0) {
-				var end:uint = slices.readUnsignedInt()
+			while (i < slices.length) {
+				var end:uint = slices[i]
+				++i
 				if (end > begin) {
 					output.writeBytes(this, begin, end - begin)
 				} else if (end < begin) {
 					throw new IllegalOperationError
 				}
-				begin = slices.readUnsignedInt()
+				begin = slices[i]
+				++i
 			}
-			if (begin < length) {
-				output.writeBytes(this, begin)
-			}
+			output.writeBytes(this, begin)
 		}
 	}
 }


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

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

 package mx.controls.dataGridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.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/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</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/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.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/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.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/frameworks/projects/framework/src/mx/effects/IEffect.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/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -391,6 +391,8 @@
                 var skinPart:SkinPartInfo = parts[i];
                 var skinPartID:String = skinPart.id;

+                if (this[skinPartID] != null)
+                {
                 if (!(this[skinPartID] is IFactory))
                 {
                     partRemoved(skinPartID, this[skinPartID]);
@@ -401,7 +403,7 @@
                     for (var j:int = 0; j < len; j++)
                         removeDynamicPartInstance(skinPartID, getDynamicPartAt(skinPartID, j));
                 }
-
+            }
                 this[skinPartID] = null;
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 14743
Author:   chaase@adobe.com
Date:     2010-03-12T23:30:57.186697Z

Log Message:
-----------
QE notes: spark/effects/Resize/Controls/Resize_Controls_Button_FromTo needs to be fixed to reflect the new behavior; effects that set playheadTime >= the effect duration no longer automatically dispatch an effectEnd event. Also, basictests EasingTests was updated to reflect new (correct) behavior.
Doc notes: none
Bugs: sdk-25352, sdk-25270, sdk-25269
Reviewer: Jason (+Ely for sdk-25352's AnimateTransformInstance)
Tests run: checkintests, Mustella mx/effects/Parallel|Sequence, spark/effects
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/basicTests/spark/scripts/EasingTestScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/SequenceInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as
@@ -218,7 +218,18 @@
 			timerTween.stop();
 	}

-	/**
+    /**
+     *  @private
+     */
+    override public function end():void
+    {
+        super.end();
+
+        if (timerTween)
+            timerTween.endTween();
+    }
+
+    /**
 	 *  @private
 	 */
 	override public function resume():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 19611
Author:   jasonsj@adobe.com
Date:     2011-01-05T22:45:41.935084Z

Log Message:
-----------
Enable TextArea scrolling in the mobile theme. Refactored HScrollBar and VScrollBar skins for use with TextArea.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorButtonBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as
@@ -78,7 +78,7 @@
      *
      *  Instance of the border graphics.
      */
-    mx_internal var border:DisplayObject;
+    protected var border:DisplayObject;

     private var borderVisibleChanged:Boolean = false;

@@ -118,13 +118,19 @@
     {
         super.createChildren();

-        border = new borderClass();
-        addChild(border);
-
-        textDisplay = StyleableTextField(createInFontContext(StyleableTextField));
-        textDisplay.styleName = this;
-        textDisplay.editable = true;
-        addChild(textDisplay);
+        if (!textDisplay)
+        {
+            textDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+            textDisplay.styleName = this;
+            textDisplay.editable = true;
+            addChild(textDisplay);
+        }
+
+        if (!border)
+        {
+            border = new borderClass();
+            addChild(border);
+        }

         createPromptDisplay();
     }
@@ -169,8 +175,6 @@
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        graphics.clear();
-
         super.updateDisplayList(unscaledWidth, unscaledHeight);

         drawBackground(unscaledWidth, unscaledHeight);


Fix fatal (not the converse).

Fix fatal (not the converse).

	* build-aux/base.as (fatal): Beware of M4 quotation.

--- build-aux/base.as
+++ build-aux/base.as
@@ -102,8 +102,9 @@
   # the prototypes of fatal and error: the first argument is unlikely
   # to be integer.
   case $[1] in
-    ([!0-9]) ;;
-    (*)  stderr "warning: possible confusion between fatal and error";;
+    (*[[!0-9]]*|'') ;;
+    (*)  stderr "warning: possible confusion between fatal and error" \
+                "fatal $[*]";;
   esac

   error 1 "$[@]"


Transferred from the Adobe Open Source Subversion Repository

Revision: 6753
Author:   srahim@adobe.com
Date:     2009-05-08T14:46:34.979202Z

Log Message:
-----------
QE Notes: None
Doc Notes: None
Bugs: -
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/MXMLComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayer.as</path>

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

--- frameworks/projects/spark/src/spark/components/ResizeMode.as
+++ frameworks/projects/spark/src/spark/components/ResizeMode.as
@@ -17,11 +17,11 @@
  *  a component uses to resize its children in the dimensions
  *  specified by the layout system.
  *
- *
The component can change it's own dimensions (width and height)
- *  and relayout its children appropriately (this is the default resize mode).

+ *
The component can change its own dimensions (width and height)
+ *  and re-layout its children appropriately (this is the default resize mode).

  *
- *
Alternative option for the component is to change its scale, in which case
- *  the children don't need to change at all. This is supported by Group.

+ *
An alternative option for the component is to change its scale, in which case
+ *  the children don't need to change at all. This option is supported by Group.

  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -31,9 +31,9 @@
 public final class ResizeMode
 {
     /**
-     *  Resize by changing width and height.
+     *  Resizes by changing the width and height.
      *
-     *
The component always sizes itself, and then lays out
+     *
The component always sizes itself and then lays out
      *  its children at the actual size specified by the layout or the user.

      *
      *  @langversion 3.0
@@ -44,11 +44,11 @@
     public static const NORMAL:String = "normal";

     /**
-     *  Resize by setting the scaleX
+     *  Resizes by setting the scaleX
      *  and scaleY properties.
      *
-     *
The component always sizes itself, and then lays out
-     *  Its children at its measured size.
+     *
The component always sizes itself and then lays out
+     *  its children at its measured size.
      *  The scale is adjusted to match the specified size by the layout or the user.

      *
      *  @langversion 3.0


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/easing/IEaser.as
+++ frameworks/projects/spark/src/spark/effects/easing/IEaser.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 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.effects.easing
 {
 /**


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.managers.marshalClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 17992
Author:   rfrishbe@adobe.com
Date:     2010-10-01T20:59:13.104275Z

Log Message:
-----------
Making performance changes to optimize list scrolling.  Most of the changes are around gating dispatchEvent() with hasEventListener().  The biggest of these is that UIComponent SHOW and HIDE don't dispatch all the time anymore--they only dispatch if someone has attached an event listener directly to them (capture phase won't work).

Also, adding an mx_internal property for Design View on MobileIconItemRenderer, iconDisplayClass.

Also, adding a FIXME in ButtonSkinbase related to my last change around text measurement.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/ContentRequest.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/MobileTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.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/wireframe/src/spark/skins/wireframe/DefaultItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as
@@ -217,6 +217,8 @@

             if (hostComponent && hostComponent.label != "")
             {
+                // FIXME (rfrishbe): rather than use lineMetrics, we should be using labelDisplay.textWidth.
+                // We need to change it here and in multiple places
                 lineMetrics = measureText(hostComponent.label);
                 textWidth = lineMetrics.width + TEXT_WIDTH_PADDING;
                 textHeight = lineMetrics.height + UITextField.TEXT_HEIGHT_PADDING;


Last commit I accidentally pushed out with a duplicate log message- so this is for last commit: Added folder for player created content. Properties of this folder- Created and maintained entirely client-side. Currently, its folder Id is 99 (will change in future). Any player created content is initially put into this folder, but can be moved out if desired. Folder cannot be deleted. Folder will always stay on top of side palette. I think thats it...

--- flexEditor/src/org/arisgames/editor/components/PaletteTree.as
+++ flexEditor/src/org/arisgames/editor/components/PaletteTree.as
@@ -65,6 +65,7 @@
 			trace("ClosePlayerGenContent Folder");
 			this.playerContentFolderOpen = false;
 		}
+		//
 		AppServices.getInstance().saveFolder(GameModel.getInstance().game.gameId, thisFolder, new Responder(handleSavePaletteObject, handleFault));
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20845
Author:   mhorn@adobe.com
Date:     2011-03-14T15:29:23.391952Z

Log Message:
-----------
merge 20756,20790,20712,20805

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/NumberFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/CurrencyFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/BitmapFill.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/formatters/DateTimeFormatter.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/shaderClasses/ColorDodgeShader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/chartClasses/PolarDataCanvas.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OnDemandEventDispatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TabBar.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionViewCursor.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/Transform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/spark/globalization/StringTools.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/StringUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/charts/src/mx/charts/series/CandlestickSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/AdvancedStyleClient.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/utils/ChangeWatcher.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as</path>

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

--- frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/PlotSeries.as
@@ -179,7 +179,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Constructor
+     *  Constructor.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -203,11 +203,11 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	private var _moduleFactoryInitialized:Boolean = false;
-
+    /**
+     *  @private
+     */
+    private var _moduleFactoryInitialized:Boolean = false;
+
     /**
      *  @private
      */
@@ -384,7 +384,7 @@
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-	public function get fillFunction():Function
+    public function get fillFunction():Function
     {
         return _fillFunction;
     }
@@ -619,50 +619,50 @@
     //
     //--------------------------------------------------------------------------

-	/**
-	 *  @private
-	 */
-	private function initStyles():Boolean
-	{
-		HaloDefaults.init(styleManager);
-
-		var seriesStyle:CSSStyleDeclaration =
-			HaloDefaults.createSelector("mx.charts.series.PlotSeries", styleManager);
-
-		seriesStyle.defaultFactory = function():void
-		{
-			this.fill = new SolidColor(0x4444AA);
-			this.fills = [];
-			this.itemRenderer = new ClassFactory(DiamondItemRenderer);
-			this.radius = 5;
-			this.adjustedRadius = 2;
-		}
-
-		return true;
-	}
-
-
-	/**
-	 *  @inheritDoc
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
-	override public function set moduleFactory(factory:IFlexModuleFactory):void
-	{
-		super.moduleFactory = factory;
-
-		if (_moduleFactoryInitialized)
-			return;
-
-		_moduleFactoryInitialized = true;
-
-		// our style settings
-		initStyles();
-	}
-
+    /**
+     *  @private
+     */
+    private function initStyles():Boolean
+    {
+        HaloDefaults.init(styleManager);
+
+        var seriesStyle:CSSStyleDeclaration =
+            HaloDefaults.createSelector("mx.charts.series.PlotSeries", styleManager);
+
+        seriesStyle.defaultFactory = function():void
+        {
+            this.fill = new SolidColor(0x4444AA);
+            this.fills = [];
+            this.itemRenderer = new ClassFactory(DiamondItemRenderer);
+            this.radius = 5;
+            this.adjustedRadius = 2;
+        }
+
+        return true;
+    }
+
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    override public function set moduleFactory(factory:IFlexModuleFactory):void
+    {
+        super.moduleFactory = factory;
+
+        if (_moduleFactoryInitialized)
+            return;
+
+        _moduleFactoryInitialized = true;
+
+        // our style settings
+        initStyles();
+    }
+
     /**
      *  @inheritDoc
      *
@@ -799,9 +799,9 @@
     {
         _localFills = getStyle('fills');
         if (_localFills != null)
-        	_fillCount = _localFills.length;
+            _fillCount = _localFills.length;
         else
-        	_fillCount = 0;
+            _fillCount = 0;
         super.stylesInitialized();
     }

@@ -817,9 +817,9 @@
         {
             _localFills = getStyle('fills');
             if (_localFills != null)
-        		_fillCount = _localFills.length;
-        	else
-        		_fillCount = 0;
+                _fillCount = _localFills.length;
+            else
+                _fillCount = 0;
         }
         if (styleProp == "itemRenderer")
         {
@@ -969,7 +969,7 @@
                 minItems.push(v);
         }

-		n = minItems.length;
+        n = minItems.length;
         for (i = 0; i < n; i++)
         {
             var item:PlotSeriesItem = minItems[i];
@@ -1056,15 +1056,15 @@
         cacheIndexValues(_xField, _renderData.cache, "xValue");
         cacheDefaultValues(_yField, _renderData.cache, "yValue");

-		if(dataTransform && dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is NumericAxis &&
-			!(dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is DateTimeAxis) &&
-        	(dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) as NumericAxis).direction == "inverted")
-        	_renderData.cache = reverseYValues(_renderData.cache);
+        if(dataTransform && dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is NumericAxis &&
+            !(dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) is DateTimeAxis) &&
+            (dataTransform.getAxis(CartesianTransform.VERTICAL_AXIS) as NumericAxis).direction == "inverted")
+            _renderData.cache = reverseYValues(_renderData.cache);
         if(dataTransform && dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is NumericAxis &&
-        	!(dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is DateTimeAxis) &&
-        	(dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) as NumericAxis).direction == "inverted")
-        	_renderData.cache = reverseXValues(_renderData.cache);
-
+            !(dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) is DateTimeAxis) &&
+            (dataTransform.getAxis(CartesianTransform.HORIZONTAL_AXIS) as NumericAxis).direction == "inverted")
+            _renderData.cache = reverseXValues(_renderData.cache);
+
         super.updateData();

         var radius:Number = getStyle("radius");
@@ -1235,14 +1235,14 @@
         return arrItems;
     }

-
+
     /**
      * @private
      */
     override protected function defaultFilterFunction(cache:Array /*of PlotSeriesItem */ ):Array /*of PlotSeriesItem*/
     {
-    	var filteredCache:Array /*of PlotSeriesItem*/ = [];
-    	if (filterDataValues == "outsideRange")
+        var filteredCache:Array /*of PlotSeriesItem*/ = [];
+        if (filterDataValues == "outsideRange")
         {
             filteredCache = cache.concat();

@@ -1268,7 +1268,7 @@
         }
         return filteredCache;
     }
-
+
     //--------------------------------------------------------------------------
     //
     //  Methods
@@ -1333,24 +1333,24 @@

     private function reverseYValues(cache:Array):Array
     {
-    	var i:int = 0;
+        var i:int = 0;
         var n:int = cache.length;
         for(i = 0; i < n ; i++)
         {
-        	cache[i]["yValue"] = -(cache[i]["yValue"]);
+            cache[i]["yValue"] = -(cache[i]["yValue"]);
         }
-    	return cache;
+        return cache;
     }

     private function reverseXValues(cache:Array):Array
     {
-    	var i:int = 0;
+        var i:int = 0;
         var n:int = cache.length;
         for(i = 0; i < n ; i++)
         {
-        	cache[i]["xValue"] = -(cache[i]["xValue"]);
+            cache[i]["xValue"] = -(cache[i]["xValue"]);
         }
-    	return cache;
+        return cache;
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 10211
Author:   aharui@adobe.com
Date:     2009-09-13T00:56:04.075885Z

Log Message:
-----------
Fix measurement using TLFTextField in RSLs

QE Notes: None
Doc Notes: None
Bugs: SDK-22653
Reviewer: Gordon
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/modules/fonts was run, but all tests seem to be excluded

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/TextFieldFactory.as

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

--- frameworks/projects/framework/src/mx/core/TextFieldFactory.as
+++ frameworks/projects/framework/src/mx/core/TextFieldFactory.as
@@ -175,6 +175,7 @@
 			{
 				tlfTextField = moduleFactory.create(
 					"flashx.textLayout.controls.TLFTextField");
+                tlfTextField.textLineCreator = moduleFactory;
 			}

 			// The dictionary could be empty, but not null because entries in the dictionary


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/framework/src/mx/formatters/IFormatter.as
+++ frameworks/projects/framework/src/mx/formatters/IFormatter.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 3645
Author:   egreenfi@adobe.com
Date:     2008-10-15T03:19:36.801703Z

Log Message:
-----------
removed ability to set transform offsets as a matrix

TransformOffsets are applied as r/s/t deltas, not as a matrix, so it doesn't make sense to allow developers to set matrix values directly.

Also renamed matrix/matrix3D on UIC and GraphicElement to layoutMatrix/layoutMatrix3D, as these are more appropriate names, and removing them from transformOffsets gives us more freedom in their naming.

Reviewer: Glenn
checkintests: pass
QA: none

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutItemUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.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/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/geom/TransformOffsets.as
+++ frameworks/projects/framework/src/mx/geom/TransformOffsets.as
@@ -0,0 +1,341 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 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.geom
+{
+	import flash.geom.Matrix;
+	import flash.geom.Matrix3D;
+	import __AS3__.vec.Vector;
+	import flash.geom.Vector3D;
+	import flash.events.EventDispatcher;
+	import flash.events.Event;
+	import mx.core.mx_internal;
+	import mx.geom.ITransformable;
+	import mx.core.AdvancedLayoutFeatures;
+	import flash.geom.Point;
+	use namespace mx_internal;
+
+	/**
+	 *  A CompoundTransform represents a 2D or 3D matrix transform. It can be used in the offsets property on a UIComponent or GraphicElement.
+	 */
+	public class TransformOffsets extends EventDispatcher implements ITransformable
+	{
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  Constructor.
+     */
+		public function TransformOffsets()
+		{
+		}
+
+
+
+    /**
+     * @private
+     * storage for transform properties. These values are concatenated together with the layout properties to
+     * form the actual computed matrix used to render the object.
+     */
+	private var _rotationX:Number = 0;
+	private var _rotationY:Number = 0;
+	private var _rotationZ:Number = 0;
+	private var _scaleX:Number = 1;
+	private var _scaleY:Number = 1;
+	private var _scaleZ:Number = 1;
+	private var _x:Number = 0;
+	private var _y:Number = 0;
+	private var _z:Number = 0;
+
+    /**
+     * @private
+     * flags for tracking whether the  transform is 3D. A transform is 3D if any of the 3D properties -- rotationX/Y, scaleZ, or z -- are set.
+     */
+	private static const IS_3D:uint 				= 0x200;
+	private static const M3D_FLAGS_VALID:uint			= 0x400;
+
+    /**
+     * @private
+     * general storage for all of ur flags.
+     */
+    private var _flags:uint =  0;
+
+    /**
+     * @private
+     */
+	mx_internal var owner:AdvancedLayoutFeatures;
+	//----------------------------------------------------------------------------
+
+	/**
+	 * the  x value of the transform
+	 */
+	public function set x(value:Number):void
+	{
+		if(value == _x)
+			return;
+		_x = value;
+		invalidate(false);
+	}
+    /**
+     * @private
+     */
+	public function get x():Number
+	{
+		return _x;
+	}
+
+	/**
+	 * the y value of the transform
+	 */
+	public function set y(value:Number):void
+	{
+		if(value == _y)
+			return;
+		_y = value;
+		invalidate(false);
+	}
+
+    /**
+     * @private
+     */
+	public function get y():Number
+	{
+		return _y;
+	}
+
+	/**
+	 * the z value of the transform
+	 */
+	public function set z(value:Number):void
+	{
+		if(value == _z)
+			return;
+		_z = value;
+		invalidate(true);
+	}
+
+    /**
+     * @private
+     */
+	public function get z():Number
+	{
+		return _z;
+	}
+
+	//------------------------------------------------------------------------------
+
+
+	/**
+	 * the rotationX, in degrees, of the transform
+	 */
+	public function set rotationX(value:Number):void
+	{
+		if(value == _rotationX)
+			return;
+		_rotationX = value;
+		invalidate(true);
+	}
+
+    /**
+     * @private
+     */
+	public function get rotationX():Number
+	{
+		return _rotationX;
+	}
+
+	/**
+	 * the rotationY, in degrees, of the transform
+	 */
+	public function set rotationY(value:Number):void
+	{
+		if(value == _rotationY)
+			return;
+		_rotationY = value;
+		invalidate(true);
+	}
+
+    /**
+     * @private
+     */
+	public function get rotationY():Number
+	{
+		return _rotationY;
+	}
+
+	/**
+	 * the rotationZ, in degrees, of the transform
+	 */
+	public function set rotationZ(value:Number):void
+	{
+		if(value == _rotationZ)
+			return;
+		_rotationZ = value;
+		invalidate(false);
+	}
+
+    /**
+     * @private
+     */
+	public function get rotationZ():Number
+	{
+		return _rotationZ;
+	}
+
+	//------------------------------------------------------------------------------
+
+
+	/**
+	 * the scaleX of the transform
+	 */
+	public function set scaleX(value:Number):void
+	{
+		if(value == _scaleX)
+			return;
+		_scaleX = value;
+		invalidate(false);
+	}
+
+    /**
+     * @private
+     */
+	public function get scaleX():Number
+	{
+		return _scaleX;
+	}
+
+	/**
+	 * the scaleY of the transform
+	 */
+	public function set scaleY(value:Number):void
+	{
+		if(value == _scaleY)
+			return;
+		_scaleY = value;
+		invalidate(false);
+	}
+
+    /**
+     * @private
+     */
+	public function get scaleY():Number
+	{
+		return _scaleY;
+	}
+
+
+	/**
+	 * the scaleZ of the transform
+	 */
+	public function set scaleZ(value:Number):void
+	{
+		if(value == _scaleZ)
+			return;
+		_scaleZ = value;
+		invalidate(true);
+	}
+
+    /**
+     * @private
+     */
+	public function get scaleZ():Number
+	{
+		return _scaleZ;
+	}
+
+
+	/**
+	 * @private
+	 * returns true if the transform has 3D values.
+	 */
+	mx_internal function get is3D():Boolean
+	{
+		if((_flags & M3D_FLAGS_VALID) == 0)
+			update3DFlags();
+		return ((_flags & IS_3D) != 0);
+	}
+
+
+	//------------------------------------------------------------------------------
+
+	/**
+	 * @private
+	 * invalidates our various cached values.  Any change to the CompoundTransform object that affects
+	 * the various transforms should call this function.
+     * @param reason - the code indicating what changes to cause the invalidation.
+     * @param affects3D - a flag indicating whether the change affects the 2D/3D nature of the various transforms.
+     * @param dispatchChangeEvent - if true, the CompoundTransform will dispatch a change indicating that its underlying transforms
+     * have been modified.
+  	 */
+	private function invalidate(affects3D:Boolean,dispatchChangeEvent:Boolean = true):void
+	{
+		if(affects3D)
+			_flags &= ~M3D_FLAGS_VALID;
+
+		if(dispatchChangeEvent)
+			dispatchEvent(new Event(Event.CHANGE));
+	}
+
+	private static const EPSILON:Number = .0001;
+	/**
+	 * @private
+	 * updates the flags that indicate whether the layout, offset, and/or computed transforms are 3D in nature.
+	 * Since the user can set either the individual transform properties or the matrices directly, we compute these
+	 * flags based on what the current 'source of truth' is for each of these values.
+  	 */
+	private function update3DFlags():void
+	{
+		if((_flags & M3D_FLAGS_VALID) == 0)
+		{
+			var matrixIs3D:Boolean = ( // note that rotationZ is the same as rotation, and not a 3D affecting
+			  	(Math.abs(_scaleZ-1) > EPSILON) ||  // property.
+			  	((Math.abs(_rotationX)+EPSILON)%360) > 2*EPSILON ||
+			  	((Math.abs(_rotationY)+EPSILON)%360) > 2*EPSILON ||
+			  	Math.abs(_z) > EPSILON
+			  	);
+			if(matrixIs3D)
+				_flags |= IS_3D;
+			else
+				_flags &= ~IS_3D;
+			_flags |= M3D_FLAGS_VALID;
+		}
+	}
+
+	public function transformAround(rx:Number,ry:Number,rz:Number,sx:Number,sy:Number,sz:Number,tx:Number,ty:Number,tz:Number):void
+	{
+		if(owner != null)
+		{
+			var is3D:Boolean = ((!isNaN(rx) && rx != 0) || (!isNaN(ry) && ry != 0) || (!isNaN(sz) && sz != 1));
+			var token:* = owner.prepareForTransformCenterAdjustment(false,is3D,tx,ty,tz);
+
+
+
+			if(!isNaN(rx))
+				_rotationX = rx;
+			if(!isNaN(ry))
+				_rotationY = ry;
+			if(!isNaN(rz))
+				_rotationZ = rz;
+			if(!isNaN(sx))
+				_scaleX = sx;
+			if(!isNaN(sx))
+				_scaleY = sy;
+			if(!isNaN(sz))
+				_scaleZ = sz;
+
+			invalidate(is3D);
+			owner.completeTransformCenterAdjustment(token,is3D);
+		}
+		// TODO: support transformAround when we don't have an owner.
+	}
+}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 13259
Author:   clucier@adobe.com
Date:     2010-01-04T19:52:51.953785Z

Log Message:
-----------
Restoring unconditional event dispatching for early life cycle events to facilitate external frameworks such as Mate and Swiz.

For 10.1 player and above we now sync layout immediately after stage resize for Application (mx/spark).

QE notes: None
Doc notes: None
Bugs: SDK-14109
Reviewer: Alex
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -237,6 +237,8 @@
         super();

         showInAutomationHierarchy = true;
+
+        initResizeBehavior();
     }

     //--------------------------------------------------------------------------
@@ -278,6 +280,11 @@
      *  height of the Application should be modified.
      */
     private var resizeHeight:Boolean = true;
+
+    /**
+     *  @private
+     */
+    private var synchronousResize:Boolean = false;

     /**
      * @private
@@ -1167,6 +1174,19 @@
             InteractiveObject(systemManager).contextMenu = defaultMenu;
     }

+    /**
+     *  @private
+     *  Check to see if we're able to synchronize our size with the stage
+     *  immediately rather than deferring (dependent on WATSON 2200950).
+     */
+    private function initResizeBehavior():void
+    {
+        var version:Array = Capabilities.version.split(' ')[1].split(',');
+
+        synchronousResize = (parseFloat(version[0]) > 10 ||
+            (parseFloat(version[0]) == 10 && parseFloat(version[1]) >= 1));
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Event handlers
@@ -1185,7 +1205,14 @@
         // If we're already due to update our bounds on the next
         // commitProperties pass, avoid the redundancy.
         if (!percentBoundsChanged)
+        {
             updateBounds();
+
+            // Update immediately when stage resizes so that we may appear
+            // in synch with the stage rather than visually "catching up".
+            if (synchronousResize)
+                UIComponentGlobals.layoutManager.validateNow();
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 3270
Author:   hmuller@adobe.com
Date:     2008-09-19T14:38:31.675747Z

Log Message:
-----------
Added row/column visibility tracking to Vertical,HorizontalLayout.
This is an incremental change aimed at enabling step/page scrolling
and animated scrolling.

Added new bindable read-only properties firstIndexInView and
lastIndexInView to VerticalLayout.  They track the first/last row
that's within the layout target's scrollRect and included in the
layout.  Note that any other row within this range may not actually be
"in view" (or visible) because its item could be null or
includeInLayout=false, or have height=0, etc.

Exposed these properties on VGroup.

Added a VerticalLayout method called inView that reports if a
particular row is "in view" or partially so.

Made comparable changes to HorizontalLayout, HGroup.

QE: No
Doc: No
Checkintests: Pass
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HGroup.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -12,14 +12,18 @@
 package flex.layout
 {
 import flash.geom.Rectangle;
+import flash.display.DisplayObject;
+import flash.events.Event;
 import flash.events.EventDispatcher;

 import flex.core.GroupBase;
+import flex.graphics.IGraphicElement;
 import flex.intf.ILayout;
 import flex.intf.ILayoutItem;

 import mx.containers.utilityClasses.Flex;
 import mx.events.PropertyChangeEvent;
+import flex.core.Group;

 /**
@@ -88,6 +92,7 @@
     //----------------------------------
     //  gap
     //----------------------------------
+
     private function invalidateTargetSizeAndDisplayList():void
     {
         var layoutTarget:GroupBase = target;
@@ -298,6 +303,140 @@
         _variableRowHeight = value;
         invalidateTargetSizeAndDisplayList();
     }
+
+    //----------------------------------
+    //  firstIndexInView
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _firstIndexInView:int = -1;
+
+    [Inspectable(category="General")]
+    [Bindable("indexInViewChanged")]
+
+	/**
+	 *  The index of the first row that's part of the layout and within
+	 *  the layout target's scrollRect, or -1 if nothing has been displayed yet.
+	 *
+	 *  Note that the row may only be partially in view.
+	 *
+	 *  @see lastIndexInView
+	 *  @see inView
+	 */
+	public function get firstIndexInView():int
+	{
+		return _firstIndexInView;
+	}
+
+
+    //----------------------------------
+    //  lastIndexInView
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _lastIndexInView:int = -1;
+
+    [Inspectable(category="General")]
+    [Bindable("indexInViewChanged")]
+
+	/**
+     *  The index of the last row that's part of the layout and within
+     *  the layout target's scrollRect, or -1 if nothing has been displayed yet.
+     *
+     *  Note that the row may only be partially in view.
+     *
+     *  @see firstIndexInView
+     *  @see inView
+	 */
+	public function get lastIndexInView():int
+	{
+		return _lastIndexInView;
+	}
+
+    /**
+     *  Sets the firstIndexInView and lastIndexInView
+     *  properties and dispatches a "indexInViewChanged"
+     *  event.
+     *
+     *  This method is intended to be used by subclasses that
+     *  override updateDisplayList() to sync the first and
+     *  last indexInView properties with the current display.
+     *
+     *  @param firstIndex The new value for firstIndexInView.
+     *  @param lastIndex The new value for lastIndexInView.
+     *
+     *  @see firstIndexInView
+     *  @see lastIndexInview
+     */
+    protected function setIndexInView(firstIndex:int, lastIndex:int):void
+    {
+        if ((_firstIndexInView == firstIndex) && (_lastIndexInView == lastIndex))
+            return;
+
+        _firstIndexInView = firstIndex;
+        _lastIndexInView = lastIndex;
+        dispatchEvent(new Event("indexInViewChanged"));
+    }
+
+	/**
+	 *  An index is "in view" if the corresponding non-null layout item is
+	 *  within the vertical limits of the layout target's scrollRect
+	 *  and included in the layout.
+	 *
+	 *  Returns 1.0 if the specified index is completely in view, 0.0 if
+	 *  it's not, and a value in between if the index is partially
+	 *  within the view.
+	 *
+	 *  If the specified index is partially within the view, the
+	 *  returned value is the percentage of the corresponding layout
+	 *  item that's visible.
+	 *
+	 *  Returns 0.0 if the specified index is invalid or if it corresponds to
+	 *  null item, or a ILayoutItem for which includeInLayout is false.
+	 *
+	 *  @return the percentage of the specified item that's in view.
+	 *  @see firstIndexInView
+	 *  @see lastIndexInView
+	 */
+	public function inView(index:int):Number
+	{
+		var vp:GroupBase = GroupBase(target);
+	    if (!vp)
+	        return 0.0;
+
+        var li:ILayoutItem = vp.getLayoutItemAt(index);
+        if ((li == null) || !li.includeInLayout)
+            return 0.0;
+
+        var r0:int = firstIndexInView;
+        var r1:int = lastIndexInView;
+
+        // outside the visible index range
+        if ((r0 == -1) || (r1 == -1) || (index < r0) || (index > r1))
+            return 0.0;
+
+        // within the visible index range, but not first or last
+        if ((index > r0) && (index < r1))
+            return 1.0;
+
+        // index is first (r0) or last (r1) visible row
+        var y0:Number = vp.verticalScrollPosition;
+        var y1:Number = y0 + vp.height;
+        var iy0:Number = li.actualPosition.y;
+        var iy1:Number = iy0 + li.actualSize.y;
+        if (iy0 >= iy1)  // item has 0 or negative height
+            return 0.0;
+        if ((iy0 >= y0) && (iy1 <= y1))
+            return 1.0;
+        if (index == r0)
+            return (iy1 - y0) / (iy1 - iy0);
+        else
+            return (y1 - iy0) / (iy1 - iy0);
+	}

     private function variableRowHeightMeasure(layoutTarget:GroupBase):void
@@ -455,25 +594,45 @@
         var minVisibleY:Number = layoutTarget.verticalScrollPosition;
         var maxVisibleY:Number = minVisibleY + unscaledHeight;

-        // Finally, position the objects
+        // Finally, position the LayoutItems and find the first/last
+        // visible indices, the content size, and the number of
+        // visible items.
         var y:Number = 0;
         var maxX:Number = 0;
         var maxY:Number = 0;
-        for each (var lo:ILayoutItem in layoutItemArray)
-        {
+        var firstRowInView:int = -1;
+        var lastRowInView:int = -1;
+
+        for (var index:int = 0; index < count; index++)
+        {
+            var lo:ILayoutItem = layoutTarget.getLayoutItemAt(index);
+            if (!layoutItem || !layoutItem.includeInLayout)
+                continue;
+
+        	// Set the layout item's acutual size and position
             var x:Number = (unscaledWidth - lo.actualSize.x) * hAlign;
             lo.setActualPosition(x, y);
             var dx:Number = lo.actualSize.x;
             if (!variableRowHeight)
                 lo.setActualSize(dx, rowHeight);
+
+            // Update maxX,Y, first,lastVisibleIndex, and y
             var dy:Number = lo.actualSize.y;
             maxX = Math.max(maxX, x + dx);
             maxY = Math.max(maxY, y + dy);
             if ((y < maxVisibleY) && ((y + dy) > minVisibleY))
+            {
             	visibleRows += 1;
+            	if (firstRowInView == -1)
+            	   firstRowInView = lastRowInView = index;
+            	else
+            	   lastRowInView = index;
+            }
             y += dy + gap;
         }
+
         setRowCount(visibleRows);
+        setIndexInView(firstRowInView, lastRowInView);
         layoutTarget.setContentSize(maxX, maxY);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6009
Author:   hmuller@adobe.com
Date:     2009-04-07T23:32:38.656651Z

Log Message:
-----------
Virtualization bug fixes, should be ready for sign-off.   We're now delaying setting a DataGroup IR's data property until after the IR has been added to the display list.

QE Notes:
Doc Notes:
Bugs: sdk-19984, sdk-19870
Reviewer: Ryan, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -1350,13 +1350,16 @@
         if (!layoutTarget)
             return;

-        if (layoutTarget.numElements == 0)
+        if ((layoutTarget.numElements == 0) || (unscaledWidth == 0) || (unscaledHeight == 0))
         {
             setRowCount(0);
             setIndexInView(-1, -1);
-            layoutTarget.setContentSize(0, 0);
-        }
-        else if (useVirtualLayout)
+            if (layoutTarget.numElements == 0)
+                layoutTarget.setContentSize(0, 0);
+            return;
+        }
+
+        if (useVirtualLayout)
             updateDisplayListVirtual();
         else
             updateDisplayListReal();