Transferred from the Adobe Open Source Subversion Repository

Revision: 22924
Author:   betravis@adobe.com
Date:     2011-10-10T17:33:56.818134Z

Log Message:
-----------
Changing drop shadow to use a non-repeating bitmap fill

QE notes: Some dropshadows will be slightly different around the edges
Doc notes: None
Bugs:
SDK-31704:  calloutbutton: callout arrow has some horizontal line over it on android
Reviewer: evtim
Tests run: checkintests, mustella
Is noteworthy for integration: Yes

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

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

--- frameworks/projects/framework/src/mx/graphics/RectangularDropShadow.as
+++ frameworks/projects/framework/src/mx/graphics/RectangularDropShadow.as
@@ -59,13 +59,13 @@
 public class RectangularDropShadow
 {
     include "../core/Version.as";
-
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  Constructor.
      *
@@ -76,67 +76,67 @@
      */
     public function RectangularDropShadow()
     {
-		super();
-	}
-
+        super();
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Variables
     //
     //--------------------------------------------------------------------------
-
-	/**
-	 *  @private
-	 *  The drop shadow is rendered into this BitmapData object,
-	 *  which is later copied to the passed-in Graphics
-	 */
-	private var shadow:BitmapData;
-
-	/**
-	 *  @private
-	 */
-	private var leftShadow:BitmapData;
-
-	/**
-	 *  @private
-	 */
-	private var rightShadow:BitmapData;
-
-	/**
-	 *  @private
-	 */
-	private var topShadow:BitmapData;
-
-	/**
-	 *  @private
-	 */
-	private var bottomShadow:BitmapData;
-
-	/**
-	 *  @private
-	 *  Remembers whether any of the public properties have changed
-	 *  since the most recent call to drawDropShadow().
-	 */
-	private var changed:Boolean = true;
-
+
+    /**
+     *  @private
+     *  The drop shadow is rendered into this BitmapData object,
+     *  which is later copied to the passed-in Graphics
+     */
+    private var shadow:BitmapData;
+
+    /**
+     *  @private
+     */
+    private var leftShadow:BitmapData;
+
+    /**
+     *  @private
+     */
+    private var rightShadow:BitmapData;
+
+    /**
+     *  @private
+     */
+    private var topShadow:BitmapData;
+
+    /**
+     *  @private
+     */
+    private var bottomShadow:BitmapData;
+
+    /**
+     *  @private
+     *  Remembers whether any of the public properties have changed
+     *  since the most recent call to drawDropShadow().
+     */
+    private var changed:Boolean = true;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
-
+
     //----------------------------------
     //  alpha
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the alpha property.
      */
     private var _alpha:Number = 0.4;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  @copy flash.filters.DropShadowFilter#alpha
      *
@@ -149,31 +149,31 @@
     {
         return _alpha;
     }
-
+
     /**
      *  @private
      */
     public function set alpha(value:Number):void
     {
-    	if (_alpha != value)
-    	{
-			_alpha = value;
-			changed = true;
-		}
-    }
-
+        if (_alpha != value)
+        {
+            _alpha = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  angle
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the angle property.
      */
     private var _angle:Number = 45.0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  @copy flash.filters.DropShadowFilter#angle
      *
@@ -186,31 +186,31 @@
     {
         return _angle;
     }
-
+
     /**
      *  @private
      */
     public function set angle(value:Number):void
     {
-    	if (_angle != value)
-    	{
-			_angle = value;
-			changed = true;
-		}
-    }
-
+        if (_angle != value)
+        {
+            _angle = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  color
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the color property.
      */
     private var _color:int = 0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  @copy flash.filters.DropShadowFilter#color
      *
@@ -223,31 +223,31 @@
     {
         return _color;
     }
-
+
     /**
      *  @private
      */
     public function set color(value:int):void
     {
-    	if (_color != value)
-    	{
-			_color = value;
-			changed = true;
-		}
-    }
-
+        if (_color != value)
+        {
+            _color = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  distance
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the distance property.
      */
     private var _distance:Number = 4.0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  @copy flash.filters.DropShadowFilter#distance
      *
@@ -260,35 +260,35 @@
     {
         return _distance;
     }
-
+
     /**
      *  @private
      */
     public function set distance(value:Number):void
     {
-    	if (_distance != value)
-    	{
-			_distance = value;
-			changed = true;
-		}
-    }
-
+        if (_distance != value)
+        {
+            _distance = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  tlRadius
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the tlRadius property.
      */
     private var _tlRadius:Number = 0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The corner radius of the top left corner
-	 *  of the rounded rectangle that is casting the shadow.
-	 *  May be zero for non-rounded rectangles.
+     *  of the rounded rectangle that is casting the shadow.
+     *  May be zero for non-rounded rectangles.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -299,35 +299,35 @@
     {
         return _tlRadius;
     }
-
+
     /**
      *  @private
      */
     public function set tlRadius(value:Number):void
     {
-    	if (_tlRadius != value)
-    	{
-			_tlRadius = value;
-			changed = true;
-		}
-    }
-
+        if (_tlRadius != value)
+        {
+            _tlRadius = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  trRadius
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the trRadius property.
      */
     private var _trRadius:Number = 0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The corner radius of the top right corner
-	 *  of the rounded rectangle that is casting the shadow.
-	 *  May be zero for non-rounded rectangles.
+     *  of the rounded rectangle that is casting the shadow.
+     *  May be zero for non-rounded rectangles.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -338,35 +338,35 @@
     {
         return _trRadius;
     }
-
+
     /**
      *  @private
      */
     public function set trRadius(value:Number):void
     {
-    	if (_trRadius != value)
-    	{
-			_trRadius = value;
-			changed = true;
-		}
-    }
-
+        if (_trRadius != value)
+        {
+            _trRadius = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  blRadius
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the blRadius property.
      */
     private var _blRadius:Number = 0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The corner radius of the bottom left corner
-	 *  of the rounded rectangle that is casting the shadow.
-	 *  May be zero for non-rounded
+     *  of the rounded rectangle that is casting the shadow.
+     *  May be zero for non-rounded
      *  rectangles.
      *
      *  @langversion 3.0
@@ -378,35 +378,35 @@
     {
         return _blRadius;
     }
-
+
     /**
      *  @private
      */
     public function set blRadius(value:Number):void
     {
-    	if (_blRadius != value)
-    	{
-			_blRadius = value;
-			changed = true;
-		}
-    }
-
+        if (_blRadius != value)
+        {
+            _blRadius = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  brRadius
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the brRadius property.
      */
     private var _brRadius:Number = 0;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The corner radius of the bottom right corner
-	 *  of the rounded rectangle that is casting the shadow.
-	 *  May be zero for non-rounded rectangles.
+     *  of the rounded rectangle that is casting the shadow.
+     *  May be zero for non-rounded rectangles.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -417,31 +417,31 @@
     {
         return _brRadius;
     }
-
+
     /**
      *  @private
      */
     public function set brRadius(value:Number):void
     {
-    	if (_brRadius != value)
-    	{
-			_brRadius = value;
-			changed = true;
-		}
-    }
-
+        if (_brRadius != value)
+        {
+            _brRadius = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  blurX
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the brRadius property.
      */
     private var _blurX:Number = 4;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The amount of horizontal blur.
      *  @default 4
@@ -455,31 +455,31 @@
     {
         return _blurX;
     }
-
+
     /**
      *  @private
      */
     public function set blurX(value:Number):void
     {
-    	if (_blurX != value)
-    	{
-			_blurX = value;
-			changed = true;
-		}
-    }
-
+        if (_blurX != value)
+        {
+            _blurX = value;
+            changed = true;
+        }
+    }
+
     //----------------------------------
     //  blurY
     //----------------------------------
-
+
     /**
      *  @private
      *  Storage for the brRadius property.
      */
     private var _blurY:Number = 4;
-
-	[Inspectable]
-
+
+    [Inspectable]
+
     /**
      *  The amount of vertical blur.
      *  @default 4
@@ -493,324 +493,326 @@
     {
         return _blurY;
     }
-
+
     /**
      *  @private
      */
     public function set blurY(value:Number):void
     {
-    	if (_blurY != value)
-    	{
-			_blurY = value;
-			changed = true;
-		}
-    }
-
+        if (_blurY != value)
+        {
+            _blurY = value;
+            changed = true;
+        }
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods
     //
     //--------------------------------------------------------------------------
-
+
     /**
      *  Renders the shadow on the screen.
      *
      *  @param g The Graphics object on which to draw the shadow.
      *
      *  @param x The horizontal offset of the drop shadow,
-	 *  based on the Graphics object's position.
+     *  based on the Graphics object's position.
      *
      *  @param y The vertical offset of the drop shadow,
-	 *  based on the Graphics object's position.
+     *  based on the Graphics object's position.
      *
      *  @param width The width of the shadow, in pixels.
      *
      *  @param height The height of the shadow, in pixels.
-    *
-    *  @langversion 3.0
-    *  @playerversion Flash 9
-    *  @playerversion AIR 1.1
-    *  @productversion Flex 3
-    */
-	public function drawShadow(g:Graphics,
-							   x:Number, y:Number,
-							   width:Number, height:Number):void
-	{
-		// If any parameters of the shadow have changed,
-		// then regenerate the offscreen bitmaps.
-		if (changed)
-		{
-			createShadowBitmaps();
-			changed = false;
-		}
-
-		width = Math.ceil(width);
-		height = Math.ceil(height);
-
-		// Determine the thickness of the shadow along each of the edges
-		var leftThickness:int = leftShadow ? leftShadow.width : 0;
-		var rightThickness:int = rightShadow ? rightShadow.width : 0;
-		var topThickness:int = topShadow ? topShadow.height : 0;
-		var bottomThickness:int = bottomShadow ? bottomShadow.height : 0;
-
-		var widthThickness:int = leftThickness + rightThickness;
-		var heightThickness:int = topThickness + bottomThickness;
-		var maxCornerHeight:Number = (height + heightThickness) / 2;
-		var maxCornerWidth:Number = (width + widthThickness) / 2;
-
-		var matrix:Matrix = new Matrix();
-
-		// Copy the corners of the shadow bitmap onto the graphics object
-		if (leftShadow || topShadow)
-		{
-			var tlWidth:Number = Math.min(tlRadius + widthThickness,
-										  maxCornerWidth);
-			var tlHeight:Number = Math.min(tlRadius + heightThickness,
-										   maxCornerHeight);
-
-			matrix.tx = x - leftThickness;
-			matrix.ty = y - topThickness;
-
-			g.beginBitmapFill(shadow, matrix);
-			g.drawRect(x - leftThickness, y - topThickness, tlWidth, tlHeight);
-			g.endFill();
-		}
-
-		if (rightShadow || topShadow)
-		{
-			var trWidth:Number = Math.min(trRadius + widthThickness,
-										  maxCornerWidth);
-			var trHeight:Number = Math.min(trRadius + heightThickness,
-										   maxCornerHeight);
-
-			matrix.tx = x + width + rightThickness - shadow.width;
-			matrix.ty = y - topThickness;
-
-			g.beginBitmapFill(shadow, matrix);
-			g.drawRect(x + width + rightThickness - trWidth,
-					   y - topThickness,
-					   trWidth, trHeight);
-			g.endFill();
-		}
-
-		if (leftShadow || bottomShadow)
-		{
-			var blWidth:Number = Math.min(blRadius + widthThickness,
-										  maxCornerWidth);
-			var blHeight:Number = Math.min(blRadius + heightThickness,
-										   maxCornerHeight);
-
-			matrix.tx = x - leftThickness;
-			matrix.ty = y + height + bottomThickness - shadow.height;
-
-			g.beginBitmapFill(shadow, matrix);
-			g.drawRect(x - leftThickness,
-					   y + height + bottomThickness - blHeight,
-					   blWidth, blHeight);
-			g.endFill();
-		}
-
-		if (rightShadow || bottomShadow)
-		{
-			var brWidth:Number = Math.min(brRadius + widthThickness,
-										  maxCornerWidth);
-			var brHeight:Number = Math.min(brRadius + heightThickness,
-										   maxCornerHeight);
-
-			matrix.tx = x + width + rightThickness - shadow.width;
-			matrix.ty = y + height + bottomThickness - shadow.height;
-
-			g.beginBitmapFill(shadow, matrix);
-			g.drawRect(x + width + rightThickness - brWidth,
-					   y + height + bottomThickness - brHeight,
-					   brWidth, brHeight);
-			g.endFill();
-		}
-
-		// Copy the sides of the shadow bitmap onto the graphics object
-		if (leftShadow)
-		{
-			matrix.tx = x - leftThickness;
-			matrix.ty = 0;
-
-			g.beginBitmapFill(leftShadow, matrix);
-			g.drawRect(x - leftThickness,
-					   y - topThickness + tlHeight,
-					   leftThickness,
-					   height + topThickness +
-					   bottomThickness - tlHeight - blHeight);
-			g.endFill();
-		}
-
-		if (rightShadow)
-		{
-			matrix.tx = x + width;
-			matrix.ty = 0;
-
-			g.beginBitmapFill(rightShadow, matrix);
-			g.drawRect(x + width,
-					   y - topThickness + trHeight,
-					   rightThickness,
-					   height + topThickness +
-					   bottomThickness - trHeight - brHeight);
-			g.endFill();
-		}
-
-		if (topShadow)
-		{
-			matrix.tx = 0;
-			matrix.ty = y - topThickness;
-
-			g.beginBitmapFill(topShadow, matrix);
-			g.drawRect(x - leftThickness + tlWidth,
-					   y - topThickness,
-					   width + leftThickness +
-					   rightThickness - tlWidth - trWidth,
-					   topThickness);
-			g.endFill();
-		}
-
-		if (bottomShadow)
-		{
-			matrix.tx = 0;
-			matrix.ty = y + height;
-
-			g.beginBitmapFill(bottomShadow, matrix);
-			g.drawRect(x - leftThickness + blWidth,
-					   y + height,
-					   width + leftThickness +
-					   rightThickness - blWidth - brWidth,
-					   bottomThickness);
-			g.endFill();
-		}
-	}
-
-	/**
-	 *  @private
-	 *  Render the drop shadow for the rounded rectangle
-	 *  in a small BitmapData object.
-	 *  The shadow will be copied onto the graphics object
-	 *  passed into drawDropShadow().
-	 */
-	private function createShadowBitmaps():void
-	{
-		// Create a Shape containing a round rectangle that the
-		// specified corner radii and very short sides.
-		var roundRectWidth:Number = Math.max(tlRadius, blRadius) +
-								    3 * Math.max(Math.abs(distance), 2) +
-									Math.max(trRadius, brRadius);
-		var roundRectHeight:Number = Math.max(tlRadius, trRadius) +
-									 3 * Math.max(Math.abs(distance), 2) +
-									 Math.max(blRadius, brRadius);
-
-		if (roundRectWidth < 0 || roundRectHeight < 0)
-			return;
-
-		var roundRect:Shape = new FlexShape();
-		var g:Graphics = roundRect.graphics;
-		g.beginFill(0xFFFFFF);
-		GraphicsUtil.drawRoundRectComplex(
-			g, 0, 0, roundRectWidth, roundRectHeight,
-			tlRadius, trRadius, blRadius, brRadius);
-		g.endFill();
-
-		// Copy the round rectangle into a BitmapData object
-		var roundRectBitmap:BitmapData = new BitmapData(
-			roundRectWidth,
-			roundRectHeight,
-			true,
-			0x00000000);
-		roundRectBitmap.draw(roundRect, new Matrix());
-
-		// Get the size of the drop shadow that will be cast by this
-		// rounded rectangle.
-		var filter:DropShadowFilter =
-			new DropShadowFilter(distance, angle, color, alpha, blurX, blurY);
-		filter.knockout = true;
-		var inputRect:Rectangle = new Rectangle(0, 0,
-			roundRectWidth, roundRectHeight);
-		var outputRect:Rectangle =
-			roundRectBitmap.generateFilterRect(inputRect, filter);
-
-		// Determine the thickness of each edge of the drop shadow
-		var leftThickness:Number = inputRect.left - outputRect.left;
-		var rightThickness:Number = outputRect.right - inputRect.right;
-		var topThickness:Number = inputRect.top - outputRect.top;
-		var bottomThickness:Number = outputRect.bottom - inputRect.bottom;
-
-		// Create a BitmapData object large enough to contain the
-		// rounded rectangle and its drop shadow.  Render the drop
-		// shadow into this BitmapData
-		shadow = new BitmapData(outputRect.width, outputRect.height);
-		shadow.applyFilter(roundRectBitmap, inputRect,
-			new Point(leftThickness, topThickness),
-			filter);
-
-		// For each of the four sides of the round rectangle, create a copy
-		// of the drop shadow in a separate BitmapData object
-		var origin:Point = new Point(0, 0);
-		var rect:Rectangle = new Rectangle();
-
-		if (leftThickness > 0)
-		{
-			rect.x = 0;
-			rect.y = tlRadius + topThickness + bottomThickness;
-			rect.width = leftThickness;
-			rect.height = 1;
-
-			leftShadow = new BitmapData(leftThickness, 1);
-			leftShadow.copyPixels(shadow, rect, origin);
-		}
-		else
-		{
-			leftShadow = null;
-		}
-
-		if (rightThickness > 0)
-		{
-			rect.x = shadow.width - rightThickness;
-			rect.y = trRadius + topThickness + bottomThickness;
-			rect.width = rightThickness;
-			rect.height = 1;
-
-			rightShadow = new BitmapData(rightThickness, 1);
-			rightShadow.copyPixels(shadow, rect, origin);
-		}
-		else
-		{
-			rightShadow = null;
-		}
-
-		if (topThickness > 0)
-		{
-			rect.x = tlRadius + leftThickness + rightThickness;
-			rect.y = 0;
-			rect.width = 1;
-			rect.height = topThickness;
-
-			topShadow = new BitmapData(1, topThickness);
-			topShadow.copyPixels(shadow, rect, origin);
-		}
-		else
-		{
-			topShadow = null;
-		}
-
-		if (bottomThickness > 0)
-		{
-			rect.x = blRadius + leftThickness + rightThickness;
-			rect.y = shadow.height - bottomThickness;
-			rect.width = 1;
-			rect.height = bottomThickness;
-
-			bottomShadow = new BitmapData(1, bottomThickness);
-			bottomShadow.copyPixels(shadow, rect, origin);
-		}
-		else
-		{
-			bottomShadow = null;
-		}
-	}
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function drawShadow(g:Graphics,
+                               x:Number, y:Number,
+                               width:Number, height:Number):void
+    {
+        // If any parameters of the shadow have changed,
+        // then regenerate the offscreen bitmaps.
+        if (changed)
+        {
+            createShadowBitmaps();
+            changed = false;
+        }
+
+        width = Math.ceil(width);
+        height = Math.ceil(height);
+
+        // Determine the thickness of the shadow along each of the edges
+        var leftThickness:int = leftShadow ? leftShadow.width : 0;
+        var rightThickness:int = rightShadow ? rightShadow.width : 0;
+        var topThickness:int = topShadow ? topShadow.height : 0;
+        var bottomThickness:int = bottomShadow ? bottomShadow.height : 0;
+
+        var widthThickness:int = leftThickness + rightThickness;
+        var heightThickness:int = topThickness + bottomThickness;
+        var maxCornerHeight:Number = (height + heightThickness) / 2;
+        var maxCornerWidth:Number = (width + widthThickness) / 2;
+
+        var matrix:Matrix = new Matrix();
+
+        // Copy the corners of the shadow bitmap onto the graphics object
+        if (leftShadow || topShadow)
+        {
+            var tlWidth:Number = Math.min(tlRadius + widthThickness,
+                maxCornerWidth);
+            var tlHeight:Number = Math.min(tlRadius + heightThickness,
+                maxCornerHeight);
+
+            matrix.tx = x - leftThickness;
+            matrix.ty = y - topThickness;
+
+            // Do not repeat the bitmap fill, its edge pixels will be used
+            // to fill the remaining space
+            g.beginBitmapFill(shadow, matrix, false);
+            g.drawRect(x - leftThickness, y - topThickness, tlWidth, tlHeight);
+            g.endFill();
+        }
+
+        if (rightShadow || topShadow)
+        {
+            var trWidth:Number = Math.min(trRadius + widthThickness,
+                maxCornerWidth);
+            var trHeight:Number = Math.min(trRadius + heightThickness,
+                maxCornerHeight);
+
+            matrix.tx = x + width + rightThickness - shadow.width;
+            matrix.ty = y - topThickness;
+
+            g.beginBitmapFill(shadow, matrix, false);
+            g.drawRect(x + width + rightThickness - trWidth,
+                y - topThickness,
+                trWidth, trHeight);
+            g.endFill();
+        }
+
+        if (leftShadow || bottomShadow)
+        {
+            var blWidth:Number = Math.min(blRadius + widthThickness,
+                maxCornerWidth);
+            var blHeight:Number = Math.min(blRadius + heightThickness,
+                maxCornerHeight);
+
+            matrix.tx = x - leftThickness;
+            matrix.ty = y + height + bottomThickness - shadow.height;
+
+            g.beginBitmapFill(shadow, matrix, false);
+            g.drawRect(x - leftThickness,
+                y + height + bottomThickness - blHeight,
+                blWidth, blHeight);
+            g.endFill();
+        }
+
+        if (rightShadow || bottomShadow)
+        {
+            var brWidth:Number = Math.min(brRadius + widthThickness,
+                maxCornerWidth);
+            var brHeight:Number = Math.min(brRadius + heightThickness,
+                maxCornerHeight);
+
+            matrix.tx = x + width + rightThickness - shadow.width;
+            matrix.ty = y + height + bottomThickness - shadow.height;
+
+            g.beginBitmapFill(shadow, matrix, false);
+            g.drawRect(x + width + rightThickness - brWidth,
+                y + height + bottomThickness - brHeight,
+                brWidth, brHeight);
+            g.endFill();
+        }
+
+        // Copy the sides of the shadow bitmap onto the graphics object
+        if (leftShadow)
+        {
+            matrix.tx = x - leftThickness;
+            matrix.ty = 0;
+
+            g.beginBitmapFill(leftShadow, matrix, false);
+            g.drawRect(x - leftThickness,
+                y - topThickness + tlHeight,
+                leftThickness,
+                height + topThickness +
+                bottomThickness - tlHeight - blHeight);
+            g.endFill();
+        }
+
+        if (rightShadow)
+        {
+            matrix.tx = x + width;
+            matrix.ty = 0;
+
+            g.beginBitmapFill(rightShadow, matrix, false);
+            g.drawRect(x + width,
+                y - topThickness + trHeight,
+                rightThickness,
+                height + topThickness +
+                bottomThickness - trHeight - brHeight);
+            g.endFill();
+        }
+
+        if (topShadow)
+        {
+            matrix.tx = 0;
+            matrix.ty = y - topThickness;
+
+            g.beginBitmapFill(topShadow, matrix, false);
+            g.drawRect(x - leftThickness + tlWidth,
+                y - topThickness,
+                width + leftThickness +
+                rightThickness - tlWidth - trWidth,
+                topThickness);
+            g.endFill();
+        }
+
+        if (bottomShadow)
+        {
+            matrix.tx = 0;
+            matrix.ty = y + height;
+
+            g.beginBitmapFill(bottomShadow, matrix, false);
+            g.drawRect(x - leftThickness + blWidth,
+                y + height,
+                width + leftThickness +
+                rightThickness - blWidth - brWidth,
+                bottomThickness);
+            g.endFill();
+        }
+    }
+
+    /**
+     *  @private
+     *  Render the drop shadow for the rounded rectangle
+     *  in a small BitmapData object.
+     *  The shadow will be copied onto the graphics object
+     *  passed into drawDropShadow().
+     */
+    private function createShadowBitmaps():void
+    {
+        // Create a Shape containing a round rectangle that the
+        // specified corner radii and very short sides.
+        var roundRectWidth:Number = Math.max(tlRadius, blRadius) +
+            3 * Math.max(Math.abs(distance), 2) +
+            Math.max(trRadius, brRadius);
+        var roundRectHeight:Number = Math.max(tlRadius, trRadius) +
+            3 * Math.max(Math.abs(distance), 2) +
+            Math.max(blRadius, brRadius);
+
+        if (roundRectWidth < 0 || roundRectHeight < 0)
+            return;
+
+        var roundRect:Shape = new FlexShape();
+        var g:Graphics = roundRect.graphics;
+        g.beginFill(0xFFFFFF);
+        GraphicsUtil.drawRoundRectComplex(
+            g, 0, 0, roundRectWidth, roundRectHeight,
+            tlRadius, trRadius, blRadius, brRadius);
+        g.endFill();
+
+        // Copy the round rectangle into a BitmapData object
+        var roundRectBitmap:BitmapData = new BitmapData(
+            roundRectWidth,
+            roundRectHeight,
+            true,
+            0x00000000);
+        roundRectBitmap.draw(roundRect, new Matrix());
+
+        // Get the size of the drop shadow that will be cast by this
+        // rounded rectangle.
+        var filter:DropShadowFilter =
+            new DropShadowFilter(distance, angle, color, alpha, blurX, blurY);
+        filter.knockout = true;
+        var inputRect:Rectangle = new Rectangle(0, 0,
+            roundRectWidth, roundRectHeight);
+        var outputRect:Rectangle =
+            roundRectBitmap.generateFilterRect(inputRect, filter);
+
+        // Determine the thickness of each edge of the drop shadow
+        var leftThickness:Number = inputRect.left - outputRect.left;
+        var rightThickness:Number = outputRect.right - inputRect.right;
+        var topThickness:Number = inputRect.top - outputRect.top;
+        var bottomThickness:Number = outputRect.bottom - inputRect.bottom;
+
+        // Create a BitmapData object large enough to contain the
+        // rounded rectangle and its drop shadow.  Render the drop
+        // shadow into this BitmapData
+        shadow = new BitmapData(outputRect.width, outputRect.height);
+        shadow.applyFilter(roundRectBitmap, inputRect,
+            new Point(leftThickness, topThickness),
+            filter);
+
+        // For each of the four sides of the round rectangle, create a copy
+        // of the drop shadow in a separate BitmapData object
+        var origin:Point = new Point(0, 0);
+        var rect:Rectangle = new Rectangle();
+
+        if (leftThickness > 0)
+        {
+            rect.x = 0;
+            rect.y = tlRadius + topThickness + bottomThickness;
+            rect.width = leftThickness;
+            rect.height = 1;
+
+            leftShadow = new BitmapData(leftThickness, 1);
+            leftShadow.copyPixels(shadow, rect, origin);
+        }
+        else
+        {
+            leftShadow = null;
+        }
+
+        if (rightThickness > 0)
+        {
+            rect.x = shadow.width - rightThickness;
+            rect.y = trRadius + topThickness + bottomThickness;
+            rect.width = rightThickness;
+            rect.height = 1;
+
+            rightShadow = new BitmapData(rightThickness, 1);
+            rightShadow.copyPixels(shadow, rect, origin);
+        }
+        else
+        {
+            rightShadow = null;
+        }
+
+        if (topThickness > 0)
+        {
+            rect.x = tlRadius + leftThickness + rightThickness;
+            rect.y = 0;
+            rect.width = 1;
+            rect.height = topThickness;
+
+            topShadow = new BitmapData(1, topThickness);
+            topShadow.copyPixels(shadow, rect, origin);
+        }
+        else
+        {
+            topShadow = null;
+        }
+
+        if (bottomThickness > 0)
+        {
+            rect.x = blRadius + leftThickness + rightThickness;
+            rect.y = shadow.height - bottomThickness;
+            rect.width = 1;
+            rect.height = bottomThickness;
+
+            bottomShadow = new BitmapData(1, bottomThickness);
+            bottomShadow.copyPixels(shadow, rect, origin);
+        }
+        else
+        {
+            bottomShadow = null;
+        }
+    }
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 14966
Author:   klin@adobe.com
Date:     2010-03-23T21:53:53.095287Z

Log Message:
-----------
Merge 14965 from 4.x to trunk.

Fix for http://bugs.adobe.com/jira/browse/SDK-25909 and another underlying List/Tree/DataGrid issue. The bug was that the dragProxy for a TileList and HorizontalList didn't have the right layoutDirection causing it to be incorrectly positioned. While investigating the issue, I found that there was some fallout from changing SpriteAsset. The selection and rollover highlights on a List were disappearing. It turns out that List and DataGrid create their own SpriteAssets for creating certain indicators (like highlight and selection), while Tree creates it to wrap the disclosureIcon.

The fix for first bug is to set the layoutDirection of the dragProxy to “rtl” when the dragInitiator is also "rtl". It doesn’t inherit the layoutDirection because it is a child of the systemManager. I’ve also included the fix for the fallout from SpriteAsset by setting layoutDirection on those specific instances to null (inheriting) instead of their default “ltr”.

QE notes: Need updates to mirrored Tree bitmaps.
Doc notes: No
Bugs: SDK-25909
Reviewer: Jason
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridBase.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridBase.as
@@ -40,12 +40,12 @@
 import mx.core.IFlexModuleFactory;
 import mx.core.IFontContextComponent;
 import mx.core.IInvalidating;
+import mx.core.ILayoutDirectionElement;
 import mx.core.IUIComponent;
 import mx.core.IUITextField;
-import mx.core.mx_internal;
 import mx.core.SpriteAsset;
 import mx.core.UIComponentGlobals;
-import mx.core.UITextField;
+import mx.core.mx_internal;
 import mx.events.DragEvent;
 import mx.events.ListEvent;
 import mx.events.ScrollEvent;
@@ -1740,6 +1740,11 @@
                     selectionLayer.setChildIndex(DisplayObject(columnHighlightIndicator),
                                              selectionLayer.numChildren - 1);
             }
+
+            // Let the columnHighlightIndicator inherit the layoutDirection
+            if (columnHighlightIndicator is ILayoutDirectionElement)
+                ILayoutDirectionElement(columnHighlightIndicator).layoutDirection = null;
+
             super.drawHighlightIndicator(columnHighlightIndicator, x, y, columnContents.width, height, color, itemRenderer);
         }
     }
@@ -1785,6 +1790,11 @@
                     selectionLayer.setChildIndex(DisplayObject(columnCaretIndicator),
                                              selectionLayer.numChildren - 1);
             }
+
+            // Let the columnCaretIndicator inherit the layoutDirection
+            if (columnCaretIndicator is ILayoutDirectionElement)
+                ILayoutDirectionElement(columnCaretIndicator).layoutDirection = null;
+
             super.drawCaretIndicator(columnCaretIndicator, x, y, columnContents.width, height, color, itemRenderer);
         }
     }
@@ -1828,6 +1838,11 @@
                 indicator.parent.addEventListener(Event.REMOVED, selectionRemovedListener);
                 indicatorDictionary[indicator] = columnIndicator;
             }
+
+            // Let the columnIndicator inherit the layoutDirection
+            if (columnIndicator is ILayoutDirectionElement)
+                ILayoutDirectionElement(columnIndicator).layoutDirection = null;
+
             super.drawSelectionIndicator(columnIndicator, x, y, columnContents.width, height, color, itemRenderer);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19795
Author:   rfrishbe@adobe.com
Date:     2011-01-18T19:15:14.349353Z

Log Message:
-----------
Bunch of small, mostly ASDoc cleanups:

1) Cleaning up ASDoc around alternatingItemColors (after SVN 19684) and mis-spelling "Destroy"

2) Cleaning up an un-needed style in defaults.css since it's set in Scroller.

3) In Spark ListBase, removing an un-needed FIXME, but fixing up the documentation since we were actually doing it correctly before, but the documentation was just wrong.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewMenu.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/supportClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
@@ -63,7 +63,7 @@

 /**
  *  The colors to use for the backgrounds of the items in the list.
- *  The value is an array of two or more colors.
+ *  The value is an array of one or more colors.
  *  The backgrounds of the list items alternate among the colors in the array.
  *
  *  @default undefined


Transferred from the Adobe Open Source Subversion Repository

Revision: 6006
Author:   dsubrama@adobe.com
Date:     2009-04-07T23:13:52.682149Z

Log Message:
-----------
-new property, labelText, added to IItemRenderer interface
-owning components always push the right text down to the renderer (ie: setting the labelText property)
-DataGroup, SkinnableDataContainer now implement IItemRendererOwner
-labelField/labelFunction work for ButtonBar

QA: Yes
Checkintests: Pass
Reviewer: Ryan

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/skins/default/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRenderer.as</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/frameworks/projects/flex4/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as
@@ -12,6 +12,18 @@
 -->

 <s:ItemRenderer focusEnabled="false" xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark">
+
+	<fx:Script>
+        <![CDATA[
+
+            override public function set labelText(value:String):void
+            {
+                super.labelText = value;
+                labelElement.text = labelText;
+            }
+        ]]>
+    </fx:Script>
+

     <s:states>
 		<s:State name="normal"/>


Add tests for enumerateUserPublishedFiles{,Result}

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -49,6 +49,7 @@
 			addButton("Toggle fullscreen", toggleFullscreen);
 			addButton("Show Friends overlay", activateOverlay);
 			addButton("List subscribed files", enumerateSubscribedFiles);
+			addButton("List published files", enumerateUserPublishedFiles)
 			addButton("List shared files", enumerateSharedFiles);
 			addButton("List workshop files", enumerateWorkshopFiles);
 			addButton("Update file", updateFile);
@@ -187,6 +188,12 @@
 			log("enumerateUserSubscribedFiles(0) == " + Steamworks.enumerateUserSubscribedFiles(0));
 		}

+		private function enumerateUserPublishedFiles(e:Event = null):void {
+			if(!Steamworks.isReady) return;
+
+			log("enumerateUserPublishedFiles(0) == " + Steamworks.enumerateUserPublishedFiles(0));
+		}
+
 		private function enumerateSharedFiles(e:Event = null):void {
 			if(!Steamworks.isReady) return;

@@ -296,10 +303,19 @@
 					}
 					break;
 				case SteamConstants.RESPONSE_OnEnumerateUserSharedWorkshopFiles:
-					log("RESPONSE_OnEnumerateUserSharedWorkshopFiles: " + e.response);
-					if(e.response != SteamResults.OK) return;
-					var userRes:UserFilesResult = Steamworks.enumerateUserSharedWorkshopFilesResult();
-					log("User shared files: " + userRes.resultsReturned + "/" + userRes.totalResults);
+				case SteamConstants.RESPONSE_OnEnumerateUserPublishedFiles:
+					var shared:Boolean = (e.req_type == SteamConstants.RESPONSE_OnEnumerateUserSharedWorkshopFiles);
+					log((shared ?
+						"RESPONSE_OnEnumerateUserSharedWorkshopFile" :
+						"RESPONSE_OnEnumerateUserPublishedFiles: ") + e.response);
+					if(e.response != SteamResults.OK) return;
+					var userRes:UserFilesResult = shared ?
+						Steamworks.enumerateUserSharedWorkshopFilesResult() :
+						Steamworks.enumerateUserPublishedFilesResult();
+
+					log("User " + (shared ? "shared" : "published") +" files: " +
+						userRes.resultsReturned + "/" + userRes.totalResults);
+
 					for(i = 0; i < userRes.resultsReturned; i++) {
 						log(i + ": " + userRes.publishedFileId[i]);
 					}


fix solider rotation

fix solider rotation

--- src/battlecode/client/viewer/render/DrawRobot.as
+++ src/battlecode/client/viewer/render/DrawRobot.as
@@ -246,11 +246,7 @@
             }

             // draw direction
-            if (type != RobotType.SOLDIER) {
-                this.imageCanvas.rotation = directionToRotation(direction);
-            } else {
-                // TODO soldier sprite
-            }
+            this.imageCanvas.rotation = directionToRotation(direction);

             if (force) {
                 this.image.width = getImageSize(true);


[FWR-LmjOd2zc] RecorderJSInterface: removed redundant `this` statements

--- src/main/flashwavrecorder/RecorderJSInterface.as
+++ src/main/flashwavrecorder/RecorderJSInterface.as
@@ -51,7 +51,7 @@
     public var saveButton:DisplayObject;

     public function RecorderJSInterface() {
-      this.recorder = new MicrophoneRecorder();
+      recorder = new MicrophoneRecorder();
       if(ExternalInterface.available && ExternalInterface.objectID) {
         ExternalInterface.addCallback("record", record);
         ExternalInterface.addCallback("observeLevel", observeLevel);
@@ -75,16 +75,16 @@
         ExternalInterface.addCallback("setLoopBack", setLoopBack);
         ExternalInterface.addCallback("isMicrophoneAccessible", isMicrophoneAccessible);
       }
-      this.recorder.addEventListener(MicrophoneRecorder.SOUND_COMPLETE, playComplete);
-      this.recorder.addEventListener(MicrophoneRecorder.PLAYBACK_STARTED, playbackStarted);
-      this.recorder.addEventListener(MicrophoneRecorder.ACTIVITY, microphoneActivity);
-      this.recorder.levelForwarder.addEventListener(MicrophoneLevelEvent.LEVEL_VALUE, microphoneLevel);
-      this.recorder.samplesForwarder.addEventListener(MicrophoneSamplesEvent.RAW_SAMPLES_DATA, microphoneSamples);
+      recorder.addEventListener(MicrophoneRecorder.SOUND_COMPLETE, playComplete);
+      recorder.addEventListener(MicrophoneRecorder.PLAYBACK_STARTED, playbackStarted);
+      recorder.addEventListener(MicrophoneRecorder.ACTIVITY, microphoneActivity);
+      recorder.levelForwarder.addEventListener(MicrophoneLevelEvent.LEVEL_VALUE, microphoneLevel);
+      recorder.samplesForwarder.addEventListener(MicrophoneSamplesEvent.RAW_SAMPLES_DATA, microphoneSamples);
     }

     public function ready(width:int, height:int):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.READY, width, height);
-      if (!this.recorder.mic.isMuted()) {
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.READY, width, height);
+      if (!recorder.mic.isMuted()) {
         onMicrophoneStatus(new StatusEvent(StatusEvent.STATUS, false, false, "Microphone.Unmuted", "status"));
       }
     }
@@ -101,43 +101,43 @@
     }

     private function playbackStarted(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, MicrophoneRecorder.PLAYBACK_STARTED, this.recorder.currentSoundName, this.recorder.latency);
+      ExternalInterface.call(EVENT_HANDLER, MicrophoneRecorder.PLAYBACK_STARTED, recorder.currentSoundName, recorder.latency);
     }

     private function playComplete(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.STOPPED, recorder.currentSoundName);
     }

     private function microphoneActivity(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_ACTIVITY, this.recorder.mic.getActivityLevel());
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_ACTIVITY, recorder.mic.getActivityLevel());
     }

     private function microphoneLevel(event:MicrophoneLevelEvent):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_LEVEL, event.levelValue);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_LEVEL, event.levelValue);
     }

     private function microphoneSamples(event:MicrophoneSamplesEvent):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_SAMPLES, event.samples);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_SAMPLES, event.samples);
     }

     public function init(url:String=null, fieldName:String=null, formData:Array=null):void {
-      this.uploadUrl = url;
-      this.uploadFieldName = fieldName;
-      this.update(formData);
+      uploadUrl = url;
+      uploadFieldName = fieldName;
+      update(formData);
     }

     public function update(formData:Array=null):void {
-      this.uploadFormData = [];
+      uploadFormData = [];
       if(formData) {
         for(var i:int=0; i<formData.length; i++) {
           var data:Object = formData[i];
-          this.uploadFormData.push(MultiPartFormUtil.nameValuePair(data.name, data.value));
+          uploadFormData.push(MultiPartFormUtil.nameValuePair(data.name, data.value));
         }
       }
     }

     public function isMicrophoneAccessible():Boolean {
-      return isMicrophoneConnected() && !this.recorder.mic.isMuted();
+      return isMicrophoneConnected() && !recorder.mic.isMuted();
     }

     private function isMicrophoneConnected():Boolean {
@@ -146,51 +146,51 @@

     private function announceMicrophoneInaccessibility():void {
       if (isMicrophoneConnected()) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_USER_REQUEST);
-      } else {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.NO_MICROPHONE_FOUND);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_USER_REQUEST);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.NO_MICROPHONE_FOUND);
       }
     }

     public function requestMicrophoneAccess():void {
-      this.recorder.mic.addEventListener(StatusEvent.STATUS, onMicrophoneStatus);
-      this.recorder.mic.setLoopBack(true);
+      recorder.mic.addEventListener(StatusEvent.STATUS, onMicrophoneStatus);
+      recorder.mic.setLoopBack(true);
     }

     private function onMicrophoneStatus(event:StatusEvent):void {
-      this.recorder.mic.setLoopBack(false);
+      recorder.mic.setLoopBack(false);
       if(event.code == "Microphone.Unmuted") {
-        this.configureMicrophone();
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_CONNECTED, this.recorder.mic);
-      } else {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.MICROPHONE_NOT_CONNECTED);
+        configureMicrophone();
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_CONNECTED, recorder.mic);
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.MICROPHONE_NOT_CONNECTED);
       }
     }

     public function configureMicrophone(rate:int=22, gain:int=100, silenceLevel:Number=0, silenceTimeout:int=4000):void {
-      this.recorder.mic.setRate(rate);
-      this.recorder.mic.setGain(gain);
-      this.recorder.mic.setSilenceLevel(silenceLevel, silenceTimeout);
+      recorder.mic.setRate(rate);
+      recorder.mic.setGain(gain);
+      recorder.mic.setSilenceLevel(silenceLevel, silenceTimeout);
     }

     public function setUseEchoSuppression(useEchoSuppression:Boolean):void {
-      this.recorder.mic.setUseEchoSuppression(useEchoSuppression);
+      recorder.mic.setUseEchoSuppression(useEchoSuppression);
     }

     public function setLoopBack(state:Boolean):void {
-      this.recorder.mic.setLoopBack(state);
+      recorder.mic.setLoopBack(state);
     }

     public function record(name:String, filename:String=null):Boolean {
-      if (this.isMicrophoneAccessible()) {
-        if(this.recorder.recording) {
-          this.recorder.stop();
-          ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, this.recorder.currentSoundName, this.recorder.duration());
+      if (isMicrophoneAccessible()) {
+        if(recorder.recording) {
+          recorder.stop();
+          ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, recorder.currentSoundName, recorder.duration());
         } else {
-          this.recorder.record(name, filename);
-          ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.RECORDING, this.recorder.currentSoundName);
+          recorder.record(name, filename);
+          ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.RECORDING, recorder.currentSoundName);
         }
-        return this.recorder.recording;
+        return recorder.recording;
       } else {
         announceMicrophoneInaccessibility();
         return false;
@@ -198,83 +198,83 @@
     }

     public function observeLevel():Boolean {
-      var succeed:Boolean = enableEventObservation(this.recorder.levelObserverAttacher);
+      var succeed:Boolean = enableEventObservation(recorder.levelObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL);
       }
       return succeed;
     }

     public function stopObservingLevel():Boolean {
-      var succeed:Boolean = disableEventObservation(this.recorder.levelObserverAttacher);
+      var succeed:Boolean = disableEventObservation(recorder.levelObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL_STOPPED);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.OBSERVING_LEVEL_STOPPED);
       }
       return succeed;
     }

     public function observeSamples():Boolean {
-      var succeed:Boolean = enableEventObservation(this.recorder.samplesObserverAttacher);
+      var succeed:Boolean = enableEventObservation(recorder.samplesObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES);
       }
       return succeed;
     }

     public function stopObservingSamples():Boolean {
-      var succeed:Boolean = disableEventObservation(this.recorder.samplesObserverAttacher);
+      var succeed:Boolean = disableEventObservation(recorder.samplesObserverAttacher);
       if (succeed) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES_STOPPED);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.OBSERVING_SAMPLES_STOPPED);
       }
       return succeed;
     }

     public function playBack(name:String):Boolean {
-      if(this.recorder.playing) {
-        this.recorder.stop();
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
-      } else {
-        this.recorder.playBack(name);
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.PLAYING, this.recorder.currentSoundName);
-      }
-
-      return this.recorder.playing;
+      if(recorder.playing) {
+        recorder.stop();
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.STOPPED, recorder.currentSoundName);
+      } else {
+        recorder.playBack(name);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.PLAYING, recorder.currentSoundName);
+      }
+
+      return recorder.playing;
     }

     public function playBackFrom(name:String, time:Number):Boolean {
-      if(this.recorder.playing) {
-        this.recorder.stop();
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
-      }
-      this.recorder.playBackFrom(name, time);
-      if (this.recorder.playing) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.PLAYING, this.recorder.currentSoundName);
-      }
-      return this.recorder.playing;
+      if(recorder.playing) {
+        recorder.stop();
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.STOPPED, recorder.currentSoundName);
+      }
+      recorder.playBackFrom(name, time);
+      if (recorder.playing) {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.PLAYING, recorder.currentSoundName);
+      }
+      return recorder.playing;
     }

     public function pausePlayBack(name:String):void {
-      if(this.recorder.playing) {
-        this.recorder.pause(name);
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
+      if(recorder.playing) {
+        recorder.pause(name);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.STOPPED, recorder.currentSoundName);
       }
     }

     public function stopPlayBack():void {
-      if(this.recorder.recording) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, this.recorder.currentSoundName, this.recorder.duration());
-      } else {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.STOPPED, this.recorder.currentSoundName);
-      }
-      this.recorder.stop();
+      if(recorder.recording) {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.RECORDING_STOPPED, recorder.currentSoundName, recorder.duration());
+      } else {
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.STOPPED, recorder.currentSoundName);
+      }
+      recorder.stop();
     }

     public function duration(name:String):Number {
-      return this.recorder.duration(name);
+      return recorder.duration(name);
     }

     public function getCurrentTime(name:String):Number {
-      return this.recorder.getCurrentTime(name);
+      return recorder.getCurrentTime(name);
     }

     public function getBase64(name:String):Object {
@@ -288,19 +288,19 @@
     }

     public function save():Boolean {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVE_PRESSED, this.recorder.currentSoundName);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVE_PRESSED, recorder.currentSoundName);
       try {
-        _save(this.recorder.currentSoundName, this.recorder.currentSoundFilename);
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVING, this.recorder.currentSoundName);
+        _save(recorder.currentSoundName, recorder.currentSoundFilename);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVING, recorder.currentSoundName);
       } catch(e:Error) {
-        ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, this.recorder.currentSoundName, e.message);
+        ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, recorder.currentSoundName, e.message);
         return false;
       }
       return true;
     }

     private function enableEventObservation(eventObserverAttacher:MicrophoneEventObserverAttacher):Boolean {
-      if (this.isMicrophoneAccessible()) {
+      if (isMicrophoneAccessible()) {
         if (!eventObserverAttacher.observing) {
           eventObserverAttacher.startObserving();
         }
@@ -320,13 +320,13 @@

     private function _save(name:String, filename:String):void {

-      var boundary:String = MultiPartFormUtil.boundary();
-
-      this.uploadFormData.push( MultiPartFormUtil.fileField(this.uploadFieldName, recorder.convertToWav(name), filename, "audio/wav") );
-      var request:URLRequest = MultiPartFormUtil.request(this.uploadFormData);
-      this.uploadFormData.pop();
-
-      request.url = this.uploadUrl;
+      MultiPartFormUtil.boundary();
+
+      uploadFormData.push(MultiPartFormUtil.fileField(uploadFieldName, recorder.convertToWav(name), filename, "audio/wav"));
+      var request:URLRequest = MultiPartFormUtil.request(uploadFormData);
+      uploadFormData.pop();
+
+      request.url = uploadUrl;

       var loader:URLLoader = new URLLoader();
       loader.addEventListener(Event.COMPLETE, onSaveComplete);
@@ -338,19 +338,19 @@

     private function onSaveComplete(event:Event):void {
       var loader:URLLoader = URLLoader(event.target);
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVED, this.recorder.currentSoundName, loader.data);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVED, recorder.currentSoundName, loader.data);
     }

     private function onIOError(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, this.recorder.currentSoundName, IOErrorEvent(event).text);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, recorder.currentSoundName, IOErrorEvent(event).text);
     }

     private function onSecurityError(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, this.recorder.currentSoundName, SecurityErrorEvent(event).text);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVE_FAILED, recorder.currentSoundName, SecurityErrorEvent(event).text);
     }

     private function onProgress(event:Event):void {
-      ExternalInterface.call(this.EVENT_HANDLER, RecorderJSInterface.SAVE_PROGRESS, this.recorder.currentSoundName, ProgressEvent(event).bytesLoaded, ProgressEvent(event).bytesTotal);
+      ExternalInterface.call(EVENT_HANDLER, RecorderJSInterface.SAVE_PROGRESS, recorder.currentSoundName, ProgressEvent(event).bytesLoaded, ProgressEvent(event).bytesTotal);
     }
   }
 }


SoundParameterController にマスターボリュームを渡さなかった場合に null エラーになるのを修正

--- project/SoundConductor/src/jp/hiiragi/managers/soundConductor/SoundParameterController.as
+++ project/SoundConductor/src/jp/hiiragi/managers/soundConductor/SoundParameterController.as
@@ -186,7 +186,10 @@
 			if (_soundParameterType == SoundParameterType.VOLUME)
 			{
 				var volume:Number = value;
-				volume *= _masterVolumeController.value;
+
+				if (_masterVolumeController != null)
+					volume *= _masterVolumeController.value;
+
 				if (_groupVolumeController != null)
 					volume *= _groupVolumeController.value;


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

--- frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoSource.as
+++ frameworks/projects/spark/src/spark/components/mediaClasses/DynamicStreamingVideoSource.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.mediaClasses
 {


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

--- frameworks/projects/charts/src/mx/charts/renderers/CrossItemRenderer.as
+++ frameworks/projects/charts/src/mx/charts/renderers/CrossItemRenderer.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.charts.renderers
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18884
Author:   jasonsj@adobe.com
Date:     2010-12-01T01:01:18.896589Z

Log Message:
-----------
Use authorDensity in Mobile theme

QE notes: By default, 240 devices should still report as 240. Mustella known goods should not be affected.
Doc notes:
Bugs:
Reviewer: egeorgie
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/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.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/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as
@@ -14,13 +14,12 @@
 import flash.display.GradientType;
 import flash.display.Graphics;
 import flash.events.Event;
-import flash.geom.Matrix;
 import flash.text.TextFormatAlign;

+import mx.core.DeviceDensity;
 import mx.core.UIComponent;
 import mx.core.UITextField;
 import mx.core.mx_internal;
-import mx.events.ResizeEvent;
 import mx.utils.ColorUtil;

 import spark.components.ActionBar;
@@ -63,9 +62,9 @@
         // common
         borderClass = ActionBarBackground;

-        switch (targetDensity)
-        {
-            case MobileSkin.PPI240:
+        switch (authorDensity)
+        {
+            case DeviceDensity.PPI_240:
             {
                 layoutBorderHeight = 1;
                 layoutShadowHeight = 3;


temporary workaround for compiler bug

temporary workaround for compiler bug

--- WeaveJS/src/weavejs/util/StringView.as
+++ WeaveJS/src/weavejs/util/StringView.as
@@ -460,8 +460,8 @@
 		public static function bytesToBase64(aBytes):String {

 			var sB64Enc:String = "";
-
-			for (var nMod3:int, nLen:int = aBytes.length, nUint24:int = 0, nIdx:int = 0; nIdx < nLen; nIdx++) {
+			var nMod3:int, nLen:int = aBytes.length, nUint24:int = 0, nIdx:int = 0
+			for (; nIdx < nLen; nIdx++) {
 				nMod3 = nIdx % 3;
 				if (nIdx > 0 && (nIdx * 4 / 3) % 76 === 0) { sB64Enc += "\r\n"; }
 				nUint24 |= aBytes[nIdx] << (16 >>> nMod3 & 24);
@@ -482,8 +482,8 @@
 			sB64Enc:String = sBase64.replace(/[^A-Za-z0-9\+\/]/g, ""), nInLen:int = sB64Enc.length,
 				nOutLen:int = nBlockBytes ? Math.ceil((nInLen * 3 + 1 >>> 2) / nBlockBytes) * nBlockBytes : nInLen * 3 + 1 >>> 2,
 				aBytes:Array = new Uint8Array(nOutLen);
-
-			for (var nMod3:int, nMod4:int, nUint24:int = 0, nOutIdx:int = 0, nInIdx:int = 0; nInIdx < nInLen; nInIdx++) {
+			var nMod3:int, nMod4:int, nUint24:int = 0, nOutIdx:int = 0, nInIdx:int = 0
+			for (; nInIdx < nInLen; nInIdx++) {
 				nMod4 = nInIdx & 3;
 				nUint24 |= StringView.b64ToUint6(sB64Enc.charCodeAt(nInIdx)) << 18 - 6 * nMod4;
 				if (nMod4 === 3 || nInLen - nInIdx === 1) {
@@ -628,8 +628,8 @@

 				nRawIdx = isFinite(nChrOffset) ? this.makeIndex(nChrOffset) : 0;
 				nRawEnd = isFinite(nChrLen) ? this.makeIndex(nChrLen, nRawIdx) : aSource.length;
-
-				for (var nChrCode:int, nChrIdx:int = 0; nRawIdx < nRawEnd; nChrIdx++) {
+				var nChrCode:int, nChrIdx:int = 0
+				for (; nRawIdx < nRawEnd; nChrIdx++) {
 					nChrCode = fGetInptChrCode(aSource, nRawIdx);
 					fCallback.call(oThat || null, nChrCode, nChrIdx, nRawIdx, aSource);
 					nRawIdx += fGetInptChrSize(nChrCode);
@@ -664,8 +664,8 @@
 				fGetIncr = StringView.getUTF16CharLength;
 				fGetCode = StringView.loadUTF16CharCode;
 			}
-
-			for (var nChr:int, nLen:int = this.rawData.length, nIdx:int = 0; nIdx < nLen; nIdx += fGetIncr(nChr)) {
+			var nChr:int, nLen:int = this.rawData.length, nIdx:int = 0
+			for (; nIdx < nLen; nIdx += fGetIncr(nChr)) {
 				nChr = fGetCode(this.rawData, nIdx);
 				sView += String.fromCharCode(nChr);
 			}


comment fix

comment fix

--- src/fr/manashield/flex/thex/Game.as
+++ src/fr/manashield/flex/thex/Game.as
@@ -54,7 +54,7 @@
 			var centralBlock:Block = new Block(HexagonalGrid.instance.cell(new Point(0,0)), new Color(0x5c5c5c));
 			$(centralBlock); // Get rid of the annoying "not used" warning.

-			// reate the initial blocks
+			// create the initial blocks
 			this.fillGrid();

 			// initialze and launch the animation of the falling blocks


moved deprecated state mapping array handling to traverseAndSetState()

--- WeaveJS/src/weavejs/core/SessionManager.as
+++ WeaveJS/src/weavejs/core/SessionManager.as
@@ -358,6 +358,11 @@
 			{
 				mapping(state, removeMissingDynamicObjects);
 			}
+			else if (mapping is Array)
+			{
+				for each (var item:* in mapping)
+					traverseAndSetState(value, item, removeMissingDynamicObjects);
+			}
 			else if (state && typeof state === 'object' && typeof mapping === 'object')
 			{
 				for (var key:* in mapping)
@@ -493,8 +498,7 @@
 					if (mapping is Function)
 						mapping.call(linkableObject, newState, removeMissingDynamicObjects);
 					else
-						for each (var item:Object in (mapping as Array || [mapping]))
-							traverseAndSetState(newState, item, removeMissingDynamicObjects);
+						traverseAndSetState(newState, mapping, removeMissingDynamicObjects);
 				}
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6196
Author:   smgilson@adobe.com
Date:     2009-04-22T17:59:05.886447Z

Log Message:
-----------
ASDoc bug fixes for l10n

QE Notes: None
Doc Notes: None
Bugs: - FLEXDOCS-746, FLEXDOCS-748, FLEXDOCS-749
checkintests - passed

Modified Paths:
--------------
<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/controls/IFlexContextMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>

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

--- frameworks/projects/mx/src/mx/controls/TextArea.as
+++ frameworks/projects/mx/src/mx/controls/TextArea.as
@@ -1125,7 +1125,7 @@
      *
      *
Use an hmtlText attribute where any occurences
      *  of the HTML markup characters < and > in the attribute value
-     *  are written instead as the XML "entities" &lt;
+     *  are written instead of the XML "entities" &lt;
      *  and &gt;:

      *
      *


update version to 3.9.4

update version to 3.9.4

--- kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
+++ kdp3Lib/src/com/kaltura/kdpfl/ApplicationFacade.as
@@ -32,7 +32,7 @@
 		/**
 		 * The current version of the KDP.
 		 */
-		public var kdpVersion : String = "v3.9.3";
+		public var kdpVersion : String = "v3.9.4";

 		/**


updated comment.

updated comment.

--- WeaveData/src/weave/data/hierarchy/XMLEntityNode.as
+++ WeaveData/src/weave/data/hierarchy/XMLEntityNode.as
@@ -196,7 +196,7 @@

 			var descendantEntityNode:EntityNode = descendant as EntityNode;

-			// make sure to call initChildren() instead of getChildren()
+			// make sure to avoid requesting new children
 			for each (var childNode:IWeaveTreeNode in getChildrenExt())
 			{
 				// is the child equivalent to the descendant?


switch language tests to use SimpleApp and add event listener tests

--- examples/LanguageTests/src/LanguageTests.as
+++ examples/LanguageTests/src/LanguageTests.as
@@ -19,7 +19,8 @@
 package
 {

-import flash.display.Sprite;
+import org.apache.flex.core.SimpleApplication;
+import org.apache.flex.events.Event;

 import classes.B;

@@ -30,7 +31,7 @@
 import interfaces.IE;
 import interfaces.IF;

-public class LanguageTests extends Sprite implements IA, IE
+public class LanguageTests extends SimpleApplication implements IA, IE
 {
 	public function LanguageTests()
 	{
@@ -39,8 +40,8 @@

 		var b:B = new B();

-		testResult = this instanceof Sprite;
-		trace('this instanceof Sprite - true: ' + testResult.toString());
+		testResult = this instanceof SimpleApplication;
+		trace('this instanceof SimpleApplication - true: ' + testResult.toString());
 		testResult = this instanceof B;
 		trace('this instanceof classes.B - false: ' + testResult.toString());
 		testResult = b instanceof classes.B;
@@ -62,8 +63,8 @@
 		testResult = this instanceof IE;
 		trace('this instanceof interfaces.IE - false: ' + testResult.toString());
 		trace();
-		testResult = this is Sprite;
-		trace('this is Sprite - true: ' + testResult.toString());
+		testResult = this is SimpleApplication;
+		trace('this is SimpleApplication - true: ' + testResult.toString());
 		testResult = this is B;
 		trace('this is classes.B - false: ' + testResult.toString());
 		testResult = b is classes.B;
@@ -85,8 +86,8 @@
 		testResult = this is IE;
 		trace('this is interfaces.IE - true: ' + testResult.toString());
 		trace();
-		testObject = (this as Sprite) ? this as Sprite : 'null';
-		trace('this as Sprite - [object ...]: ' + testObject.toString());
+		testObject = (this as SimpleApplication) ? this as SimpleApplication : 'null';
+		trace('this as SimpleApplication - [object ...]: ' + testObject.toString());
 		testObject = (this as B) ? this as B : 'null';
 		trace('this as classes.B - null: ' + testObject.toString());
 		testObject = (b as classes.B) ? b as classes.B : 'null';
@@ -109,8 +110,8 @@
 		trace('this as interfaces.IE - [object ...]: ' + testObject.toString());
 		trace();
 		try {
-			testObject = Sprite(this);
-			trace('Sprite(this) - [object ...]: ' + testObject.toString());
+			testObject = SimpleApplication(this);
+			trace('SimpleApplication(this) - [object ...]: ' + testObject.toString());
 		} catch (e:Error)
 		{
 			trace("This shouldn't show!");
@@ -136,6 +137,23 @@
 		{
 			trace("This shouldn't show!");
 		}
+
+        addEventListener("foo", eventHandler);
+        if (hasEventListener("foo"))
+            trace("addEventListener worked");
+        else
+            trace("This shouldn't show!");
+
+        removeEventListener("foo", eventHandler);
+        if (!hasEventListener("foo"))
+            trace("removeEventListener worked");
+        else
+            trace("This shouldn't show!");
 	}
+
+    public function eventHandler(e:Event):void
+    {
+
+    }
 }
 }


made column variable accessible in labelFormatter

--- WeaveUISpark/src/weave/visualization/plotters/CompoundBarChartPlotter.as
+++ WeaveUISpark/src/weave/visualization/plotters/CompoundBarChartPlotter.as
@@ -174,7 +174,7 @@
 		public const recordValueLabelColoring:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(false));

 		public const showLabels:LinkableBoolean = registerLinkableChild(this, new LinkableBoolean(false));
-		public const labelFormatter:LinkableFunction = registerLinkableChild(this, new LinkableFunction('string', true, false, ['string']));
+		public const labelFormatter:LinkableFunction = registerLinkableChild(this, new LinkableFunction('string', true, false, ['string', 'column']));
 		public const labelDataCoordinate:LinkableNumber = registerLinkableChild(this, new LinkableNumber(NaN));
 		public const labelHorizontalAlign:LinkableString = registerLinkableChild(this, new LinkableString(BitmapText.HORIZONTAL_ALIGN_RIGHT));
 		public const labelVerticalAlign:LinkableString = registerLinkableChild(this, new LinkableString(BitmapText.VERTICAL_ALIGN_MIDDLE));
@@ -646,7 +646,7 @@

 								try
 								{
-									_bitmapText.text = labelFormatter.apply(null, [_bitmapText.text]);
+									_bitmapText.text = labelFormatter.apply(null, [_bitmapText.text, heightColumn]);
 								}
 								catch (e:Error)
 								{


Transferred from the Adobe Open Source Subversion Repository

Revision: 22561
Author:   smgilson@adobe.com
Date:     2011-09-14T19:12:37.612519Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/RSLEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/ModuleEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/events/EventListenerRequest.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>

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

--- frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as
+++ frameworks/projects/advancedgrids/src/mx/events/AdvancedDataGridEvent.as
@@ -745,6 +745,8 @@
      *
      *  @param triggerEvent The MouseEvent or KeyboardEvent that triggered this
      *  event or null if this event was triggered programmatically.
+     *
+     *  @param headerPart The part of the header that was clicked.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


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

--- frameworks/projects/framework/src/mx/graphics/shaderClasses/HueShader.as
+++ frameworks/projects/framework/src/mx/graphics/shaderClasses/HueShader.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.graphics.shaderClasses
 {


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

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

 package mx.controls.colorPickerClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7376
Author:   hmuller@adobe.com
Date:     2009-05-28T18:25:57.415529Z

Log Message:
-----------
Bug fixes for DropDownList, virtualized TileLayout.  Refactoring of the "cooperative layout"
code in TrackBase.

QE Notes:
Doc Notes:
Bugs: sdk-21459, sdk-21250, sdk-20864
Reviewer: Ryan

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/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/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -190,6 +190,11 @@
      *  When useVirtualLayout changes to false, this method is called automatically.
      *
      *  Subclasses that support useVirtualLayout=true must override this method.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function clearCachedVirtualLayoutState():void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8487
Author:   smgilson@adobe.com
Date:     2009-07-09T18:57:21.985536Z

Log Message:
-----------
final checkin to update the namespace in ASDoc MXML syntax descriptions for Spark components

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/EaseInOutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Fade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Power.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/CallAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AddAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Scale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/Graphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Rotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Wipe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Sine.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/Move.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/easing/Linear.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/animation/Keyframe.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/SetAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/RemoveAction.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -44,7 +44,7 @@
  *  from within updateDisplayList().

  *
  *  @mxml
- *
The <LayoutBase> tag inherits all of the tag
+ *
The <s:LayoutBase> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


Use Ctrl instead Alt for deselecting with PaintSelection

--- bin/Data/Scripts/Editor/EditorViewPaintSelection.as
+++ bin/Data/Scripts/Editor/EditorViewPaintSelection.as
@@ -158,13 +158,14 @@
     float r = (paintSelectionBrushCurrentSize.x * 0.5);

     IntVector2 mousePos(x,y);
+
     // Select by mouse
-    if (input.mouseButtonDown[MOUSEB_LEFT] && input.qualifierDown[QUAL_ALT] != true)
+    if (input.mouseButtonDown[MOUSEB_LEFT] && input.qualifierDown[QUAL_CTRL] != true)
     {
         SelectOriginsByPaintSelection(mousePos, r, true);
     }
     // Deselect by mouse
-    else if (input.mouseButtonDown[MOUSEB_LEFT] && input.qualifierDown[QUAL_ALT] == true)
+    else if (input.mouseButtonDown[MOUSEB_LEFT] && input.qualifierDown[QUAL_CTRL] == true)
     {
         SelectOriginsByPaintSelection(mousePos, r, false);
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package mx.controls.fileSystemClasses
 {


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/TextAreaAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/TextAreaAutomationImpl.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.automation.delegates.controls
 {


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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/DateFieldAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/DateFieldAutomationImpl.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.automation.delegates.controls
 {


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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -162,7 +162,9 @@

         super.text = value;
         _isTruncated = false;
-        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+
+        if (hasEventListener(FlexEvent.VALUE_COMMIT))
+            dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
     }

     //----------------------------------
@@ -649,7 +651,10 @@

         // Dispatch "isTruncatedChange"
         if (_isTruncated != oldIsTruncated)
-            dispatchEvent(new Event("isTruncatedChanged"));
+        {
+            if (hasEventListener("isTruncatedChanged"))
+                dispatchEvent(new Event("isTruncatedChanged"));
+        }

         return _isTruncated;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 19818
Author:   rfrishbe@adobe.com
Date:     2011-01-20T00:13:42.294130Z

Log Message:
-----------
Fixing up text selection scrolling inside of another scroller.  We need to keep track of which scroller is in text selection mode and cancel others that attempt to scroll.

QE notes: -
Doc notes:
Bugs: SDK-29161
Reviewer: Glenn
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
+++ frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as
@@ -1125,6 +1125,13 @@
 			// Early exit if the event isn't a SCROLL event or doesn't have a Scroller
 			if (event.reason != TouchInteractionReason.SCROLL || !scroller)
 				return;
+
+            // if already in text selection mode with another scroller, cancel this scroller
+            if (scrollerInTextSelectionMode)
+            {
+                event.preventDefault();
+                return;
+            }

 			var minVScrollPos:Number;
 			var maxVScrollPos:Number;
@@ -1162,6 +1169,7 @@
 			maxHScrollPos = pt.x - scroller.width;
 			maxVScrollPos = pt.y - scroller.height;

+            scrollerInTextSelectionMode = scroller;
 			scroller.enableTextSelectionAutoScroll(true, minHScrollPos, maxHScrollPos,
 				minVScrollPos, maxVScrollPos);
 		}
@@ -1192,6 +1200,7 @@
 			var scroller:Scroller = event.relatedObject as Scroller;

 			// Turn off text selection auto-scroll.
+            scrollerInTextSelectionMode = null;
 			if (scroller)
 				scroller.enableTextSelectionAutoScroll(false);
 		}
@@ -1825,7 +1834,14 @@
 	 *  @private
 	 */
 	private var _baselineBottomOffset:Number;
-
+
+    /**
+     *  @private
+     *  Used to keep track if this StyleableTextField is already in "scrolling mode"
+     *  and what scroller it is using to scroll.  This is so we can respond appropriately
+     *  to other touchInteractionStarting and touchInteractionEnd events.
+     */
+    private var scrollerInTextSelectionMode:Scroller;

     /**
      *  @private