Transferred from the Adobe Open Source Subversion Repository

Revision: 16728
Author:   clucier@adobe.com
Date:     2010-06-29T20:58:52.356567Z

Log Message:
-----------
Added ability to cancel all queued content requests.  Added bitmapData property to BitmapImage and Image.

QE notes: None
Doc notes:  None
Bugs: SDK-26559, SDK-26708
Reviewer: Glenn
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/ContentCache.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Image.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -191,7 +191,6 @@
     //
     //--------------------------------------------------------------------------

-    private var _bitmapData:BitmapData;
     private var _scaleGridBottom:Number;
     private var _scaleGridLeft:Number;
     private var _scaleGridRight:Number;
@@ -207,8 +206,30 @@
     private var previousUnscaledWidth:Number;
     private var previousUnscaledHeight:Number;
     private var sourceInvalid:Boolean;
-
-
+
+    //----------------------------------
+    //  bitmapData
+    //----------------------------------
+
+    private var _bitmapData:BitmapData;
+
+    /**
+     *  Returns a copy of the BitmapData object representing
+     *  the currently loaded image content (unscaled).  This property
+     *  is null for untrusted cross domain content.
+     *
+     *  @default null
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.0
+     *  @productversion Flex 4.5
+     */
+    public function get bitmapData():BitmapData
+    {
+        return _bitmapData ? _bitmapData.clone() : _bitmapData;
+    }
+
     //----------------------------------
     //  bytesLoaded
     //----------------------------------
@@ -1456,8 +1477,8 @@
         }
         else
         {
-            // TODO(crl): Handle other content types here such as raw
-            // BitmapData returned from an IContentLoader.
+            if (content is BitmapData)
+                setBitmapData(content as BitmapData);
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/framework/src/mx/skins/Border.as
+++ frameworks/projects/framework/src/mx/skins/Border.as
@@ -0,0 +1,70 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-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.skins
+{
+
+import mx.core.EdgeMetrics;
+import mx.core.IBorder;
+
+/**
+ *  The Border class is an abstract base class for various classes that
+ *  draw borders, either rectangular or non-rectangular, around UIComponents.
+ *  This class does not do any actual drawing itself.
+ *
+ *
If you create a new non-rectangular border class, you should extend
+ *  this class.
+ *  If you create a new rectangular border class, you should extend the
+ *  abstract subclass RectangularBorder.

+ *
+ *  @tiptext
+ *  @helpid 3321
+ */
+public class Border extends ProgrammaticSkin implements IBorder
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function Border()
+	{
+		super();
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  borderMetrics
+	//----------------------------------
+
+	/**
+	 *  The thickness of the border edges.
+	 *
+	 *  @return EdgeMetrics with left, top, right, bottom thickness in pixels
+	 */
+	public function get borderMetrics():EdgeMetrics
+	{
+		return EdgeMetrics.EMPTY;
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5573
Author:   jimurphy@adobe.com
Date:     2009-03-26T15:11:59.159776Z

Log Message:
-----------
-more updated package and class names that were missed in the first pass
-remove the mx folder

qa: probably
doc: this updated more asdoc comments so you may want to make sure that this pass made the correct updates
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IViewport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/HSBInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/SetActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/IGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/easing/IEaser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateShaderTransition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/pathSegments/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxToggleButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/AnimationEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VScrollBar.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/effects/AnimateTransformRotate3D.as</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/effects/supportClasses/WipeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/SetAction.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Scale.as
+++ frameworks/projects/spark/src/spark/effects/Scale.as
@@ -28,7 +28,7 @@
  */
 public class AnimateTransformScale extends AnimateTransform
 {
-    include "../../mx/core/Version.as";
+    include "../../spark.core.Version.as";

     public function AnimateTransformScale(target:Object=null)
     {


added backgroundcell for weird graphical use cases

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@536 bc4816be-ef27-423a-9c4d-fc420be121a2


Transferred from the Adobe Open Source Subversion Repository

Revision: 5101
Author:   gauravj@adobe.com
Date:     2009-02-27T05:22:45.887116Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
663 paths were modified

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

--- frameworks/projects/framework/src/mx/effects/Iris.as
+++ frameworks/projects/framework/src/mx/effects/Iris.as
@@ -36,6 +36,11 @@
  *  @see mx.effects.effectClasses.IrisInstance
  *
  *  @includeExample examples/IrisEffectExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class Iris extends MaskEffect
 {
@@ -51,6 +56,11 @@
 	 *  Constructor.
 	 *
 	 *  @param target The Object to animate with this effect.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
 	 */
 	public function Iris(target:Object = null)
 	{


when seeking in IDLE state, switch to PLAYING_BUFFERING state related to #204

--- src/org/mangui/hls/stream/HLSNetStream.as
+++ src/org/mangui/hls/stream/HLSNetStream.as
@@ -315,6 +315,7 @@
                 case HLSPlayStates.PAUSED_BUFFERING:
                     _setPlaybackState(HLSPlayStates.PAUSED_BUFFERING);
                     break;
+                case HLSPlayStates.IDLE:
                 case HLSPlayStates.PLAYING:
                 case HLSPlayStates.PLAYING_BUFFERING:
                     _setPlaybackState(HLSPlayStates.PLAYING_BUFFERING);


added getter/setter for encoding field

added getter/setter for encoding field

--- src/com/jonas/net/Multipart.as
+++ src/com/jonas/net/Multipart.as
@@ -19,9 +19,7 @@
 		private var _fields:Array = [];
 		private var _files:Array = [];
 		private var _data:ByteArray = new ByteArray();
-
-		//http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/charset-codes.html
-		public var encoding:String = 'ascii';
+		private var _encoding:String = 'ascii'; //http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/charset-codes.html

 		public function Multipart(url:String = null) {
 			_url = url;
@@ -92,10 +90,20 @@
 		{
 			_url = value;
 		}
+
+		public function get encoding():String
+		{
+			return _encoding;
+		}
+
+		public function set encoding(value:String):void
+		{
+			_encoding = value;
+		}

 		private function _writeString(value:String):void {
 			var b:ByteArray = new ByteArray();
-			b.writeMultiByte(value, encoding);
+			b.writeMultiByte(value, _encoding);
 			_data.writeBytes(b, 0, b.length);
 		}


add export background color

add export background color

--- src/control/ExportDataCommand.as
+++ src/control/ExportDataCommand.as
@@ -10,6 +10,8 @@
 	import flash.events.Event;
 	import flash.events.IOErrorEvent;
 	import flash.geom.Matrix;
+	import flash.geom.Point;
+	import flash.geom.Rectangle;
 	import flash.net.FileReference;
 	import flash.utils.ByteArray;

@@ -32,9 +34,10 @@
 		public static const instance:ExportDataCommand = new ExportDataCommand();

 		private var _fileREF:FileReference;
+		private var _isExporting:Boolean;
+		private var _scale:Number;
 		private var _exportType:uint;
-		private var _isExporting:Boolean;
-		private var _exportScale:Number;
+		private var _backgroundColor:uint;

 		private var _importDataProxy:ImportDataProxy;

@@ -48,7 +51,7 @@
 			_importDataProxy = ImportDataProxy.getInstance();
 		}

-		public function export(exportType:uint, exportScale:Number):void
+		public function export(exportType:uint, scale:Number, backgroundColor:uint = 0):void
 		{
 			if(_isExporting)
 			{
@@ -57,16 +60,18 @@
 			_isExporting = true;

 			_exportType = exportType;
-			_exportScale = exportScale;
+			_scale = scale;

 			switch(_exportType)
 			{
 				case 0:
 				case 2:
 				case 5:
-					_exportScale = 1;
-					break;
-			}
+					_scale = 1;
+					break;
+			}
+
+			_backgroundColor = backgroundColor;

 			exportStart();
 		}
@@ -80,7 +85,7 @@
 			_xmlDataProxy = _importDataProxy.xmlDataProxy;
 			_bitmapData = _importDataProxy.textureAtlas.bitmapData;

-			if(_exportScale != 1)
+			if(_scale != 1)
 			{
 				_xmlDataProxy = _xmlDataProxy.clone();
 				var subBitmapDataDic:Object;
@@ -103,14 +108,14 @@
 					);
 				}

-				_xmlDataProxy.scaleData(_exportScale);
+				_xmlDataProxy.scaleData(_scale);

 				_bitmapData = BitmapDataUtil.getMergeBitmapData(
 					subBitmapDataDic,
 					_xmlDataProxy.getSubTextureRectMap(),
 					_xmlDataProxy.textureAtlasWidth,
 					_xmlDataProxy.textureAtlasHeight,
-					_exportScale
+					_scale
 				);
 			}

@@ -144,7 +149,7 @@
 				case 1:
 					try
 					{
-						dataBytes = getPNGBytes();
+						dataBytes = getPNGBytes(_backgroundColor);
 						if(dataBytes)
 						{
 							exportSave(
@@ -175,7 +180,7 @@
 						}
 						else
 						{
-							dataBytes = getPNGBytes();
+							dataBytes = getPNGBytes(_backgroundColor);
 						}

 						if(dataBytes)
@@ -310,9 +315,19 @@
 			return null;
 		}

-		private function getPNGBytes():ByteArray
-		{
-			if(_importDataProxy.textureAtlas.movieClip)
+		private function getPNGBytes(color:uint = 0):ByteArray
+		{
+			if(color)
+			{
+				var bitmapData:BitmapData = new BitmapData(_bitmapData.width, _bitmapData.height, true, color);
+				bitmapData.draw(_bitmapData);
+
+				var byteArray:ByteArray = PNGEncoder.encode(bitmapData);
+				bitmapData.dispose();
+
+				return byteArray;
+			}
+			else if(_importDataProxy.textureAtlas.movieClip)
 			{
 				return PNGEncoder.encode(_bitmapData);
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 21536
Author:   jasonsj@adobe.com
Date:     2011-07-11T23:14:34.905781Z

Log Message:
-----------
Initial checkin for Callout/CalloutButton and mobile check-in tests.

* Refactored pop up transformations from PopUpAnchor.applyPopUpTransform() to mx.utils.PopUpUtil.applyPopUpTransform()
* CalloutPosition.AUTO not yet implemented
* Visuals are not the final XD design.

QE notes:
Doc notes:
Bugs:
Reviewer: chiedozi
Tests run: checkintests, checkintests-mobile
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/.flexLibProperties</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/views/TestCalloutButton.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/.actionScriptProperties</path>
<path kind="file" action="A">/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/mobiletheme/.flexLibProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/utils/PopUpUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/.actionScriptProperties</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/airMobileBasicTests-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutButtonSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/mobile/scripts/CalloutButtonTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/MobileThemeClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/.flexLibProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/tests/airMobileBasicTests/src/airMobileBasicTests-app.xml</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
@@ -0,0 +1,86 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 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
+{
+
+/**
+ *  Enumeration of horizontal and vertical positions of the Callout component
+ *  relative to the owner.
+ *
+ *  @see spark.components.Callout#horizontalPosition
+ *  @see spark.components.Callout#verticalPosition
+ *
+ *  @langversion 3.0
+ *  @playerversion AIR 3
+ *  @productversion Flex 4.5.2
+ */
+public final class CalloutPosition
+{
+
+    /**
+     *  Position the trailing edge of the callout before the leading edge of the owner.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const BEFORE:String = "before";
+
+    /**
+     *  Position the leading edge of the callout at the leading edge of the owner.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const START:String = "start";
+
+    /**
+     *  Position the horizontalCenter of the callout to the horizontalCenter of the owner.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const MIDDLE:String = "middle";
+
+    /**
+     *  Position the trailing edge of the callout at the trailing edge of the owner.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const END:String = "end";
+
+    /**
+     *  Position the leading edge of the callout after the trailing edge of the owner.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const AFTER:String = "after";
+
+    /**
+     *  Position the callout on the exterior of the owner where the callout
+     *  requires the least amount of resizing to fit.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
+    public static const AUTO:String = "auto";
+
+}
+
+}


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

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

 package spark.components.gridClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 3925
Author:   jimurphy@adobe.com
Date:     2008-10-28T15:28:25.006190Z

Log Message:
-----------
Merged gumbo_alpha revisions 3857-3860,3870,3872,3874-3876,3881,3884,3886,3889,3891,3893,3895,3908,3912 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxRotateEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxFadeEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/CubicBezierSegment.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxVSliderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/LineSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxFadeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxFade.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxListExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxMoveEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/PathSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_conversion.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxAnimateColorEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_core.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxAnimateEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxCheckBoxExample.mxml</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxNumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/DataGroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimateColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleDeclaration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/GroupExample.mxml" copyfrom-rev="3895" action="A">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/GroupExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/QuadraticBezierSegment.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxNumericStepperExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/effects/examples/FxResizeEffectExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxResize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxToggleButtonExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxSpinnerExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/PropertyValuesHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/libs/textLayout_edit.swc</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/TextViewExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxMove.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/asdoc/en_US/mx/components/examples/FxHSliderExample.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/ResizeInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/ResizeInstance.as
@@ -242,8 +242,8 @@
         var childrenHiding:Boolean = false; // hidePanelChildren();

         propertyValuesList =
-            [new PropertyValuesHolder("width", [widthFrom, widthTo]),
-             new PropertyValuesHolder("height", [heightFrom, heightTo])];
+            [new PropertyValuesHolder("width", [widthFrom, widthTo], widthBy),
+             new PropertyValuesHolder("height", [heightFrom, heightTo], heightBy)];

         super.play();

@@ -286,8 +286,6 @@
                 widthFrom = widthTo - widthBy;
             else if (propertyChanges && propertyChanges.start["width"] !== undefined)
                 widthFrom = propertyChanges.start["width"];
-            else
-                widthFrom = getCurrentValue("width");
         }
         if (isNaN(widthTo))
         {
@@ -308,9 +306,8 @@
             }
             else
             {
-                _widthTo = (!isNaN(widthBy)) ?
-                          widthFrom + widthBy :
-                          getCurrentValue("width");
+                if (!isNaN(widthBy) && !isNaN(widthFrom))
+                    _widthTo = widthFrom + widthBy;
             }
         }

@@ -321,8 +318,6 @@
                 heightFrom = heightTo - heightBy;
             else if (propertyChanges && propertyChanges.start["height"] != undefined)
                 heightFrom = propertyChanges.start["height"];
-            else
-                heightFrom = getCurrentValue("height");
         }
         if (isNaN(heightTo))
         {
@@ -343,9 +338,8 @@
             }
             else
             {
-                _heightTo = (!isNaN(heightBy))?
-                           heightFrom + heightBy :
-                           getCurrentValue("height");
+                if (!isNaN(heightBy) && !isNaN(heightFrom))
+                    _heightTo = heightFrom + heightBy;
             }
         }
     }


Add license header to flash/text/TextField

--- src/flash/text/TextField.as
+++ src/flash/text/TextField.as
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2014 Mozilla Foundation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package flash.text {
 import flash.display.DisplayObject;
 import flash.display.InteractiveObject;


NativeRelaySignal now uses _target instead of the getter.

--- src/org/osflash/signals/natives/NativeRelaySignal.as
+++ src/org/osflash/signals/natives/NativeRelaySignal.as
@@ -38,7 +38,7 @@
 			super.add(listener);
 			// Account for cases where the same listener is added twice.
 			if (prevListenerCount == 0 && listenerBoxes.length == 1)
-				IEventDispatcher(target).addEventListener(_eventType, dispatch, false, priority);
+				IEventDispatcher(_target).addEventListener(_eventType, dispatch, false, priority);
 		}

 		/** @inheritDoc */
@@ -49,7 +49,7 @@
 			super.addOnce(listener);
 			// Account for cases where the same listener is added twice.
 			if (prevListenerCount == 0 && listenerBoxes.length == 1)
-				IEventDispatcher(target).addEventListener(_eventType, dispatch, false, priority);
+				IEventDispatcher(_target).addEventListener(_eventType, dispatch, false, priority);
 		}

 		/** @inheritDoc */
@@ -58,7 +58,7 @@
 			var prevListenerCount:uint = listenerBoxes.length;
 			super.remove(listener);
 			if (prevListenerCount == 1 && listenerBoxes.length == 0)
-				IEventDispatcher(target).removeEventListener(_eventType, dispatch);
+				IEventDispatcher(_target).removeEventListener(_eventType, dispatch);
 		}

 	}


- bugfix: reverted last checkin as it was made based on wrong assumptions

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@771 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
+++ src/reprise/ui/layoutmanagers/CSSBoxModelLayoutManager.as
@@ -11,8 +11,8 @@

 package reprise.ui.layoutmanagers
 {
+	import reprise.css.ComputedStyles;
 	import reprise.core.reprise;
-	import reprise.css.ComputedStyles;
 	import reprise.ui.UIComponent;

 	import flash.display.DisplayObject;
@@ -137,25 +137,15 @@
 					}
 				}
 				else if (child.positionInFlow ||
-					child.autoFlags.marginLeft && child.autoFlags.marginRight &&
-					!child.autoFlags.left && !child.autoFlags.right)
+					(child.autoFlags.left && child.autoFlags.right))
 				{
 					if (child.autoFlags.marginLeft)
 					{
 						if (child.autoFlags.marginRight)
 						{
 							//center horizontally
-							var offset : int = elementStyle.paddingLeft;
-							var availableWidth : int = totalAvailableWidth;
-							//for absolutely positioned elements, add 'left' and 'right' to the
-							//calculation
-							if (!child.positionInFlow)
-							{
-								offset += childStyle.left;
-								availableWidth -= childStyle.left + childStyle.right;
-							}
-							child.x = offset +
-								Math.round(availableWidth / 2 - child.outerWidth / 2);
+							child.x = elementStyle.paddingLeft +
+								Math.round(totalAvailableWidth / 2 - child.outerWidth / 2);
 						}
 						else
 						{


Added smoothing to all Image component instances

git-svn-id: 02605e11d3a461bc7e12f3f3880edf4b0c8dcfd0@4621 3e7533ad-8678-4d30-8e38-00a379d3f0d0

--- src/laml/display/Image.as
+++ src/laml/display/Image.as
@@ -57,6 +57,7 @@
 			newValue = createImageFromValue(newValue);
 			if(newValue) {
 				bitmap = newValue;
+				bitmap.smoothing = true;
 				view.addChild(bitmap);
 				preferredWidth = originalWidth = bitmap.width;
 				preferredHeight = originalHeight = bitmap.height;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3582
Author:   egreenfi@adobe.com
Date:     2008-10-11T00:13:59.101068Z

Log Message:
-----------
FxRotate3D effect now no longer uses the component's transform point to rotate, but rather adjusts x/y to simulate rotation around its transform center.  It does so using a new transformAround() method added to ITransformable (including implemetnations by UICompoennt, GraphicElement, and CompoundTransform)

REview: Chet
QA: shouldn't affect any existing test cases
Checkintests: passed

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/ITransformable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/CompoundTransform.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateInstance.as
@@ -402,7 +402,7 @@
      * propertyValuesList array. This is called by the update and end
      * functions, which are called by the Animation during the animation.
      */
-    private function setVals(value:Object):void
+    protected function applyValues(value:Object):void
     {
         var holder:PropertyValuesHolder;

@@ -439,7 +439,7 @@
      */
     protected function updateHandler(event:AnimationEvent):void
     {
-        setVals(event.value);
+        applyValues(event.value);
         dispatchEvent(event);
     }


performance improvements

performance improvements

Change-Id: Ieb35a9206dc1c1a41b76c37976fda0af9089e104

--- WeaveAPI/src/JavaScript.as
+++ WeaveAPI/src/JavaScript.as
@@ -110,6 +110,11 @@
 		private static var _functionCounter:int = 0;

 		/**
+		 * This flag will be set to true whenever _jsonReplacer makes a replacement that requires _jsonReviver to interpret.
+		 */
+		private static var _needsReviving:Boolean = false;
+
+		/**
 		 * Alias for ExternalInterface.available
 		 * @see flash.external.ExternalInterface#available
 		 */
@@ -134,17 +139,6 @@
 			if (!_objectID)
 				_objectID = getExternalObjectID();
 			return 'document.getElementById("' + _objectID + '")';
-		}
-
-		/**
-		 * Generates a line of JavaScript which intializes a variable equal to this Flash object using document.getElementById().
-		 * @param variableName The variable name, which must be a valid JavaScript identifier.
-		 */
-		private static function JS_var_this(variableName:String):String
-		{
-			if (!_objectID)
-				_objectID = getExternalObjectID(variableName);
-			return 'var ' + variableName + ' = ' + JS_this + ';';
 		}

 		/**
@@ -155,13 +149,14 @@
 		 */
 		private static function getExternalObjectID(desiredId:String = "flash"):String
 		{
-			var id:String = ExternalInterface.objectID;
-			if (!id) // if we don't know our ID
+			if (!_objectID)
+				_objectID = ExternalInterface.objectID;
+			if (!_objectID) // if we don't know our ID
 			{
 				// use addCallback() to add a property to the flash component that will allow us to be found
 				ExternalInterface.addCallback(JSON_SUFFIX, trace);
 				// find the element with the unique property name and get its ID (or set the ID if it doesn't have one)
-				id = ExternalInterface.call(
+				_objectID = ExternalInterface.call(
 					"function(uid, newId){\
 						while (document.getElementById(newId))\
 							newId += '_';\
@@ -174,7 +169,7 @@
 					desiredId
 				);
 			}
-			return id;
+			return _objectID;
 		}

 		/**
@@ -185,6 +180,7 @@
 			// one-time initialization attempt
 			initialized = true;

+			// save special IDs for values not supported by JSON
 			for each (var symbol:* in [undefined, NaN, Infinity, -Infinity])
 				_jsonLookup[symbol + JSON_SUFFIX] = symbol;

@@ -231,7 +227,7 @@
 					"    }",
 					"    if (value === undefined || (typeof value === 'number' && !isFinite(value)))",
 					"        return value + JSON_SUFFIX;",
-					"    return Array.isArray(value) ? [].concat(value) : value;",
+					"    return Array.isArray(value) && !(value instanceof Array) ? [].concat(value) : value;",
 					"};",

 					"flash[JSON_REVIVER] = function(key, value) {",
@@ -296,10 +292,14 @@
 					_jsonLookup[value] = id;
 					_jsonLookup[id] = value;
 				}
+				_needsReviving = true;
 				return id;
 			}
 			if (value === undefined || (typeof value === 'number' && !isFinite(value)))
+			{
+				_needsReviving = true;
 				return value + JSON_SUFFIX;
+			}
 			return value;
 		}

@@ -419,9 +419,13 @@
 						if (key == 'this')
 						{
 							// put a variable declaration at the beginning of the code
-							var thisVar:String = String(value);
+							var thisVar:String = value as String;
 							if (thisVar)
-								code.unshift(JS_var_this(thisVar));
+							{
+								if (!_objectID)
+									getExternalObjectID(thisVar);
+								code.unshift("var " + thisVar + " = this;");
+							}
 						}
 						else if (key == 'catch')
 						{
@@ -432,12 +436,17 @@
 						{
 							// put a variable declaration at the beginning of the code
 							var jsValue:String;
-							if (value === null || value === undefined || (value is Number && !isFinite(value)))
+							if (value === null || value === undefined || value is Number || value is Boolean)
 								jsValue = String(value);
+							else if (value is Function)
+								jsValue = 'this.' + JSON_REVIVER + '("", ' + json.stringify(value, _jsonReplacer) + ')';
 							else if (typeof value === 'object')
-								jsValue = "JSON.parse(" + json.stringify(json.stringify(value, _jsonReplacer)) + ", this[" + json.stringify(JSON_REVIVER) + "])";
-							else if (value is Function)
-								jsValue = "this[" + json.stringify(JSON_REVIVER) + "]('', " + json.stringify(value, _jsonReplacer) + ")";
+							{
+								_needsReviving = false;
+								jsValue = json.stringify(value, _jsonReplacer);
+								if (_needsReviving)
+									jsValue = 'JSON.parse(' + json.stringify(jsValue) + ', this.' + JSON_REVIVER + ')';
+							}
 							else
 								jsValue = json.stringify(value);

@@ -474,7 +483,7 @@
 				if (json)
 				{
 					// stringify results
-					appliedCode = "JSON.stringify(" + appliedCode + ", " + JS_this + "[" + json.stringify(JSON_REPLACER) + "])";
+					appliedCode = 'JSON.stringify(' + appliedCode + ', ' + JS_this + '.' + JSON_REPLACER + ')';

 					// work around unescaped backslash bug
 					if (backslashNeedsEscaping && appliedCode.indexOf('\\') >= 0)


I think this depencency on Stage is obsolete now.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@5040 542714f4-19e9-0310-aa3c-eee0fc999fb1

--- src/as/com/threerings/presents/client/Client.as
+++ src/as/com/threerings/presents/client/Client.as
@@ -21,8 +21,6 @@

 package com.threerings.presents.client {

-import flash.display.Stage;
-
 import flash.events.EventDispatcher;
 import flash.events.TimerEvent;

@@ -30,7 +28,6 @@

 import com.threerings.util.Log;
 import com.threerings.util.MethodQueue;
-import com.threerings.util.ObserverList;

 import com.threerings.presents.client.InvocationService_ConfirmListener;
 import com.threerings.presents.data.ClientObject;
@@ -51,10 +48,9 @@

     private static const log :Log = Log.getLog(Client);

-    public function Client (creds :Credentials, stage :Stage)
+    public function Client (creds :Credentials)
     {
         _creds = creds;
-        _stage = stage;
     }

     /**
@@ -111,14 +107,6 @@
         MethodQueue.callLater(fn, args);
     }

-    /**
-     * @return the Stage object we're living in.
-     */
-    public function getStage () :Stage
-    {
-        return _stage;
-    }
-
     public function getHostname () :String
     {
         return _hostname;
@@ -441,9 +429,6 @@

     /** The credentials we used to authenticate with the server. */
     protected var _creds :Credentials;
-
-    /** The stage upon which our client runs. */
-    protected var _stage :Stage;

     /** The version string reported to the server at auth time. */
     protected var _version :String = "";


- change: Fixed and improved debugging interface

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@523 bc4816be-ef27-423a-9c4d-fc420be121a2

--- src/reprise/ui/DocumentView.as
+++ src/reprise/ui/DocumentView.as
@@ -11,6 +11,8 @@

 package reprise.ui
 {
+	import flash.geom.Rectangle;
+
 	import reprise.core.ApplicationContext;
 	import reprise.core.UIRendererFactory;
 	import reprise.core.reprise;
@@ -400,11 +402,10 @@
 		}
 		protected function debugMarkElement(element : UIComponent) : void
 		{
-			var output : String = 'Element: ' + element + '\n';
-
-			var display : Sprite = element.valueForKey('m_contentDisplay');
-			var position : Point = new Point(display.x, display.y);
-			position = element.localToGlobal(position);
+			var output : String = '\nElement: ' + element +
+				'\nSelectorpath: ' + element.selectorPath.split('@').join('') + '\n';
+
+			var position : Point = element.getPositionRelativeToDisplayObject(this);
 			m_debugInterface.x = position.x;
 			m_debugInterface.y = position.y;


fixed bug in getText()

fixed bug in getText()

--- WeaveJS/src/weavejs/core/Locale.as
+++ WeaveJS/src/weavejs/core/Locale.as
@@ -51,12 +51,10 @@
 			else // make the original text appear in the lookup table even though there is no translation yet.
 				_data[text] = null;

-			// if we couldn't find an alternate translation, just return the original text
-			if (result == null && locale == 'piglatin')
+			if (!result && locale == 'piglatin')
 				return makePigLatins(text);

-			//trace('localize(',arguments,') = ',result);
-			return result;
+			return result || text;
 		}

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17297
Author:   rfrishbe@adobe.com
Date:     2010-08-12T00:57:49.940595Z

Log Message:
-----------
Fixing up MobileItemRenderer and List to better deal with 5-way support.  Now when someone presses Enter, the caretted item will be selected when inputMode == "touch".  When figuring out 5-way support for real, this will probably change, but I put this in for now.  I also changed MobileItemRenderer to not draw the separators when it's the caretted item.  Once we get a real XD spec on how item renderers should look (and how 5-ways support for them works/looks), this will change.

Also modified TrackBase so that if we're in touch inputMode, the track isn't selectable.  More work needs to be done here around the thumb and touch scrolling interaction, so this is just a start.

QE notes: None
Doc notes: None
Bugs: SDK-27379, SDK-27366
Reviewer: Jason SJ
Tests run: checkintests, mustella slider, scroller, scrollbar
Is noteworthy for integration: No

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

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

--- frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as
@@ -718,18 +718,21 @@

         graphics.endFill();

-        // FIXME (rfrishbe): separators should be stylable
-
-        // draw seperators: two lines
-        // 1 pixel from bottom
-        graphics.lineStyle(1, 0x1C1C1C);
-        graphics.moveTo(0, unscaledHeight-1);
-        graphics.lineTo(unscaledWidth, unscaledHeight-1);
-
-        // line on the bottom
-        graphics.lineStyle(1, 0x606060);
-        graphics.moveTo(0, unscaledHeight);
-        graphics.lineTo(unscaledWidth, unscaledHeight);
+        if (!showsCaret)
+        {
+            // FIXME (rfrishbe): separators should be stylable
+
+            // draw seperators: two lines
+            // 1 pixel from bottom
+            graphics.lineStyle(1, 0x1C1C1C);
+            graphics.moveTo(0, unscaledHeight-1);
+            graphics.lineTo(unscaledWidth, unscaledHeight-1);
+
+            // line on the bottom
+            graphics.lineStyle(1, 0x606060);
+            graphics.moveTo(0, unscaledHeight);
+            graphics.lineTo(unscaledWidth, unscaledHeight);
+        }
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 19722
Author:   egeorgie@adobe.com
Date:     2011-01-12T00:53:24.336848Z

Log Message:
-----------
Fix popups/tooltips and scaling bugs:
Slider tooltip renders far above under 2.0 scaling - http://bugs.adobe.com/jira/browse/SDK-28833
Mobile HSliderSkin dataTip sometimes stops following the thumb all the way to the right edge - http://bugs.adobe.com/jira/browse/SDK-28762
When the app is scaled, DropDownList shows the list at wrong place - http://bugs.adobe.com/jira/browse/SDK-28818

In this change:
- update popup/tooltip positioning code to work with scaling.

QE notes:  make another test pass on tooltips/pop-ups
Doc notes:
Bugs: SDK-28833, SDK-28762, SDK-28818
Reviewer: Alex
Tests run: full mustella cyclone
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/DragManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/BitmapUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/PopUpUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridItemRenderer.as
@@ -25,6 +25,7 @@
 import mx.events.ToolTipEvent;
 import mx.managers.ISystemManager;
 import mx.managers.ToolTipManager;
+import mx.utils.PopUpUtil;

 import spark.components.Grid;
 import spark.components.Group;
@@ -128,33 +129,20 @@
 		toolTip.text = renderer.column.itemToDataTip(renderer.data);
 		ToolTipManager.sizeTip(toolTip);

-		// Move the origin of the tooltip to the origin of this item renderer
-
-		var sm:ISystemManager = uiComp.systemManager.topLevelSystemManager;
-		var sbRoot:DisplayObject = sm.getSandboxRoot();
-		var screen:Rectangle = sm.getVisibleApplicationRect(null, true);
-
-		const x:int = mirror ? renderer.width - toolTip.width : 0;
-		var pt:Point = new Point(x, 0);
-
-		pt = uiComp.localToGlobal(pt);
-		pt = sbRoot.globalToLocal(pt);
-
-		toolTip.move(pt.x, Math.round(pt.y + (renderer.height - toolTip.height) / 2));
-
-		const screenRight:Number = screen.x + screen.width;
-		pt.x = toolTip.x;
-		pt.y = toolTip.y;
-		pt = sbRoot.localToGlobal(pt);
-
-		if (pt.x + toolTip.width > screenRight)
-		{
-			pt.x = toolTip.x - (pt.x + toolTip.width - screenRight);
-			toolTip.move(pt.x, toolTip.y);
-		}
-
-		if (mirror && pt.x < 0)
-			toolTip.move(0, toolTip.y);
+        // We need to position the tooltip at same x coordinate,
+        // center vertically and make sure it doesn't overlap the screen.
+        // Call the helper function to handle this for us.
+
+        // Assume there's no scaling in the coordinate space between renderer.width and toolTip.width
+        const x:int = mirror ? renderer.width - toolTip.width : 0;
+        var pt:Point = PopUpUtil.positionOverComponent(DisplayObject(uiComp),
+                                                       uiComp.systemManager,
+                                                       toolTip.width,
+                                                       toolTip.height,
+                                                       renderer.height / 2,
+                                                       null,
+                                                       new Point(x, 0));
+        toolTip.move(pt.x, pt.y);
 	}

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 3047
Author:   gruehle@adobe.com
Date:     2008-08-29T22:18:20.601349Z

Log Message:
-----------
Checking in for Jason.

This is the big display object sharing optimization for Group. Adjacent graphic elements that do not require their own display object now draw into a common shared display object.

There should be no functionality changes. The only exception is masks on graphic elements are broken. If you find any other functional differences, please file a bug.

The changes have been cycloned by the SDK QE and Thermo.

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

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

--- frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as
+++ frameworks/projects/spark/src/spark/primitives/supportClasses/FilledElement.as
@@ -105,7 +105,7 @@
 		// Don't call super.beginDraw() since it will also set up an
 		// invisible fill.

-		var bounds:Rectangle = new Rectangle(0, 0, width, height);
+		var bounds:Rectangle = new Rectangle(drawX, drawY, width, height);
 		if (stroke)
 			stroke.draw(g, bounds);
 		else


Moved the SocketServer initialization to occur after PBE has started and the ServerGame has been created

--- airServerDemo/src/ServerMain.as
+++ airServerDemo/src/ServerMain.as
@@ -56,20 +56,7 @@

 		private function init(e:Event = null):void
 		{
-			Logger.print(this, "ServerSocket started");
-
-			server.addEventListener(Event.CONNECT, onConnect);
-
-			server.bind(port); // Pass in the port number you want to listen on
-			server.listen();
-
-			policySocket.addEventListener( Event.CONNECT, onPolicyConnect );
-			policySocket.bind( 843 ); //843 is adobe's default server policy port where the client will first check for permissions
-			policySocket.listen();
-
-			Logger.print(this,  "Running Policy File Server on port 843");
-			Logger.print(this, "Running Game Server on port " + port );
-			Logger.print(this,  "Starting PBE...");
+			Logger.print(this, "Game Server started");

 			//register class types with PBE.  This is in a central location so both server and client can call this.
 			Resources.registerTypes();
@@ -85,11 +72,28 @@

 			//PBE requires a scene at startup, so pass the server scene, which we can remove later
 			PBE.startup(scene);
+			Logger.print(this,  "Starting PBE...");

+			//create the instance of the ServerGame
 			serverGame = new ServerGame();
+
+			//setup our main game socket listener
+			server.addEventListener(Event.CONNECT, onConnect);
+			server.bind(port); // Pass in the port number you want to listen on
+			server.listen(); //start listening for connections
+
+			//setup our security socket listener to return the policy file
+			policySocket.addEventListener( Event.CONNECT, onPolicyConnect );
+			policySocket.bind( 843 ); //843 is adobe's default server policy port where the client will first check for permissions
+			policySocket.listen();
+
+			Logger.print(this,  "Running Policy File Server on port 843");
+			Logger.print(this, "Running Game Server on port " + port );
+
+			//once the sockets are created, start the game
 			serverGame.onStart();

-			//dedicated server doesnt need the scene view rendering, so remove the scene after startup
+			//dedicated server doesnt need the scene view rendering, so remove the scene after startup.  For now we'll just leave it for debugging
 			//removeChild(scene);
 		}


Wrap a stack overflow test in the proper exception handler; the overflow is signaled now that the regex code checks for stack overflow on deep recursions.

--- test/acceptance/ecma3/RegExp/eregress_119909.as
+++ test/acceptance/ecma3/RegExp/eregress_119909.as
@@ -80,9 +80,11 @@
 	  for (var i=0; i<numParens; i++) {pattern += openParen;}
 	  pattern += strOriginal;
 	  for (i=0; i<numParens; i++) {pattern += closeParen;}
-	  var re = new RegExp(pattern);
+
+	  try {
+	      var re = new RegExp(pattern);

-	  if (doBackRefs) {
+	      if (doBackRefs) {
 		  var res = strOriginal.search(re);
 		  array[item++] = new TestCase(SECTION, "strOriginal.search(re)", -1, res);

@@ -91,7 +93,7 @@

 		  res = strOriginal.replace(re, strReplace);
 		  array[item++] = new TestCase(SECTION, "strOriginal.replace(re, strReplace)", "hello", res);
-	  } else {
+	      } else {
 	  	  var res = strOriginal.search(re);
 		  array[item++] = new TestCase(SECTION, "strOriginal.search(re)", 0, res);

@@ -103,6 +105,13 @@
 		  res = strOriginal.replace(re, strReplace);
 		  array[item++] = new TestCase(SECTION, "strOriginal.replace(re, strReplace)", "goodbye", res);

+	      }
+	  }
+	  catch (e: Error) {
+	      if (e.message.match("#1023"))
+		  array[item++] = new TestCase(SECTION, "str.search(re)", 0, 0);
+	      else
+		  throw(e);
 	  }
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18129
Author:   chiedozi@adobe.com
Date:     2010-10-11T21:18:23.983258Z

Log Message:
-----------
Merge BOM changes from revision 18117 of the preview branch.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/packages.dita</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/spark.events.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/spark.core.managers.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionBarBackground.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/spark.components.supportClasses.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/spark.components.supportClasses.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/packages.dita</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/spark.components.supportClasses.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/packages.dita</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/packages.dita</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/spark.core.managers.xml</path>
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private/frameworks/locale/zh_TW</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/.project</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/spark.components.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/spark.core.managers.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/spark.components.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/spark.core.managers.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/.flexLibProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/.actionScriptProperties</path>
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/performance</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/spark.events.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/spark.effects.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/NavigationButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/spark.events.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/TextInput_border.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/Button_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/spark.components.xml</path>
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses</path>
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/.actionScriptProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_upSelected.fxg</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/mobiletheme/src/spark/skins/mobile/assets/RadioButton_upSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/fr_FR/docs/spark.effects.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/.flexLibProperties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/de_DE/docs/spark.effects.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/spark.effects.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/ActionButton_up.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/PaddingStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/zh_CN/docs/spark.components.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/spark.events.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/NavigationButton_down.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/CheckBox_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/.project</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/assets/RadioButton_downSelected.fxg</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/bundles/ja_JP/docs/spark.components.supportClasses.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/styles/metadata/PaddingStyles.as
+++ frameworks/projects/mobilecomponents/src/spark/styles/metadata/PaddingStyles.as
@@ -1,7 +1,7 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
 //  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
+//  Copyright 2005-2010 Adobe Systems Incorporated
 //  All Rights Reserved.
 //
 //  NOTICE: Adobe permits you to use, modify, and distribute this file


Transferred from the Adobe Open Source Subversion Repository

Revision: 19395
Author:   hmuller@adobe.com
Date:     2010-12-15T19:17:26.366313Z

Log Message:
-----------
Improved List scroll positioning after a dataProvider refresh for one case: if the caret item is visible, after a refresh attempt to scroll so that it's in the same relative position, and select it.

DataGroup/getElementAt(index) now returns the item renderer for index, even if index is not a valid dataProvider index (anymore).

QE notes: Four Mustella tests to be updated (Jacob, Ella).
Doc notes:
Bugs: SDK-23283
Reviewer: Ryan
Tests run: checkin, mustella
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/IGridItemRenderer.as
@@ -175,7 +175,8 @@
     function set column(value:GridColumn):void;

     /**
-     *  The column index for this item renderer's cell.
+     *  The column index for this item renderer's cell.
+     *  This is the same value as column.columnIndex.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10


Transferred from the Adobe Open Source Subversion Repository

Revision: 6360
Author:   hmuller@adobe.com
Date:     2009-04-28T22:01:58.900428Z

Log Message:
-----------
Added minViewportInset:Number Scroller property.   It specifies the minimum inset of the viewport relative to the Scroller.   If a scrollbar is visible then the viewport is inset by the minViewportInset or the scrollbar's size, whichever is larger.  This property was added to make it possible to fine tune the white space around viewports in skins that include a Scroller.

QE Notes: New Scroller property warrants additional tests.
Doc Notes:
Bugs:
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as
@@ -61,17 +61,18 @@
         if (!scroller)
             return;

-        var measuredW:Number = 0;
-        var measuredH:Number = 0;
-        var minW:Number = 0;
-        var minH:Number = 0;
+        var minViewportInset:Number = scroller.minViewportInset;
+        var measuredW:Number = minViewportInset;
+        var measuredH:Number = minViewportInset;
+        var minW:Number = minViewportInset;
+        var minH:Number = minViewportInset;

         var viewport:IViewport = scroller.viewport;
         if (viewport)
         {
             var viewportElt:ILayoutElement = ILayoutElement(viewport);
-            measuredW = viewportElt.getPreferredBoundsWidth();
-            measuredH = viewportElt.getPreferredBoundsHeight();
+            measuredW += viewportElt.getPreferredBoundsWidth();
+            measuredH += viewportElt.getPreferredBoundsHeight();
         }

         var hsb:ScrollBar = scroller.horizontalScrollBar;
@@ -98,17 +99,28 @@

         if (showHSB)
         {
-            measuredH += hsb.getPreferredBoundsHeight();
+            measuredH += Math.max(minViewportInset, hsb.getPreferredBoundsHeight());
             minW += hsb.getMinBoundsWidth();
-            minH += hsb.getMinBoundsHeight();
-        }
+            minH += Math.max(minViewportInset, hsb.getMinBoundsHeight());
+        }
+        else
+        {
+            measuredH += minViewportInset;
+            minH += minViewportInset;
+        }
+
         if (showVSB)
         {
-            measuredW += vsb.getPreferredBoundsWidth();
-            minW += vsb.getMinBoundsWidth();
+            measuredW += Math.max(minViewportInset, vsb.getPreferredBoundsWidth());
+            minW += Math.max(minViewportInset, vsb.getMinBoundsWidth());
             minH += vsb.getMinBoundsHeight();
         }
-
+        else
+        {
+            measuredW += minViewportInset;
+            minW += minViewportInset;
+        }
+
         var g:GroupBase = target;
         g.measuredWidth = measuredW;
         g.measuredHeight = measuredH;
@@ -139,8 +151,9 @@
         var viewport:IViewport = scroller.viewport;
         var hsb:ScrollBar = scroller.horizontalScrollBar;
         var vsb:ScrollBar = scroller.verticalScrollBar;
-
-        // Decide which scrollbars will be visible
+        var minViewportInset:Number = scroller.minViewportInset;
+
+        // Decide which scrollbars will be visible based on the viewport's content size
         var showHSB:Boolean = false;
         var hAuto:Boolean = false;
         switch(scroller.horizontalScrollPolicy) {
@@ -150,7 +163,7 @@
             case ScrollPolicy.AUTO:
                 if (hsb && viewport)
                 {
-                    showHSB = viewport.contentWidth > w;
+                    showHSB = viewport.contentWidth > (w - (minViewportInset * 2));
                     hAuto = true;
                 }
                 break;
@@ -164,50 +177,55 @@
             case ScrollPolicy.AUTO:
                 if (vsb && viewport)
                 {
-                    showVSB = viewport.contentHeight > h;
+                    showVSB = viewport.contentHeight > (h - (minViewportInset * 2));
                     vAuto = true;
                 }
                 break;
         }

         // Shrink the viewport's width,height for the visible scrollbars
-        var viewportH:Number = h;
+        var viewportH:Number = h - minViewportInset;
         var hsbH:Number = 0;
         if (showHSB)
         {
             hsbH = hsb.getPreferredBoundsHeight();
-            viewportH -= hsbH;
-        }
-        var viewportW:Number = w;
+            viewportH -= Math.max(minViewportInset, hsbH);
+        }
+        var viewportW:Number = w - minViewportInset;
         var vsbW:Number = 0;
         if (showVSB)
         {
             vsbW = vsb.getPreferredBoundsWidth();
-            viewportW -= vsbW;
+            viewportW -= Math.max(minViewportInset, vsbW);
         }

         // If the scrollBarPolicy is auto, and we're only showing one scrollbar,
         // the viewport may have shrunk enough to require showing the other one.
-
         if (showVSB && !showHSB && hAuto && (viewport.contentWidth > viewportW))
         {
             showHSB = true;
             hsbH = hsb.getPreferredBoundsHeight();
-            viewportH -= hsbH;
+            viewportH -= Math.max(minViewportInset, hsbH);
         }
         else if (!showVSB && showHSB && vAuto && (viewport.contentHeight > viewportH))
         {
             showVSB = true;
             vsbW = vsb.getPreferredBoundsWidth();
-            viewportW -= vsbW;
-        }
+            viewportW -= Math.max(minViewportInset, vsbW);
+        }
+
+        // Factor in scrollBar-side viewportInsets where there aren't scrollbars
+        if (!showHSB)
+            viewportH -= minViewportInset;
+        if (!showVSB)
+            viewportW -= minViewportInset;

         // layout the viewport
         if (viewport)
         {
             var viewportElt:ILayoutElement = ILayoutElement(viewport);
             viewportElt.setLayoutBoundsSize(viewportW, viewportH);
-            viewportElt.setLayoutBoundsPosition(0,0);
+            viewportElt.setLayoutBoundsPosition(minViewportInset, minViewportInset);
         }

         // layout the scrollbars
@@ -215,13 +233,13 @@
         if (showHSB)
         {
             hsb.setLayoutBoundsSize(Math.max(hsb.getMinBoundsWidth(), viewportW), hsbH);
-            hsb.setLayoutBoundsPosition(0, h - hsbH);
+            hsb.setLayoutBoundsPosition(minViewportInset, h - Math.max(minViewportInset, hsbH));
         }
         if (vsb) vsb.visible = showVSB;
         if (showVSB)
         {
             vsb.setLayoutBoundsSize(vsbW, Math.max(vsb.getMinBoundsHeight(), viewportH));
-            vsb.setLayoutBoundsPosition(w - vsbW, 0);
+            vsb.setLayoutBoundsPosition(w - Math.max(minViewportInset, vsbW), minViewportInset);
         }

         target.setContentSize(w, h);


Transferred from the Adobe Open Source Subversion Repository

Revision: 2462
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:13:06.620116Z

Log Message:
-----------
gumbo push to trunk

Modified Paths:
--------------
214 paths were modified

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

--- frameworks/projects/framework/src/mx/states/SetProperty.as
+++ frameworks/projects/framework/src/mx/states/SetProperty.as
@@ -43,7 +43,7 @@
  *
  *  @includeExample examples/StatesExample.mxml
  */
-public class SetProperty implements IOverride
+public class SetProperty extends OverrideBase implements IOverride
 {
     include "../core/Version.as";

@@ -114,13 +114,25 @@
      *  Storage for the old property value.
      */
     private var oldValue:Object;
-
+
     /**
      *  @private
      *  Storage for the old related property values, if used.
      */
     private var oldRelatedValues:Array;

+    /**
+     *  @private
+     *  Flag which tracks if we're actively overriding a property.
+     */
+    private var applied:Boolean = false;
+
+    /**
+     *  @private
+     *  Our most recent parent context.
+     */
+    private var parentContext:UIComponent = null;
+
     //--------------------------------------------------------------------------
     //
     //  Properties
@@ -161,13 +173,36 @@
     //----------------------------------

     [Inspectable(category="General")]
-
+
+    /**
+     *  @private
+     *  Storage for the value property.
+     */
+    public var _value:*;
+
     /**
      *  The new value for the property.
      *
      *  @default undefined
      */
-    public var value:*;
+    public function get value():*
+    {
+        return _value;
+    }
+
+    /**
+     *  @private
+     */
+    public function set value(val:*):void
+    {
+        _value = val;
+
+        // Reapply if necessary.
+        if (applied)
+        {
+            apply(parentContext);
+        }
+    }

     //--------------------------------------------------------------------------
     //
@@ -188,85 +223,104 @@
      *  @inheritDoc
      */
     public function apply(parent:UIComponent):void
-    {
-        var obj:Object = target ? target : parent;
-
-        var propName:String = PSEUDONYMS[name] ?
-                          PSEUDONYMS[name] :
-                          name;
-
-        var relatedProps:Array = RELATED_PROPERTIES[propName] ?
-                                 RELATED_PROPERTIES[propName] :
-                                 null;
-
-        var newValue:* = value;
-
-        // Remember the current value so it can be restored
-        oldValue = obj[propName];
-
-        if (relatedProps)
+    {
+        var obj:* = getOverrideContext(target, parent);
+        if (obj != null)
         {
-            oldRelatedValues = [];
-
-            for (var i:int = 0; i < relatedProps.length; i++)
-                oldRelatedValues[i] = obj[relatedProps[i]];
+        	target = obj;
+	        var propName:String = PSEUDONYMS[name] ?
+	                          PSEUDONYMS[name] :
+	                          name;
+
+	        var relatedProps:Array = RELATED_PROPERTIES[propName] ?
+	                                 RELATED_PROPERTIES[propName] :
+	                                 null;
+
+	        var newValue:* = value;
+
+	        // Remember the original value so it can be restored later
+	        // after we are asked to remove our override (and only if we
+	        // aren't being asked to re-apply a value).
+	        if (!applied)
+	        {
+	            oldValue = obj[propName];
+	        }
+
+	        if (relatedProps)
+	        {
+	            oldRelatedValues = [];
+
+	            for (var i:int = 0; i < relatedProps.length; i++)
+	                oldRelatedValues[i] = obj[relatedProps[i]];
+	        }
+
+	        // Special case for width and height. If they are percentage values,
+	        // set the percentWidth/percentHeight instead.
+	        if (name == "width" || name == "height")
+	        {
+	            if (newValue is String && newValue.indexOf("%") >= 0)
+	            {
+	                propName = name == "width" ? "percentWidth" : "percentHeight";
+	                newValue = newValue.slice(0, newValue.indexOf("%"));
+	            }
+	            else
+	            {
+	                // Need to set width/height instead of explicitWidth/explicitHeight
+	                // otherwise width/height are out of sync until the target is validated.
+	                propName = name;
+	            }
+	        }
+
+	        // Set new value
+	        setPropertyValue(obj, propName, newValue, oldValue);
+
+	        // Save state in case our value is changed again while applied.  This can
+	        // occur when our value property is databound.
+	        applied = true;
+	        this.parentContext = parent;
         }
-
-        // Special case for width and height. If they are percentage values,
-        // set the percentWidth/percentHeight instead.
-        if (name == "width" || name == "height")
+    }
+
+    /**
+     *  @inheritDoc
+     */
+    public function remove(parent:UIComponent):void
+    {
+        var obj:* = getOverrideContext(target, parent);
+        if (obj != null)
         {
-            if (newValue is String && newValue.indexOf("%") >= 0)
-            {
-                propName = name == "width" ? "percentWidth" : "percentHeight";
-                newValue = newValue.slice(0, newValue.indexOf("%"));
-            }
-            else
-            {
-                // Need to set width/height instead of explicitWidth/explicitHeight
-                // otherwise width/height are out of sync until the target is validated.
-                propName = name;
-            }
-        }
-
-        // Set new value
-        setPropertyValue(obj, propName, newValue, oldValue);
-    }
-
-    /**
-     *  @inheritDoc
-     */
-    public function remove(parent:UIComponent):void
-    {
-        var obj:Object = target ? target : parent;
-
-        var propName:String = PSEUDONYMS[name] ?
-                          PSEUDONYMS[name] :
-                          name;
-
-        var relatedProps:Array = RELATED_PROPERTIES[propName] ?
-                                 RELATED_PROPERTIES[propName] :
-                                 null;
-
-        // Special case for width and height. Restore the "width" and
-        // "height" properties instead of explicitWidth/explicitHeight
-        // so they can be kept in sync.
-        if ((name == "width" || name == "height") && !isNaN(Number(oldValue)))
-        {
-            propName = name;
-        }
-
-        // Restore the old value
-        setPropertyValue(obj, propName, oldValue, oldValue);
-
-        // Restore related value, if needed
-        if (relatedProps)
-        {
-            for (var i:int = 0; i < relatedProps.length; i++)
-            {
-                setPropertyValue(obj, relatedProps[i],
-                        oldRelatedValues[i], oldRelatedValues[i]);
-            }
+	        var propName:String = PSEUDONYMS[name] ?
+	                          PSEUDONYMS[name] :
+	                          name;
+
+	        var relatedProps:Array = RELATED_PROPERTIES[propName] ?
+	                                 RELATED_PROPERTIES[propName] :
+	                                 null;
+
+	        // Special case for width and height. Restore the "width" and
+	        // "height" properties instead of explicitWidth/explicitHeight
+	        // so they can be kept in sync.
+	        if ((name == "width" || name == "height") && !isNaN(Number(oldValue)))
+	        {
+	            propName = name;
+	        }
+
+	        // Restore the old value
+	        setPropertyValue(obj, propName, oldValue, oldValue);
+
+	        // Restore related value, if needed
+	        if (relatedProps)
+	        {
+	            for (var i:int = 0; i < relatedProps.length; i++)
+	            {
+	                setPropertyValue(obj, relatedProps[i],
+	                        oldRelatedValues[i], oldRelatedValues[i]);
+	            }
+	        }
+
+	        // Clear our flags and override context.
+	        applied = false;
+	        parentContext = null;
         }
     }