Transferred from the Adobe Open Source Subversion Repository

Revision: 19131
Author:   egeorgie@adobe.com
Date:     2010-12-08T01:57:27.424504Z

Log Message:
-----------
Fix issues with density scaling and transitions.

In this change:
- apply the inverse concatenated matrix to the transition bitmap snapshot
- use faster version of the bitmap snapshot function - draw only once, no read-back from the bitmap data for bounds detection.

QE notes:
Doc notes:
Bugs:
Reviewer: Corey
Tests run: checkintests, manual testing
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/CrossFadeViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/FlipViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ViewTransitionBase.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/mobilecomponents/src/spark/transitions/SlideViewTransition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/transitions/ZoomViewTransition.as</path>

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

--- frameworks/projects/spark/src/spark/utils/BitmapUtil.as
+++ frameworks/projects/spark/src/spark/utils/BitmapUtil.as
@@ -16,6 +16,7 @@
 import flash.display.IBitmapDrawable;
 import flash.geom.ColorTransform;
 import flash.geom.Matrix;
+import flash.geom.Point;
 import flash.geom.Rectangle;

 import mx.core.IUIComponent;
@@ -38,6 +39,67 @@
     //  Class methods
     //
     //--------------------------------------------------------------------------
+
+    /**
+     *  Creates a BitmapData representation of the target object.
+     *
+     *  @param target The object to capture in the resulting BitmapData
+     *
+     *  @param bounds If non-null, this Rectangle will be populated with
+     *  the visible bounds of the object, relative to the object itself.
+     *
+     *  @param padding Padding, in pixels, around to target to be included in the bitmap.
+     *
+     *  @return A BitmapData object containing the image.
+     *
+     *  @param propagateColorTransform If true, the target's color transform will
+     *  be applied to the bitmap capture operation.
+     *
+     *  @throws SecurityError The target object and  all of its child
+     *  objects do not come from the same domain as the caller,
+     *  or are not in a content that is accessible to the caller by having called the
+     *  Security.allowDomain() method.
+     *
+     */
+    public static function getSnapshotWithPadding(target:IUIComponent,
+                                                  padding:int = 4,
+                                                  propagateColorTransform:Boolean = false,
+                                                  bounds:Rectangle = null):BitmapData
+    {
+        var width:Number = target.width;
+        var height:Number = target.height;
+        var m:Matrix = MatrixUtil.getConcatenatedComputedMatrix(target as DisplayObject);
+
+        var position:Point = new Point(-padding, -padding);
+        var size:Point = MatrixUtil.transformBounds(width + padding * 2,
+                                                      height + padding * 2,
+                                                      m,
+                                                      position);
+
+        // Translate so that when we draw, the bitmap aligns with the top-left
+        // corner of the bmpData
+        position.x = Math.floor(position.x);
+        position.y = Math.floor(position.y);
+        m.translate(-position.x, -position.y);
+
+        // Update the visibe bounds:
+        if (!bounds)
+            bounds = new Rectangle();
+        bounds.x = position.x;
+        bounds.y = position.y;
+        bounds.width = Math.ceil(size.x);
+        bounds.height = Math.ceil(size.y);
+
+        var bmpData:BitmapData = new BitmapData(bounds.width,
+                                                bounds.height,
+                                                true /*transparent*/,
+                                                0);
+
+        bmpData.draw(IBitmapDrawable(target), m, propagateColorTransform ?
+            target.transform.colorTransform : null);
+
+        return bmpData;
+    }

     /**
      *  Creates a BitmapData representation of the target object.


Transferred from the Adobe Open Source Subversion Repository

Revision: 4612
Author:   jszeto@adobe.com
Date:     2009-01-22T00:58:51.173895Z

Log Message:
-----------
Flex SDK Bug Fix - Added scaleGrid support to BitmapGraphic

SDK-17289 - BitmapGraphic source embed does not respect scale9 grid when scaling

BitmapGraphic will use the scaleGrid properties defined on its embedded source. Since the Player doesn't support scaleGrid on bitmaps, we have to slice the bitmap into nine sections and then scale/translate each section. We create two arrays of points along the grid. These are used to define the topLeft and bottomRight corners of the section. Based on the internal scaleFactor and which section we are in, we draw a scaled and translated section according to the scaleGrid rules.

More details:
- Changed BitmapGraphic to no longer use the BitmapFill to draw. Instead, BitmapGraphic performs the drawing code itself.
- When the source is set, check if it has scaleGrid properties and store these in internal variable
- Cache the creation of the 16 grid points array. Flush the cache if the source or dimensions have changed
- To see this behavior in action, set width/height to different values than the source's natural dimensions and set resizeMode = "scale"

QE Notes: Add tests for BitmapGraphic with embedded assets using scaleGrid
Doc Notes: Add docs for this functionality
Bugs: SDK-17289
Reviewer: Glenn

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -13,23 +13,13 @@
 {
 import flash.display.Bitmap;
 import flash.display.BitmapData;
-import flash.display.BlendMode;
 import flash.display.DisplayObject;
 import flash.display.Graphics;
-import flash.display.Shape;
 import flash.display.Sprite;
-import flash.events.Event;
-import flash.events.EventDispatcher;
 import flash.geom.Matrix;
+import flash.geom.Point;
 import flash.geom.Rectangle;
-import flash.geom.Transform;
 import flash.utils.getDefinitionByName;
-
-import mx.core.mx_internal;
-import mx.events.PropertyChangeEvent;
-import mx.filters.BaseFilter;
-import mx.filters.IBitmapFilter;
-import mx.graphics.BitmapFill;

 import mx.graphics.graphicsClasses.GraphicElement;

@@ -55,17 +45,25 @@
     public function BitmapGraphic()
     {
         super();
-
-        _fill = new BitmapFill();
-    }
-
-    private var _fill:BitmapFill;
+    }

     //--------------------------------------------------------------------------
     //
     //  Properties
     //
     //--------------------------------------------------------------------------
+
+    private var _scaleGridBottom:Number;
+    private var _scaleGridLeft:Number;
+    private var _scaleGridRight:Number;
+    private var _scaleGridTop:Number;
+
+    private static var matrix:Matrix = new Matrix();
+    private var cachedSourceGrid:Array;
+    private var cachedDestGrid:Array;
+
+    private var previousUnscaledWidth:Number;
+    private var previousUnscaledHeight:Number;

     //----------------------------------
     //  resizeMode
@@ -196,6 +194,8 @@
     //  source
     //----------------------------------

+	private var _source:Object;
+
     [Inspectable(category="General")]

     /**
@@ -231,7 +231,7 @@
      */
     public function get source():Object
     {
-        return _fill.source;
+        return _source;
     }

     /**
@@ -239,11 +239,17 @@
      */
     public function set source(value:Object):void
     {
-        if (value != _fill.source)
+        if (value != _source)
         {
             var bitmapData:BitmapData;
             var tmpSprite:DisplayObject;

+            // Clear the previous scaleGrid properties
+            _scaleGridLeft = NaN;
+            _scaleGridRight = NaN;
+            _scaleGridTop = NaN;
+            _scaleGridBottom = NaN;
+
             // This code stolen from BitmapFill. The only change is to make the BitmapData transparent.
             if (value is Class)
             {
@@ -276,9 +282,22 @@
             {
                 bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
                 bitmapData.draw(tmpSprite, new Matrix());
+
+                if (tmpSprite.scale9Grid)
+                {
+	                _scaleGridLeft = tmpSprite.scale9Grid.left;
+	                _scaleGridRight = tmpSprite.scale9Grid.right;
+	                _scaleGridTop = tmpSprite.scale9Grid.top;
+	                _scaleGridBottom = tmpSprite.scale9Grid.bottom;
+                }
             }

-            _fill.source = bitmapData;
+            _source = bitmapData;
+
+            // Flush the cached scale grid points
+            cachedSourceGrid = null;
+            cachedDestGrid = null;
+
             invalidateSize();
             invalidateDisplayList();
         }
@@ -309,10 +328,10 @@
     /**
      *  @private
      */
-    public function get  smooth():Boolean
+    public function get smooth():Boolean
     {
         return _smooth;
-    }
+    }

     //--------------------------------------------------------------------------
     //
@@ -345,54 +364,117 @@
 		// sharing a display object.
 		if (displayObject)
 			g.clear();
-
+
         g.lineStyle();
-        _fill.x = drawX;
-        _fill.y = drawY;
-        _fill.smooth = smooth;
-        _fill.repeat = false;
-        _fill.scaleX = 1;
-        _fill.scaleY = 1;
-        var fillWidth:Number;
-        var fillHeight:Number;
+        var repeatBitmap:Boolean = false;
+        var fillScaleX:Number = 1;
+        var fillScaleY:Number = 1;

         switch(_resizeMode)
         {
-            case _NORMAL_UINT:
-                fillWidth = Math.min(unscaledWidth, source.width);
-                fillHeight = Math.min(unscaledHeight, source.height);
-            break;
-
             case _REPEAT_UINT:
                 if (source)
                 {
-                    _fill.repeat = true;
-                    fillWidth = unscaledWidth;
-                    fillHeight = unscaledHeight;
+                    repeatBitmap = true;
                 }
             break;

             case _SCALE_UINT:
                 if (source)
                 {
-                    _fill.scaleX = unscaledWidth / source.width;
-                    _fill.scaleY = unscaledHeight / source.height;
-                    fillWidth = source.width;
-                    fillHeight = source.height;
+                    fillScaleX = unscaledWidth / source.width;
+                    fillScaleY = unscaledHeight / source.height;
                 }
             break;
         }

-        _fill.begin(g, new Rectangle(0, 0, fillWidth, fillHeight));
-        g.drawRect(drawX, drawY, unscaledWidth, unscaledHeight);
-        _fill.end(g);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  IAssignableDisplayObject Implementation
-    //
-    //--------------------------------------------------------------------------
+		// If no scaleGrid is defined or if resizeMode != SCALE, just draw the entire rect
+		if (_resizeMode != _SCALE_UINT ||
+			isNaN(_scaleGridTop) ||
+			isNaN(_scaleGridBottom) ||
+			isNaN(_scaleGridLeft) ||
+			isNaN(_scaleGridRight))
+		{
+			matrix.identity();
+			matrix.scale(fillScaleX, fillScaleY);
+			matrix.translate(drawX, drawY);
+	        g.beginBitmapFill(_source as BitmapData, matrix, repeatBitmap, smooth);
+	        g.drawRect(drawX, drawY, unscaledWidth, unscaledHeight);
+	        g.endFill();
+		}
+		else
+		{
+
+			// If we have scaleGrid, we draw 9 sections, each with a different scale factor based
+			// on the grid region.
+
+			if (cachedSourceGrid == null)
+			{
+				// Generate the 16 points of the source (unscaled) grid
+				cachedSourceGrid = [];
+				cachedSourceGrid.push([new Point(0, 0), new Point(_scaleGridLeft, 0),
+							    new Point(_scaleGridRight, 0), new Point(_source.width, 0)]);
+				cachedSourceGrid.push([new Point(0, _scaleGridTop), new Point(_scaleGridLeft, _scaleGridTop),
+							    new Point(_scaleGridRight, _scaleGridTop), new Point(_source.width, _scaleGridTop)]);
+				cachedSourceGrid.push([new Point(0, _scaleGridBottom), new Point(_scaleGridLeft, _scaleGridBottom),
+							    new Point(_scaleGridRight, _scaleGridBottom), new Point(_source.width, _scaleGridBottom)]);
+				cachedSourceGrid.push([new Point(0, _source.height), new Point(_scaleGridLeft, _source.height),
+								new Point(_scaleGridRight, _source.height), new Point(_source.width, _source.height)]);
+			}
+
+			if (cachedDestGrid == null ||
+				previousUnscaledWidth != unscaledWidth ||
+				previousUnscaledHeight != unscaledHeight)
+			{
+				// Generate teh 16 points of the destination (scaled) grid
+				var destScaleGridBottom:Number = unscaledHeight - (_source.height - _scaleGridBottom);
+				var destScaleGridRight:Number = unscaledWidth - (_source.width - _scaleGridRight);
+				cachedDestGrid = [];
+				cachedDestGrid.push([new Point(0, 0), new Point(_scaleGridLeft, 0),
+							    new Point(destScaleGridRight, 0), new Point(unscaledWidth, 0)]);
+				cachedDestGrid.push([new Point(0, _scaleGridTop), new Point(_scaleGridLeft, _scaleGridTop),
+							    new Point(destScaleGridRight, _scaleGridTop), new Point(unscaledWidth, _scaleGridTop)]);
+				cachedDestGrid.push([new Point(0, destScaleGridBottom), new Point(_scaleGridLeft, destScaleGridBottom),
+							    new Point(destScaleGridRight, destScaleGridBottom), new Point(unscaledWidth, destScaleGridBottom)]);
+				cachedDestGrid.push([new Point(0, unscaledHeight), new Point(_scaleGridLeft, unscaledHeight),
+							   new Point(destScaleGridRight, unscaledHeight), new Point(unscaledWidth, unscaledHeight)]);
+			}
+
+	        var sourceSection:Rectangle = new Rectangle();
+	        var destSection:Rectangle = new Rectangle();
+
+	        // Iterate over the columns and rows. We draw each of the nine sections at a calculated
+	        // scale and translation.
+        	for (var rowIndex:int=0; rowIndex < 3; rowIndex++)
+        	{
+	        	for (var colIndex:int = 0; colIndex < 3; colIndex++)
+	        	{
+	                // Create the source and destination rectangles for the current section
+	                sourceSection.topLeft = cachedSourceGrid[rowIndex][colIndex];
+	                sourceSection.bottomRight = cachedSourceGrid[rowIndex+1][colIndex+1];
+
+	                destSection.topLeft = cachedDestGrid[rowIndex][colIndex];
+	                destSection.bottomRight = cachedDestGrid[rowIndex+1][colIndex+1];
+
+	                matrix.identity();
+	                // Scale the bitmap by the ratio between the source and destination dimensions
+	                matrix.scale(destSection.width / sourceSection.width, destSection.height / sourceSection.height);
+	                // Translate based on the difference between the source and destination coordinates,
+	                // making sure to account for the new scale.
+	                matrix.translate(destSection.x - sourceSection.x * matrix.a, destSection.y - sourceSection.y * matrix.d);
+	                matrix.translate(drawX, drawY);
+
+	                // Draw the bitmap for the current section
+	                g.beginBitmapFill(_source as BitmapData, matrix);
+	                g.drawRect(destSection.x + drawX, destSection.y + drawY, destSection.width, destSection.height);
+	                g.endFill();
+	             }
+	        }
+  		}
+
+  		previousUnscaledWidth = unscaledWidth;
+  		previousUnscaledHeight = unscaledHeight;
+    }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5188
Author:   clucier@adobe.com
Date:     2009-03-06T14:42:01.490156Z

Log Message:
-----------
Optimization to BitmapGraphic to avoid unnecessary draw operations when source is an embed.  Performance related merge from Calista/Catalyst explorations.
QE Notes: No bug, found during profiling.
Doc Notes: None.
Reviewer: Alex, Ely
Tests: BitmapGraphic related mustella tests.

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -300,13 +300,18 @@
             _scaleGridTop = NaN;
             _scaleGridBottom = NaN;

-            // This code stolen from BitmapFill. The only change is to make the BitmapData transparent.
             if (value is Class)
             {
                 var cls:Class = Class(value);
-                tmpSprite = new cls();
+                value = new cls();
             }
-            else if (value is BitmapData)
+            else if (value is String)
+            {
+                var tmpClass:Class = Class(getDefinitionByName(String(value)));
+                value = new tmpClass();
+            }
+
+            if (value is BitmapData)
             {
                 bitmapData = value as BitmapData;
             }
@@ -317,11 +322,6 @@
             else if (value is DisplayObject)
             {
                 tmpSprite = value as DisplayObject;
-            }
-            else if (value is String)
-            {
-                var tmpClass:Class = Class(getDefinitionByName(String(value)));
-                tmpSprite = new tmpClass();
             }
             else
             {


use a local variable for Serializer to avoid useless memory consumption

--- src/aerys/minko/type/binding/ShaderDataBindingsProxy.as
+++ src/aerys/minko/type/binding/ShaderDataBindingsProxy.as
@@ -16,15 +16,11 @@
 	 */
 	public final class ShaderDataBindingsProxy extends DataBindingsProxy
 	{
-		private var _serializer		: Serializer;
-
 		public function ShaderDataBindingsProxy(bindings		: DataBindings,
 												signature		: Signature,
 												signatureFlags	: uint)
 		{
 			super(bindings, signature, signatureFlags);
-
-			_serializer = new Serializer();
 		}

 		public function getParameter(name			: String,
@@ -33,9 +29,10 @@
 		{
 			if (defaultValue != null && !propertyExists(name))
 			{
-				var constantValue : Vector.<Number> = new Vector.<Number>();
+				var constantValue 	: Vector.<Number> 	= new Vector.<Number>();
+				var serializer 		: Serializer		= new Serializer();

-				_serializer.serializeKnownLength(defaultValue, constantValue, 0, size);
+				serializer.serializeKnownLength(defaultValue, constantValue, 0, size);

 				return new SFloat(new Constant(constantValue));
 			}


Extend from Canvas so that the chat overlay scrollbar works.

git-svn-id: a3e1eb16dde062992de22c830ed8045c8013209a@160 c613c5cb-e716-0410-b11b-feb51c14d237

--- src/as/com/threerings/ezgame/client/EZGamePanel.as
+++ src/as/com/threerings/ezgame/client/EZGamePanel.as
@@ -9,7 +9,6 @@
 import flash.utils.Dictionary;

 import mx.containers.Canvas;
-import mx.containers.VBox;

 import mx.core.Container;
 import mx.core.IChildList;
@@ -25,7 +24,7 @@
 import com.threerings.ezgame.data.EZGameConfig;
 import com.threerings.ezgame.data.EZGameObject;

-public class EZGamePanel extends VBox
+public class EZGamePanel extends Canvas
     implements PlaceView
 {
     /** The game object backend. */
@@ -46,6 +45,8 @@
         backend = createBackend();

         _gameView = new GameContainer(cfg.configData); // TODO?
+        _gameView.percentWidth = 100;
+        _gameView.percentHeight = 100;
         backend.setSharedEvents(
             Loader(_gameView.getMediaContainer().getMedia()).
             contentLoaderInfo.sharedEvents);


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


152 Cleaned up some DebugUtil code - made naming uniform between displayTree (now dumpDisplayTree) and dumpObject. Both now push text lines to arrays instead of string concat

--- raw/src/org/yellcorp/debug/DebugUtil.as
+++ raw/src/org/yellcorp/debug/DebugUtil.as
@@ -1,5 +1,6 @@
 package org.yellcorp.debug
 {
+import org.yellcorp.format.Template;
 import org.yellcorp.string.StringUtil;

 import flash.display.DisplayObject;
@@ -45,43 +46,63 @@
         return calls;
     }

-    public static function displayTree(container:DisplayObjectContainer, maxLevels:int):String
+    public static function dumpDisplayTree(container:DisplayObjectContainer, maxDepth:int = 0):String
     {
-        return _displayTree(container, container, maxLevels, 0);
+        var lineBuffer:Array = [ ];
+        _dumpDisplayTree(container, container, maxDepth, 0, lineBuffer);
+        return lineBuffer.join("\n");
     }

-    private static function _displayTree(
+    private static function _dumpDisplayTree(
         container:DisplayObjectContainer,
         reference:DisplayObjectContainer,
-        maxLevels:int,
-        thislevel:int):String
+        maxDepth:int,
+        currentDepth:int,
+        outLineBuffer:Array):void
     {
         var i:int = 0;
         var len:int = container.numChildren;
         var current:DisplayObject;
         var numPad:int = len.toString().length;
-        var str:String = "";

-        for (i = 0;i < len; i++)
+        var formatValues:Object = { };
+
+        formatValues.indent = StringUtil.repeat(" ", currentDepth);
+
+        if (maxDepth > 0 && currentDepth > maxDepth)
         {
-            current = container.getChildAt(i);
+            outLineBuffer.push(formatValues.indent + "[[Reached maximum depth of " + maxDepth + "]]");
+            return;
+        }
+        else
+        {
+            for (i = 0;i < len; i++)
+            {
+                current = container.getChildAt(i);

-            str += StringUtil.repeat(" ", thislevel) /* Child index */
-                 + StringUtil.padRight(i.toString(), numPad) + " " /* Name */
-                 + current.name + " " /* Class */
-                 + describeType(current).@name.toString() + " " /* First native ancestor */
-                 + "(" + searchTypeChain(current, "flash.") + ") " /* Registration point */
-                 + "{" + [current.x, current.y].join(", ") + "} " /* Scale */
-                 + "{" + [current.scaleX, current.scaleY].join(", ") + "} " /* Bounding rectangle */
-                 + current.getRect(container).toString() + " " + "\n";
+                formatValues.index = StringUtil.padRight(i.toString(), numPad);
+                formatValues.name = current.name;

-            if (current is DisplayObjectContainer)
-            {
-                str += _displayTree(current as DisplayObjectContainer, reference, maxLevels, thislevel + 1);
+                formatValues['class'] = getQualifiedClassName(current);
+                formatValues.nativeClass = searchTypeChain(current, "flash.");
+
+                formatValues.x = current.x;
+                formatValues.y = current.y;
+
+                formatValues.scaleX = current.scaleX;
+                formatValues.scaleY = current.scaleY;
+
+                formatValues.rect = current.getRect(container);
+
+                outLineBuffer.push(Template.format("{indent}{index} name:\"{name}\" class:{class}({nativeClass}) pos:({x}, {y}) scale:({scaleX}, {scaleY}) rect:{rect}",
+                        formatValues));
+
+                if (current is DisplayObjectContainer)
+                {
+                    _dumpDisplayTree(current as DisplayObjectContainer, reference, maxDepth, currentDepth + 1, outLineBuffer);
+                }
             }
         }
-
-        return str;
     }

     private static function searchTypeChain(query:Object, prefix:String):String
@@ -100,10 +121,12 @@

     public static function dumpObject(root:*, maxDepth:int = 3):String
     {
-        return _dumpObject(root, maxDepth, 0);
+        var lineBuffer:Array = [ ];
+        _dumpObject(root, maxDepth, 0, lineBuffer);
+        return lineBuffer.join("\n");
     }

-    private static function _dumpObject(obj:*, maxDepth:int, currentDepth:int):String
+    private static function _dumpObject(obj:*, maxDepth:int, currentDepth:int, outLineBuffer:Array):void
     {
         var desc:XML;
         var node:XML;
@@ -113,11 +136,9 @@
         var propName:String;
         var indent:String;
         var className:String;
-        var output:String;

         indent = StringUtil.repeat(" ", currentDepth);

-        output = "";
         desc = describeType(obj);
         className = desc.@name;

@@ -131,10 +152,13 @@
         }

         if (currentDepth >= maxDepth)
+        {
             if (evalList.children().length() > 0)
-                return indent + "[[Reached maximum depth of " + maxDepth + "]]\n";
-            else
-                return "";
+            {
+                outLineBuffer.push(indent + "[[Reached maximum depth of " + maxDepth + "]]");
+            }
+            return;
+        }

         // no good: if late property evaluation, i.e. name[prop] invokes a getter that
         // throws an exception, try/catch won't actually catch it.  this is likely the
@@ -150,14 +174,11 @@
         for each (node in evalList.*)
         {
             propName = node.@name;
-            output += indent + propName + ":" + node.@type + "=";
-            output += obj[propName];
+            outLineBuffer.push(
+                    indent + propName + ":" + node.@type + "=" + obj[propName]);

-            output += "\n";
-            output += _dumpObject(obj[propName], maxDepth, currentDepth+1);
+            _dumpObject(obj[propName], maxDepth, currentDepth + 1, outLineBuffer);
         }
-
-        return output;
     }
 }
 }


added highlightcolor property

added highlightcolor property

--- src/eu/stefaner/elasticlists/ui/DefaultGraphicsFactory.as
+++ src/eu/stefaner/elasticlists/ui/DefaultGraphicsFactory.as
@@ -29,8 +29,9 @@

 	public class DefaultGraphicsFactory {

+		public static var highlightColor : uint = 0xEEEE11;
+
 		[Embed(source="/assets/PTS55F.ttf", fontName="regularFont", advancedAntiAliasing="true", mimeType="application/x-font-truetype")]
-
 		private var regularFont : Class;

 		[Embed(source="/assets/Aller_Bd.ttf", fontName="boldFont",  fontWeight='bold',  advancedAntiAliasing="true", mimeType="application/x-font-truetype")]
@@ -38,6 +39,7 @@

 		public static var regularFontName : String = "regularFont";
 		public static var boldFontName : String = "boldFont";
+

 		public static function getTextField() : TextField {
 			var t : TextField = new TextField();
@@ -75,7 +77,7 @@

 		public static function getSelectionMarker() : Sprite {
 			var s : Sprite = new Sprite();
-			s.graphics.beginFill(0xEEEE11);
+			s.graphics.beginFill(highlightColor);
 			s.graphics.drawRect(0, 0, 100, 100);
 			return s;
 		}
@@ -129,7 +131,7 @@

 		public static function getMapMarkerSelectionMarker() : Sprite {
 			var s : Sprite = new Sprite();
-			s.graphics.beginFill(0xDDFF99);
+			s.graphics.beginFill(highlightColor);
 			//s.graphics.lineStyle(0, 0xCCCCCC, 1);
 			s.graphics.drawCircle(0, 0, 1);
 			return s;


Fixed FP.choose() so it actually works when using Vectors. Hurrr

--- net/flashpunk/FP.as
+++ net/flashpunk/FP.as
@@ -122,8 +122,8 @@
 		 */
 		public static function choose(...objs):*
 		{
-			if (objs.length == 1 && (objs[0] is Array || objs[0] is Vector.<*>)) objs = objs[0];
-			return objs[rand(objs.length)];
+			var c:* = (objs.length == 1 && (objs[0] is Array || objs[0] is Vector.<*>)) ? objs[0] : objs;
+			return c[rand(c.length)];
 		}

 		/**


Updated Version constant.

Updated Version constant.

--- net/flashpunk/FP.as
+++ net/flashpunk/FP.as
@@ -17,9 +17,9 @@
 	public class FP
 	{
 		/**
-		 * The FlashPunk version.
-		 */
-		public static const VERSION:String = "1.00";
+		 * The FlashPunk major version.
+		 */
+		public static const VERSION:String = "1.0";

 		/**
 		 * Width of the game.


Transferred from the Adobe Open Source Subversion Repository

Revision: 16822
Author:   deeptika@adobe.com
Date:     2010-07-07T06:16:32.586582Z

Log Message:
-----------
Removing deprecated API and their usage.

QE notes:
Doc notes:
Bugs: FLEXDMV-2463 (LineaSeries legendData marker are not working if the series has lineStroke to a SolidColorStroke)
FLEXDMV-2470 (Remove deprecation or Remove deprecated properties in charting)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/BarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_dmv/src/mx/automation/delegates/charts/CartesianChartAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/renderers/AreaRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/AreaChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/HLOCSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/LineSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/PlotChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/BubbleSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation/src/mx/automation/tabularData/CartesianChartTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/CandlestickChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/HLOCChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/StackedSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/BarSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/LineChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/HLOCSeriesBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/CartesianChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/ChartBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/BubbleChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/AreaSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/chartClasses/PolarChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/ColumnChart.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/PlotSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/renderers/HLOCItemRenderer.as</path>

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

--- frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
+++ frameworks/projects/charts/src/mx/charts/series/HLOCSeries.as
@@ -18,12 +18,13 @@
 import mx.charts.series.items.HLOCSeriesItem;
 import mx.charts.styles.HaloDefaults;
 import mx.core.ClassFactory;
+import mx.core.IFlexModuleFactory;
 import mx.core.mx_internal;
 import mx.graphics.IStroke;
 import mx.graphics.LinearGradientStroke;
+import mx.graphics.SolidColorStroke;
 import mx.graphics.Stroke;
 import mx.styles.CSSStyleDeclaration;
-import mx.core.IFlexModuleFactory;

 use namespace mx_internal;

@@ -279,9 +280,9 @@
 				var gb:LinearGradientStroke;

 				istroke= getStyle("stroke");
-				if (istroke is Stroke)
+				if (istroke is SolidColorStroke)
 				{
-					hd.contextColor = Stroke(istroke).color;
+					hd.contextColor = SolidColorStroke(istroke).color;
 				}
 				else if (istroke is LinearGradientStroke)
 				{
@@ -368,9 +369,9 @@
 			var gb:LinearGradientStroke;

 			istroke= getStyle("stroke");
-			if (istroke is Stroke)
-			{
-				hd.contextColor = Stroke(istroke).color;
+			if (istroke is SolidColorStroke)
+			{
+				hd.contextColor = SolidColorStroke(istroke).color;
 			}
 			else if (istroke is LinearGradientStroke)
 			{
@@ -382,9 +383,9 @@
 			hd.dataTipFunction = formatDataTip;

 			istroke = getStyle("stroke");
-			if (istroke is Stroke)
-			{
-				hd.contextColor = Stroke(istroke).color;
+			if (istroke is SolidColorStroke)
+			{
+				hd.contextColor = SolidColorStroke(istroke).color;
 			}
 			else if (istroke is LinearGradientStroke)
 			{


Transferred from the Adobe Open Source Subversion Repository

Revision: 9655
Author:   clucier@adobe.com
Date:     2009-08-26T19:38:27.057804Z

Log Message:
-----------
When setting percentWidth and/or percentHeight on the root Application is would never take effect until/unless the stage resized at a later point.  FocusManager now considers layer visiblity.

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

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

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -202,6 +202,11 @@
      *  @private
      */
     private var resizeHandlerAdded:Boolean = false;
+
+    /**
+     *  @private
+     */
+    private var percentBoundsChanged:Boolean;

     /**
      *  @private
@@ -623,9 +628,12 @@
      */
     override public function set percentHeight(value:Number):void
     {
-        super.percentHeight = value;
-
-        invalidateDisplayList();
+        if (value != super.percentHeight)
+        {
+            super.percentHeight = value;
+            percentBoundsChanged = true;
+            invalidateProperties();
+        }
     }

     //----------------------------------
@@ -637,9 +645,12 @@
      */
     override public function set percentWidth(value:Number):void
     {
-        super.percentWidth = value;
-
-        invalidateDisplayList();
+        if (value != super.percentWidth)
+        {
+            super.percentWidth = value;
+            percentBoundsChanged = true;
+            invalidateProperties();
+        }
     }

     //----------------------------------
@@ -836,6 +847,12 @@
                 resizeHandlerAdded = false;
             }
         }
+
+        if (percentBoundsChanged)
+        {
+            updateBounds();
+            percentBoundsChanged = false;
+        }
     }

     /**
@@ -1055,6 +1072,29 @@
      */
     private function resizeHandler(event:Event):void
     {
+        // If we're already due to update our bounds on the next
+        // commitProperties pass, avoid the redundancy.
+        if (!percentBoundsChanged)
+            updateBounds();
+    }
+
+    /**
+     *  @private
+     *  Called when the "View Source" item in the application's context menu is
+     *  selected.
+     */
+    protected function menuItemSelectHandler(event:Event):void
+    {
+        navigateToURL(new URLRequest(_viewSourceURL), "_blank");
+    }
+
+    /**
+     *  @private
+     *  Sets the new width and height after the Stage has resized
+     *  or when percentHeight or percentWidth has changed.
+     */
+    private function updateBounds():void
+    {
         // When user has not specified any width/height,
         // application assumes the size of the stage.
         // If developer has specified width/height,
@@ -1064,7 +1104,7 @@
         // based on the current SystemManager's width/height.
         // If developer has specified min/max values,
         // then application will not resize beyond those values.
-
+
         var w:Number;
         var h:Number

@@ -1080,10 +1120,10 @@
                 super.percentWidth = Math.min(percentWidth, 100);
                 w = percentWidth*DisplayObject(systemManager).width/100;
             }
-
+
             if (!isNaN(explicitMaxWidth))
                 w = Math.min(w, explicitMaxWidth);
-
+
             if (!isNaN(explicitMinWidth))
                 w = Math.max(w, explicitMinWidth);
         }
@@ -1107,7 +1147,7 @@

             if (!isNaN(explicitMaxHeight))
                 h = Math.min(h, explicitMaxHeight);
-
+
             if (!isNaN(explicitMinHeight))
                 h = Math.max(h, explicitMinHeight);
         }
@@ -1121,20 +1161,10 @@
             invalidateProperties();
             invalidateSize();
         }
-
+
         setActualSize(w, h);
-
-        invalidateDisplayList();
-    }
-
-    /**
-     *  @private
-     *  Called when the "View Source" item in the application's context menu is
-     *  selected.
-     */
-    protected function menuItemSelectHandler(event:Event):void
-    {
-        navigateToURL(new URLRequest(_viewSourceURL), "_blank");
+
+        invalidateDisplayList();
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20157
Author:   jszeto@adobe.com
Date:     2011-02-05T00:00:00.317113Z

Log Message:
-----------
ViewMenu and SoftKeyboard interaction bug fixes

http://bugs.adobe.com/jira/browse/SDK-29144 - Incorrect ViewMenu and Softkeyboard interraction

FocusManager listens for the VIEW_HIDE event and will clear focus if the lastFocus is contained in the View about to be hidden.

Small updates to Application to make sure the isSoftKeyboardActive flag is set in all use cases.

http://bugs.adobe.com/jira/browse/SDK-29384 - SoftKeybord does not appear onTextArea tap in some test cases

In mouseDown handler, if we are already in focus, then make sure the soft keyboard appears on mouseUp

QE notes: none
Doc notes: none
Bugs: SDK-29144
Reviewer: Alex
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/components/Application.as
+++ frameworks/projects/spark/src/spark/components/Application.as
@@ -312,11 +312,6 @@
      *  height of the Application should be modified.
      */
     private var resizeHeight:Boolean = true;
-
-    /**
-     *  @private
-     */
-    private var softKeyboardHandlersAdded:Boolean = false;

     /**
      *  @private
@@ -1107,7 +1102,6 @@
     //  resizeForSoftKeyboard
     //----------------------------------
     private var _resizeForSoftKeyboard:Boolean = true;
-    private var resizeForSoftKeyboardChanged:Boolean = true;

     /**
      *  Some devices do not support a hardware keyboard.
@@ -1139,8 +1133,6 @@
         if (_resizeForSoftKeyboard != value)
         {
             _resizeForSoftKeyboard = value;
-            resizeForSoftKeyboardChanged = true;
-            invalidateProperties();
         }
     }

@@ -1268,6 +1260,26 @@
         if (sm.isTopLevel() && Capabilities.isDebugger == true)
             setInterval(debugTickler, 1500);
     }
+
+    /**
+     *  @private
+     */
+    override protected function createChildren():void
+    {
+        super.createChildren();
+
+        // Only listen for softKeyboard events
+        // if the runtime supports a soft keyboard
+        if (softKeyboardBehavior != "")
+        {
+            addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,
+                softKeyboardActivateHandler, true,
+                EventPriority.DEFAULT, true);
+            addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,
+                softKeyboardDeactivateHandler, true,
+                EventPriority.DEFAULT, true);
+        }
+    }

     /**
      *  @private
@@ -1297,33 +1309,6 @@
                 systemManager.removeEventListener(Event.RESIZE, resizeHandler);
                 resizeHandlerAdded = false;
             }
-        }
-
-        if (resizeForSoftKeyboardChanged)
-        {
-            // Check for softKeyboardBehavior == none
-            if (softKeyboardBehavior == "none")
-            {
-                if (resizeForSoftKeyboard && !softKeyboardHandlersAdded)
-                {
-                    // Use a high priority so that the application resize will occur first
-                    addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE,
-                                                         softKeyboardActivateHandler, true,
-                                                         EventPriority.DEFAULT, true);
-                    addEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE,
-                                                         softKeyboardDeactivateHandler, true,
-                                                         EventPriority.DEFAULT, true);
-                    softKeyboardHandlersAdded = true;
-                }
-                else if (!resizeForSoftKeyboard && softKeyboardHandlersAdded)
-                {
-                    removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_ACTIVATE, softKeyboardActivateHandler, true);
-                    removeEventListener(SoftKeyboardEvent.SOFT_KEYBOARD_DEACTIVATE, softKeyboardDeactivateHandler, true);
-                    softKeyboardHandlersAdded = false;
-                }
-            }
-
-            resizeForSoftKeyboardChanged = false;
         }

         if (percentBoundsChanged)
@@ -1597,19 +1582,22 @@
             if (keyboardRect.height > 0)
                 isSoftKeyboardActive = true;

-            var sm:SystemManager = systemManager as SystemManager;
-            var scaleFactor:Number = 1;
-
-            // Account for any density scaling
-            if (sm)
-                scaleFactor = sm.densityScale;
-
-            var appHeight:Number = (stage.stageHeight - keyboardRect.height) / scaleFactor;
-
-            if (appHeight != height)
+            if (softKeyboardBehavior == "none" && resizeForSoftKeyboard)
             {
-                setActualSize(width, appHeight);
-                validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
+                var sm:SystemManager = systemManager as SystemManager;
+                var scaleFactor:Number = 1;
+
+                // Account for any density scaling
+                if (sm)
+                    scaleFactor = sm.densityScale;
+
+                var appHeight:Number = (stage.stageHeight - keyboardRect.height) / scaleFactor;
+
+                if (appHeight != height)
+                {
+                    setActualSize(width, appHeight);
+                    validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
+                }
             }
         }
     }
@@ -1624,17 +1612,21 @@
         if (this === FlexGlobals.topLevelApplication)
         {
             isSoftKeyboardActive = false;
-            var sm:SystemManager = systemManager as SystemManager;
-            var scaleFactor:Number = 1;

-            // Account for any density scaling
-            if (sm)
-                scaleFactor = sm.densityScale;
-
-            // Restore the original values
-            setActualSize(stage.stageWidth / scaleFactor, stage.stageHeight / scaleFactor);
-
-            validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
+            if (softKeyboardBehavior == "none" && resizeForSoftKeyboard)
+            {
+                var sm:SystemManager = systemManager as SystemManager;
+                var scaleFactor:Number = 1;
+
+                // Account for any density scaling
+                if (sm)
+                    scaleFactor = sm.densityScale;
+
+                // Restore the original values
+                setActualSize(stage.stageWidth / scaleFactor, stage.stageHeight / scaleFactor);
+
+                validateNow(); // Validate so that other listeners like Scroller get the updated dimensions
+            }
         }
     }


The 'constructor' property is not to be trusted.

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

--- src/as/com/threerings/util/ClassUtil.as
+++ src/as/com/threerings/util/ClassUtil.as
@@ -68,12 +68,12 @@

     public static function isSameClass (obj1 :Object, obj2 :Object) :Boolean
     {
-        return (obj1.constructor == obj2.constructor);
+        return (getClass(obj1) == getClass(obj2));
     }

     public static function getClass (obj :Object) :Class
     {
-        return Class(obj.constructor);
+        return getClassByName(getQualifiedClassName(obj));
     }

     public static function getClassByName (cname :String) :Class


Fixed shortClassName() to not display a leading '.'.

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

--- src/as/com/threerings/util/ClassUtil.as
+++ src/as/com/threerings/util/ClassUtil.as
@@ -15,9 +15,7 @@
     {
         var s :String = getQualifiedClassName(obj);
         var dex :int = s.lastIndexOf(".");
-        if (dex != -1) {
-            s = s.substring(dex);
-        }
+        s = s.substring(dex + 1); // works even if dex is -1
         return s.replace("::", ".");
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20329
Author:   klin@adobe.com
Date:     2011-02-15T22:29:36.562117Z

Log Message:
-----------
Fix double click event dispatching in Grid. Similar to fixing the click event, FP's double click doesn't account for the case where we might have display objects changing beneath so Grid should not listen for the FP's double click. Instead, we just check if the second click is within a certain time span.

Also, fix typo in SandboxMouseEvent and remove outdated TODO from FormLayout.

QE notes: No
Doc notes: No
Bugs: SDK-29471
Reviewer: Hans, Carol
Tests run: cyclone server, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/FormLayout.as</path>

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

--- frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as
+++ frameworks/projects/framework/src/mx/events/SandboxMouseEvent.as
@@ -54,7 +54,7 @@
 	 *  @playerversion AIR 1.1
 	 *  @productversion Flex 3
 	 */
-    public static const DOUBLE_CLICK_SOMEWHERE:String = "coubleClickSomewhere";
+    public static const DOUBLE_CLICK_SOMEWHERE:String = "doubleClickSomewhere";

 	/**
 	 *  Mouse button was pressed down somewhere outside your sandbox.


Transferred from the Adobe Open Source Subversion Repository

Revision: 8679
Author:   jimurphy@adobe.com
Date:     2009-07-20T13:23:31.007823Z

Log Message:
-----------
These are Asdoc edit from 3.x rev 8623.  I somehow missed committing these when they were supposed to be committed during my previous merge.

bug: no
qa: no
doc: no
checkintests: pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/AMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/PollingChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingConnectionHandler.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/CallResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/HTTPRequestMessage.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MultiTopicConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/MessageResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ConfigMap.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/Responder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/XMLLoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/IResponder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Producer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/SecureStreamingHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/events/WSDLLoadEvent.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as
+++ frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as
@@ -98,7 +98,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Creates an new HTTPChannel instance.
+     *  Constructor.
      *
      *  @param id The id of this Channel.
      *  @param uri The uri for this Channel.


Dragging the knob to seek.
Works not-so-well with youtube. I'll revisit later...

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@686 ed5b42cb-e716-0410-a449-f6a68f950b19

--- src/as/com/threerings/flash/video/SimpleVideoDisplay.as
+++ src/as/com/threerings/flash/video/SimpleVideoDisplay.as
@@ -8,9 +8,11 @@
 import flash.display.Shape;
 import flash.display.Sprite;

+import flash.events.Event;
 import flash.events.MouseEvent;

 import flash.geom.Point;
+import flash.geom.Rectangle;

 import com.threerings.util.Log;
 import com.threerings.util.ValueEvent;
@@ -76,10 +78,10 @@
         _track.y = NATIVE_HEIGHT - PAD - TRACK_HEIGHT - _hud.y;
         g = _track.graphics;
         g.beginFill(0x000000, .7);
-        g.lineStyle(1, 0xFFFFFF);
         g.drawRect(0, 0, TRACK_WIDTH, TRACK_HEIGHT);
         g.endFill();
-        //g.drawRect(0, 0, TRACK_WIDTH - 2, TRACK_HEIGHT - 2);
+        g.lineStyle(2, 0xFFFFFF);
+        g.drawRect(0, 0, TRACK_WIDTH, TRACK_HEIGHT);
         // _track is not added to _hud until we know the duration

         const trackMask :Shape = new Shape();
@@ -99,7 +101,6 @@

         _track.addEventListener(MouseEvent.CLICK, handleTrackClick);
         _knob.addEventListener(MouseEvent.MOUSE_DOWN, handleKnobDown);
-        _knob.addEventListener(MouseEvent.MOUSE_UP, handleKnobUp);
     }

     /**
@@ -145,30 +146,33 @@
     {
         event.stopImmediatePropagation();

-        // see if we can seek to a position
-        const dur :Number = _player.getDuration();
-        if (isNaN(dur)) {
-            log.debug("Duration is NaN, track click dropped.");
-            return;
-        }
-
-        var perc :Number = event.localX / TRACK_WIDTH;
-        perc = Math.max(0, Math.min(1, perc));
-        log.debug("Seek", "x", event.localX, "perc", perc, "pos", (perc * dur));
-
-        _player.seek(perc * dur);
+        adjustSeek(event.localX);
     }

     protected function handleKnobDown (event :MouseEvent) :void
     {
         event.stopImmediatePropagation();
-        // TODO
+
+        _dragging = true;
+        _knob.startDrag(false, new Rectangle(0, TRACK_HEIGHT/2, TRACK_WIDTH, 0));
+        addEventListener(Event.ENTER_FRAME, handleKnobSeekCheck);
+        addEventListener(MouseEvent.MOUSE_UP, handleKnobUp);
     }

     protected function handleKnobUp (event :MouseEvent) :void
     {
         event.stopImmediatePropagation();
-        // TODO
+
+        _dragging = false;
+        _knob.stopDrag();
+        removeEventListener(Event.ENTER_FRAME, handleKnobSeekCheck);
+        removeEventListener(MouseEvent.MOUSE_UP, handleKnobUp);
+        handleKnobSeekCheck(null);
+    }
+
+    protected function handleKnobSeekCheck (event :Event) :void
+    {
+        adjustSeek(_knob.x);
     }

     protected function handlePlayerState (event :ValueEvent) :void
@@ -198,6 +202,10 @@

     protected function handlePlayerPosition (event :ValueEvent) :void
     {
+        if (_dragging) {
+            return;
+        }
+        _lastKnobX = int.MIN_VALUE;
         const pos :Number = Number(event.value);
         _knob.x = (pos / _player.getDuration()) * TRACK_WIDTH;
         if (_knob.parent == null) {
@@ -209,6 +217,24 @@
     {
         // TODO.. maybe just redispatch
         log.warning("player error: " + event.value);
+    }
+
+    protected function adjustSeek (trackX :Number) :void
+    {
+        // see if we can seek to a position
+        const dur :Number = _player.getDuration();
+        if (isNaN(dur)) {
+            log.debug("Duration is NaN, not seeking.");
+            return;
+        }
+        if (trackX == _lastKnobX) {
+            return;
+        }
+        _lastKnobX = trackX;
+        var perc :Number = trackX / TRACK_WIDTH;
+        perc = Math.max(0, Math.min(1, perc));
+        log.debug("Seek", "x", trackX, "perc", perc, "pos", (perc * dur));
+        _player.seek(perc * dur);
     }

     protected function showHUD (show :Boolean) :void
@@ -278,6 +304,10 @@

     /** The seek selector knob, positioned on the hud. */
     protected var _knob :Sprite;
+
+    protected var _lastKnobX :int = int.MIN_VALUE;
+
+    protected var _dragging :Boolean;

     /** Our mask, also defines our boundaries for clicking. */
     protected var _mask :Shape;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 7743
Author:   clucier@adobe.com
Date:     2009-06-11T13:53:10.203664Z

Log Message:
-----------
Moving away from using namespace qualifiers in most cases in the SDK.  We've run into a few cases now where the use of qualifiers in code that is called excessively can slow things down.
Bugs: SDK-21337
Reviewer: Ryan, Paul
QE Notes: None
Tests: Ran several random Mustella test groups, checkintests.

Modified Paths:
--------------
106 paths were modified

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

--- frameworks/projects/framework/src/mx/effects/MaskEffect.as
+++ frameworks/projects/framework/src/mx/effects/MaskEffect.as
@@ -13,9 +13,11 @@
 {

 import flash.events.EventDispatcher;
+import mx.core.mx_internal;
 import mx.effects.effectClasses.MaskEffectInstance;
 import mx.events.TweenEvent;

+use namespace mx_internal;

 /**
  *  Dispatched when the effect starts, which corresponds to the
@@ -571,7 +573,7 @@
         maskEffectInstance.moveEasingFunction = moveEasingFunction;
         maskEffectInstance.scaleEasingFunction = scaleEasingFunction;
         maskEffectInstance.createMaskFunction = createMaskFunction;
-        maskEffectInstance.mx_internal::persistAfterEnd = mx_internal::persistAfterEnd;
+        maskEffectInstance.persistAfterEnd = persistAfterEnd;

         EventDispatcher(maskEffectInstance).addEventListener(TweenEvent.TWEEN_START, tweenEventHandler);
         EventDispatcher(maskEffectInstance).addEventListener(TweenEvent.TWEEN_UPDATE, tweenEventHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4646
Author:   pfarland@adobe.com
Date:     2009-01-23T18:45:23.310008Z

Log Message:
-----------
As part of the Advanced CSS work, adding support for pseudo-selectors that match component states. There are two scenarios for matching states.

1. For skinnable Spark subclasses of FxComponents, such as FxButton. The pseudo-selector will be matched against the current skin state.

2. For other UIComponents, the pseudo-selector is matched against the currentState. Note that since states are declared at the document level, pseudo-selectors are written to match the component representing the document only (rather than an arbitrary child component of that document). Note that as with styles in general, it is not advised to make changes to inheriting styles at the Application root as this impacts all child components in the display list.

Note that further optimization will be investigated to limit the number of components that are redrawn where a change in state is accompanied by a matching pseudo-selector.

QE: Yes
Doc: Yes, see the Advanced CSS specification for Gumbo.
Checkintests: Pass
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSSelector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.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/framework/src/mx/styles/CSSCondition.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/CSSStyleDeclaration.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/framework/src/mx/styles/IStyleManager3.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/framework/src/mx/styles/CSSSelector.as
+++ frameworks/projects/framework/src/mx/styles/CSSSelector.as
@@ -195,7 +195,7 @@
         if (kind == CSSSelectorKind.TYPE_SELECTOR
             || kind == CSSSelectorKind.CONDITIONAL_SELECTOR)
         {
-            if (value == "*" || value == "global" || object.isAssignableToType(value))
+            if (value == "*" || value == "global" || value == "" || object.isAssignableToType(value))
             {
                 match = true;
             }
@@ -247,9 +247,9 @@
     /**
      *  @private
      */
-    public function isPseudoSelector():Boolean
-    {
-        var result:Boolean = false;
+    public function getPseudoSelector():String
+    {
+        var result:String = null;

         if (kind == CSSSelectorKind.CONDITIONAL_SELECTOR && conditions != null)
         {
@@ -257,7 +257,7 @@
             {
                 if (condition.kind == CSSConditionKind.PSEUDO_CONDITION)
                 {
-                    result = true;
+                    result = condition.value;
                     break;
                 }
             }


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

--- frameworks/projects/framework/src/mx/utils/GetTimerUtil.as
+++ frameworks/projects/framework/src/mx/utils/GetTimerUtil.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 mx.utils
 {


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

--- frameworks/projects/framework/src/mx/utils/GraphicsUtil.as
+++ frameworks/projects/framework/src/mx/utils/GraphicsUtil.as
@@ -20,6 +20,11 @@
  *  You do not create instances of GraphicsUtil;
  *  instead you simply call methods such as the
  *  GraphicsUtil.drawRoundRectComplex() method.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class GraphicsUtil
 {
@@ -61,6 +66,11 @@
      *
      * @param bottomRightRadius The radius of the bottom-right corner, in pixels.
      *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
 	public static function drawRoundRectComplex(graphics:Graphics, x:Number, y:Number,
 							  width:Number, height:Number,


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8741
Author:   jimurphy@adobe.com
Date:     2009-07-22T21:00:56.965677Z

Log Message:
-----------
Merged 3.x revisions 8623,8685,8740 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/mxml/IMXMLSupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as
+++ frameworks/projects/rpc/src/mx/rpc/xml/SimpleXMLDecoder.as
@@ -204,9 +204,11 @@
     }

     /**
-     * Returns the local name of an XMLNode.
-     *
-     * @return The local name of an XMLNode.
+     *  Returns the local name of an XMLNode.
+     *
+     *  @param xmlNode The XMLNode.
+     *
+     *  @return The local name of an XMLNode.
      *
      *  @langversion 3.0
      *  @playerversion Flash 9


Transferred from the Adobe Open Source Subversion Repository

Revision: 18402
Author:   hmuller@adobe.com
Date:     2010-11-01T22:22:13.646124Z

Log Message:
-----------
Added verticalScrollPolicy,horizontalScrollPolicy "cover styles" to List, just like what was done for DataGrid.

Fixed a bug in the DataGrid version of the code (thanks Ryan!) and added some comments all around, to clarify what we're doing.

QE notes:
Doc notes:
Bugs:
Reviewer: Ryan
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
<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/components/DataGrid.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -1769,6 +1769,11 @@

         if (scroller)
         {
+            // The scrollPolicy styles are initialized in framework/defaults.css
+            // so there's no way to determine if been explicitly set here.  To avoid
+            // preempting explicitly set scroller scrollPolicy styles with the default
+            // "auto" value, we only forward the style if it's not "auto".
+
             const vsp:String = getStyle("verticalScrollPolicy");
             if (styleName == "verticalScrollPolicy")
                 scroller.setStyle("verticalScrollPolicy", vsp);
@@ -1777,9 +1782,9 @@

             const hsp:String = getStyle("horizontalScrollPolicy");
             if (styleName == "horizontalScrollPolicy")
-                scroller.setStyle("horizontalScrollPolicy", vsp);
+                scroller.setStyle("horizontalScrollPolicy", hsp);
             else if (allStyles && hsp && (hsp !== ScrollPolicy.AUTO))
-                scroller.setStyle("horizontalScrollPolicy", vsp);
+                scroller.setStyle("horizontalScrollPolicy", hsp);
         }
     }

@@ -2046,6 +2051,11 @@

         if (instance == scroller)
         {
+            // The scrollPolicy styles are initialized in framework/defaults.css
+            // so there's no way to determine if been explicitly set here.  To avoid
+            // preempting explicitly set scroller scrollPolicy styles with the default
+            // "auto" value, we only forward the style if it's not "auto".
+
             const vsp:String = getStyle("verticalScrollPolicy");
             if (vsp && (vsp !== ScrollPolicy.AUTO))
                 scroller.setStyle("verticalScrollPolicy", vsp);


Transferred from the Adobe Open Source Subversion Repository

Revision: 18749
Author:   cframpto@adobe.com
Date:     2010-11-19T21:50:39.069347Z

Log Message:
-----------
selectAll() should not include cells in columns which have the visible property set to false.  In addition, selectAll() will not longer include rows and columns which are added after selectAll but before any operation which 'canceled' the select all.  The ASDoc has been updated.  Fix selectionLength since it was busted for rows.  Fix selectedItem's ASdoc default value.

QE notes:
Doc notes:
Bugs: SDK-28613
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration: yes - selectAll() behavior changed

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

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -3813,7 +3813,7 @@

             case GridSelectionEventKind.SELECT_ALL:
             {
-                changesSelection = !gridSelection.selectAllFlag;
+                changesSelection = true;
                 break;
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4903
Author:   jimurphy@adobe.com
Date:     2009-02-09T18:23:39.100744Z

Log Message:
-----------
Merge i10 revisions 4900-4902 -> trunk

Modified Paths:
--------------
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -393,17 +393,22 @@
         if (!mx_internal::styleChainInitialized)
             return;

-        // If both width and height are specified, then measure isn't called
-        // and measuredWidth/Height will remain 0.  In this case the compose
-        // will always be done here.  Otherwise measure will compose and set
-        // measuredWidth/Height/isOverset.  If the unscaledWidth/Height is the
-        // same as measuredWidth/Height there is no need to redo the compose.
+        // Only compose if it's necessary:
+        //   1) A style change.
+        //   2) If both width/height are specified, measure isn't called
+        //      and measuredWidth/Height will be 0 here.
+        //   3) A layout change which leaves the measured values different
+        //      than the unscaled values.
+        //   4) measuredHeight/Width set by measure changed by super class
+        //      to conform to explicit min/max values for width/height.
         if (stylesChanged ||
-            unscaledWidth != measuredWidth ||
-            unscaledHeight != measuredHeight)
+            measuredWidth != unscaledWidth ||
+            measuredWidth != Math.ceil(textFlowComposer.bounds.width) ||
+            measuredHeight != unscaledHeight ||
+            measuredHeight != Math.ceil(textFlowComposer.bounds.height))
         {
-			isOverset = compose(unscaledWidth, unscaledHeight);
-		}
+	    isOverset = compose(unscaledWidth, unscaledHeight);
+	}

         mx_internal::clip(isOverset, unscaledWidth, unscaledHeight);
     }
@@ -643,8 +648,9 @@
         // Temporary fix for SDK-18880.
         // This won't be necessary when TLF allows
         // FlowElements to be reparented.
-        textFlow.replaceChildren(0, textFlow.numChildren);
-
+        if (contentChanged || textChanged)
+            textFlow.replaceChildren(0, textFlow.numChildren);
+
         textFlow = createTextFlow();
         _content = textFlow;


Transferred from the Adobe Open Source Subversion Repository

Revision: 10075
Author:   rfrishbe@adobe.com
Date:     2009-09-09T01:01:58.077369Z

Log Message:
-----------
Cleanups from the spark text changes and some bug fixes for VideoElement.  Also some PARB changes for UIComponent.

TitleBar: Changing the skin part type from Label to Textbase

UIComponent: skipMeasure()->canSkipMeasurement() to be in line with GraphicElement.  This has been PARB approved.
UIComponent: same with hasComplexLayoutMatrix...this replaces hasDeltaIdentityTransform.  This has been PARB approved.

StyleProtoChain: cleanup around what interfaces to use

TextBase: clean up code that’s no longer needed.

VideoElement: Fixing 4 bugs:
SDK-22824: sourceLastPlayed keeps track of what video file we’ve called play() with last.  This way if a user pauses the video and wants to start it up again at the same point, we can call play(null) on the underlying FLVPlayback videoPlayer.  However, anytime the souce changes, we want to null out sourceLastPlayed.  This was causing a bug when someone set the source to null and then reset it to it’s previous value.

SDK-23034 (GUMBO_PRIORITY): This deals with some FLVPlayback quirks around sizing.  I had put in a fix so we weren’t setting width/height on the underlying videoPlayer too many times, but apparently we need to make sure it always gets called once.  Hopefully when switching to Strobe we can cleanup this logic...I put a FIXME in to do this.

SDK-21947/ SDK-22533 - some video files don’t always send out a metadata event.  I’m not quite sure why this is, but in case this happens, we do a check in the ready handler to see whether we should call invalidateSize() to make sure it gets sized properly.

QE notes:-
Doc notes:-
Bugs: SDK-22824, SDK-23034, SDK-21947, SDK-22533
Reviewer: Glenn, Corey
Tests run: checkintests, Button, GraphicTags, VideoElement, and VideoPlayer (some VideoPlayer were failing, but I think it should be fine)
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Skin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AddActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/RemoveActionInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.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/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/VideoElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -64,7 +64,7 @@
 [IconFile("RichText.png")]

 /**
- *  RichText is a GraphicElement that can display one or more lines
+ *  RichText is a low-level UIComponent that can display one or more lines
  *  of richly-formatted text and embedded images.
  *
  *
For performance reasons, it does not support scrolling,
@@ -102,10 +102,6 @@
  *
RichText has an object-oriented model of what it displays,
  *        while Text does not.

  *
Text is selectable, while RichText does not support selection.

- *
Text is a UIComponent that can be used in either MX
- *        containers such as HBox or in Spark containers such as Group.
- *        RichText is a GraphicElement that can only be used
- *        inside Spark containers.

  *

  *
  *
@@ -696,7 +692,7 @@

     //--------------------------------------------------------------------------
     //
-    //  Overridden methods: GraphicElement
+    //  Overridden methods: UIComponent
     //
     //--------------------------------------------------------------------------

@@ -1010,12 +1006,6 @@
     private function addTextLine(textLine:DisplayObject):void
     {
         textLines.push(textLine);
-
-        // Remember the original position of each TextLine.
-		// When TextLines are children of a shared DisplayObject,
-		// these original positions must be offset by drawX and drawY.
-		textLinesX.push(textLine.x);
-		textLinesY.push(textLine.y);
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17450
Author:   rfrishbe@adobe.com
Date:     2010-08-23T21:43:35.884406Z

Log Message:
-----------
- Modified the Scroller algorithm used in calculating the scrollAnchorPoint (the point where the scroll starts).  Now instead of using the mouseEvent coordinates where the threshold was crossed, we now calculate the threshold and use that instead.  In practice, a user probably wouldn't notice this much (unless there was a big delay between MouseMoves for some reason). However, this calculation is the right thing to do, and will help produce more consistent results with regards to QE and programatically faking the mouse events.

- Removed a FIXME that no longer applied since MobileIconItemRenderer.subText was already renamed to MobileIconItemRenderer.message.

- Modified GetTimerUtil for QE to use fakeTime instead of getTimerFunction().

QE notes: Modified GetTimerUtil so it now uses fakeTime instead of getTimerFunction()
Doc notes: None
Bugs: SDK-27546
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/GetTimerUtil.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@1280484 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/Scroller.as
+++ frameworks/projects/spark/src/spark/components/Scroller.as
@@ -1694,9 +1694,9 @@
 import flash.utils.getTimer;

 import mx.core.mx_internal;
+import mx.events.SandboxMouseEvent;
 import mx.events.TouchInteractionEvent;
 import mx.events.TouchInteractionReason;
-import mx.events.SandboxMouseEvent;
 import mx.utils.GetTimerUtil;

 import spark.components.Scroller;
@@ -1877,7 +1877,7 @@
     public function startScrollWatch(event:Event):void
     {
         // this is the point from which all deltas are based.
-        startTime = GetTimerUtil.getTimerFunction();
+        startTime = GetTimerUtil.getTimer();

         if (event is MouseEvent && event.type == MouseEvent.MOUSE_DOWN)
         {
@@ -1952,7 +1952,7 @@
         }

         // add time history as well
-        mouseEventTimeHistory[currentIndex] = GetTimerUtil.getTimerFunction() - startTime;
+        mouseEventTimeHistory[currentIndex] = GetTimerUtil.getTimer() - startTime;

         // increment current length if appropriate
         mouseEventLength ++;
@@ -2056,11 +2056,50 @@
                 scrollStartEvent.reason = TouchInteractionReason.SCROLL;
                 mouseDownedDisplayObject.dispatchEvent(scrollStartEvent);

-                // FIXME (rfrishbe): the difference should not be from the original point but from the slop.
-                // otherwise we "jump" on the first move.
-                // we should reset startPoint here to be this point minus slop (in the direction that caused the scroll)
-                scrollGestureAnchorPoint = new Point(event.stageX, event.stageY);
                 isScrolling = true;
+
+                // now that we're scrolling, calculate the scrollAnchorPoint.
+                // There are three cases: diagonal, horizontal, and vertical.
+                // if (0,0) is where you mouseDowned, (10,10) is where you are at now.  Then mouseDownedDiff is (10, 10)
+                // scrollAnchorPoint is calculated as where we "crossed the threshold" in to scrolling territory.
+                // so we figure out if they scrolled up, down, right, left (or a combination of that for
+                // the diagonal case).
+                if (possibleScrollHorizontally && possibleScrollVertically)
+                {
+                    // diagonal case
+                    if (mouseDownedDifference.length >= diagonalSlop)
+                    {
+                        var scrollAnchorDiffX:int;
+                        var scrollAnchorDiffY:int;
+
+                        // normalize the diff to keep the right angle
+                        var normalizedDiff:Point = mouseDownedDifference.clone();
+                        normalizedDiff.normalize(diagonalSlop);
+
+                        // 4 possibilities: top-right, top-left, bottom-right, bottom-left
+                        scrollAnchorDiffX = Math.round(normalizedDiff.x);
+                        scrollAnchorDiffY = Math.round(normalizedDiff.y);
+
+                        scrollGestureAnchorPoint = new Point(mouseDownedPoint.x + scrollAnchorDiffX,
+                            mouseDownedPoint.y + scrollAnchorDiffY);
+                    }
+                }
+                else if (possibleScrollHorizontally)
+                {
+                    // horizontal case
+                    if (mouseDownedDifference.x >= horizontalSlop)
+                        scrollGestureAnchorPoint = new Point(mouseDownedPoint.x + horizontalSlop, mouseDownedPoint.y);
+                    else //if (mouseDownedDifference.x >= -horizontalSlop)
+                        scrollGestureAnchorPoint = new Point(mouseDownedPoint.x - horizontalSlop, mouseDownedPoint.y);
+                }
+                else if (possibleScrollVertically)
+                {
+                    // vertical case
+                    if (mouseDownedDifference.y >= verticalSlop)
+                        scrollGestureAnchorPoint = new Point(mouseDownedPoint.x, mouseDownedPoint.y + verticalSlop);
+                    else //if (mouseDownedDifference.y >= -verticalSlop)
+                        scrollGestureAnchorPoint = new Point(mouseDownedPoint.x, mouseDownedPoint.y - verticalSlop);
+                }

                 // see comment located above the variable for why this is needed
                 scrollDraggingCountForUpdateAfterEvent = 0;
@@ -2110,7 +2149,7 @@
         // decide about throw

         // pad click and timeHistory if needed
-        var currentTime:Number = GetTimerUtil.getTimerFunction();
+        var currentTime:Number = GetTimerUtil.getTimer();

         // calculate average time b/w events and see if the last two (mouseMove and this mouseUp)
         // were far apart.  If they were, then don't do anything if the velocity of them is small.