Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

--- frameworks/projects/mx/src/mx/skins/halo/RadioButtonIcon.as
+++ frameworks/projects/mx/src/mx/skins/halo/RadioButtonIcon.as
@@ -0,0 +1,365 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2004-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.skins.halo
+{
+
+import flash.display.GradientType;
+import flash.display.Graphics;
+import mx.skins.Border;
+import mx.styles.StyleManager;
+import mx.utils.ColorUtil;
+
+/**
+ *  The skin for all the states of the icon in a RadioButton.
+ */
+public class RadioButtonIcon extends Border
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var cache:Object = {};
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Several colors used for drawing are calculated from the base colors
+	 *  of the component (themeColor, borderColor and fillColors).
+	 *  Since these calculations can be a bit expensive,
+	 *  we calculate once per color set and cache the results.
+	 */
+	private static function calcDerivedStyles(themeColor:uint,
+											  borderColor:uint,
+											  fillColor0:uint,
+											  fillColor1:uint):Object
+	{
+		var key:String = HaloColors.getCacheKey(themeColor, borderColor,
+												fillColor0, fillColor1);
+
+		if (!cache[key])
+		{
+			var o:Object = cache[key] = {};
+
+			// Cross-component styles
+			HaloColors.addHaloColors(o, themeColor, fillColor0, fillColor1);
+
+			// RadioButton-unique styles
+			o.borderColorDrk1 = ColorUtil.adjustBrightness2(borderColor, -60);
+		}
+
+		return cache[key];
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function RadioButtonIcon()
+	{
+		super();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  measuredWidth
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get measuredWidth():Number
+    {
+        return 14;
+    }
+
+    //----------------------------------
+	//  measuredHeight
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    override public function get measuredHeight():Number
+    {
+        return 14;
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function updateDisplayList(w:Number, h:Number):void
+	{
+		super.updateDisplayList(w, h);
+
+		// User-defined styles
+		var radioColor:uint = getStyle("iconColor");
+		var borderColor:uint = getStyle("borderColor");
+		var fillAlphas:Array = getStyle("fillAlphas");
+		var fillColors:Array = getStyle("fillColors");
+		StyleManager.getColorNames(fillColors);
+		var highlightAlphas:Array = getStyle("highlightAlphas");
+		var themeColor:uint = getStyle("themeColor");
+
+		// Derived styles
+		var derStyles:Object = calcDerivedStyles(themeColor, borderColor,
+												 fillColors[0], fillColors[1]);
+		var borderColorDrk1:Number =
+			ColorUtil.adjustBrightness2(borderColor, -50);
+
+		var themeColorDrk1:Number =
+			ColorUtil.adjustBrightness2(themeColor, -25);
+
+		var r:Number = width / 2;
+
+		var upFillColors:Array;
+		var upFillAlphas:Array;
+
+		var disFillColors:Array;
+		var disFillAlphas:Array;
+
+		var g:Graphics = graphics;
+
+		g.clear();
+
+		switch (name)
+		{
+			case "upIcon":
+			{
+   				upFillColors = [ fillColors[0], fillColors[1] ];
+				upFillAlphas = [ fillAlphas[0], fillAlphas[1] ];
+
+				// border
+				g.beginGradientFill(GradientType.LINEAR,
+									[ borderColor, borderColorDrk1 ],
+									[100, 100], [ 0, 0xFF],
+									verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+					// radio fill
+				g.beginGradientFill(GradientType.LINEAR,
+									upFillColors,
+									upFillAlphas, [ 0, 0xFF ],
+									verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2,
+					{ tl: r, tr: r, bl: 0, br: 0 },
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(0, 0, w - 2, (h - 2) / 2 ));
+
+				break;
+			}
+
+			case "overIcon":
+			{
+				var overFillColors:Array;
+				if (fillColors.length > 2)
+					overFillColors = [ fillColors[2], fillColors[3] ];
+				else
+					overFillColors = [ fillColors[0], fillColors[1] ];
+
+				var overFillAlphas:Array;
+				if (fillAlphas.length > 2)
+					overFillAlphas = [ fillAlphas[2], fillAlphas[3] ];
+  				else
+					overFillAlphas = [ fillAlphas[0], fillAlphas[1] ];
+
+				// border
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ themeColor, themeColorDrk1 ], [ 100, 100 ], [ 0, 0xFF ],
+					verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.drawCircle(r, r, r - 1);
+				g.endFill();
+
+				// radio fill
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					overFillColors, overFillAlphas, [ 0, 0xFF ],
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2,
+					{ tl: r, tr: r, bl: 0, br: 0 },
+					[ 0xFFFFFF, 0xFFFFFF ],
+					highlightAlphas,
+					verticalGradientMatrix(0, 0, w - 2, (h - 2) / 2));
+
+				break;
+			}
+
+			case "downIcon":
+			{
+				// border
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ themeColor, themeColorDrk1 ], [ 100, 100 ], [ 0, 0xFF ],
+					verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.endFill();
+
+				// radio fill
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ derStyles.fillColorPress1, derStyles.fillColorPress2 ],
+					[ 100, 100 ], [ 0, 0xFF ],
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2,
+					{ tl: r, tr: r, bl: 0, br: 0 },
+					[ 0xFFFFFF, 0xFFFFFF ], highlightAlphas,
+					verticalGradientMatrix(0, 0, w - 2, (h - 2) / 2));
+
+				break;
+			}
+
+			case "disabledIcon":
+			{
+   				disFillColors = [ fillColors[0], fillColors[1] ];
+				disFillAlphas = [ Math.max( 0, fillAlphas[0] - 0.15),
+								  Math.max( 0, fillAlphas[1] - 0.15) ];
+
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ borderColor, borderColorDrk1 ], [ 0.5, 0.5 ], [ 0, 0xFF ],
+					verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					disFillColors, disFillAlphas, [ 0, 0xFF ],
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				break;
+			}
+
+			case "selectedUpIcon":
+			case "selectedOverIcon":
+			case "selectedDownIcon":
+			{
+   				upFillColors = [ fillColors[0], fillColors[1] ];
+				upFillAlphas = [ fillAlphas[0], fillAlphas[1] ];
+
+				// border
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ borderColor, borderColorDrk1 ], [ 100, 100 ], [ 0, 0xFF ],
+					verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// radio fill
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					upFillColors, upFillAlphas, [ 0, 0xFF],
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// top highlight
+				drawRoundRect(
+					1, 1, w - 2, (h - 2) / 2,
+					{ tl: r, tr: r, bl: 0, br: 0 },
+					[0xFFFFFF, 0xFFFFFF], highlightAlphas,
+					verticalGradientMatrix(0, 0, w - 2, (h - 2) / 2));
+
+				// radio symbol
+				g.beginFill(radioColor);
+				g.drawCircle(r, r, 2);
+				g.endFill();
+
+				break;
+			}
+
+			case "selectedDisabledIcon":
+			{
+   				disFillColors = [ fillColors[0], fillColors[1] ];
+				disFillAlphas = [ Math.max( 0, fillAlphas[0] - 0.15),
+								  Math.max( 0, fillAlphas[1] - 0.15) ];
+
+				// border
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					[ borderColor, borderColorDrk1 ], [ 0.5, 0.5 ], [ 0, 0xFF ],
+					verticalGradientMatrix(0, 0, w, h));
+				g.drawCircle(r, r, r);
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				// radio fill
+				g.beginGradientFill(
+					GradientType.LINEAR,
+					disFillColors, disFillAlphas, [ 0, 0xFF],
+					verticalGradientMatrix(1, 1, w - 2, h - 2));
+				g.drawCircle(r, r, (r - 1));
+				g.endFill();
+
+				radioColor = getStyle("disabledIconColor");
+
+				// radio symbol
+				g..beginFill(radioColor);
+				g..drawCircle(r, r, 2);
+				g..endFill();
+
+				break;
+			}
+		}
+	}
+}
+
+}


Take an optional ApplicationDomain on a few methods that create classes.

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

--- src/as/com/threerings/util/ClassUtil.as
+++ src/as/com/threerings/util/ClassUtil.as
@@ -20,6 +20,8 @@
 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

 package com.threerings.util {
+
+import flash.system.ApplicationDomain;

 import flash.utils.describeType;
 import flash.utils.getQualifiedClassName;
@@ -62,9 +64,9 @@
      * Return a new instance that is the same class as the specified
      * object. The class must have a zero-arg constructor.
      */
-    public static function newInstance (obj :Object) :Object
+    public static function newInstance (obj :Object, appDom :ApplicationDomain = null) :Object
     {
-        var clazz :Class = getClass(obj);
+        var clazz :Class = getClass(obj, appDom);
         return new clazz();
     }

@@ -73,16 +75,26 @@
         return (getQualifiedClassName(obj1) == getQualifiedClassName(obj2));
     }

-    public static function getClass (obj :Object) :Class
+    public static function getClass (obj :Object, appDom :ApplicationDomain = null) :Class
     {
-        return getClassByName(getQualifiedClassName(obj));
+        return getClassByName(getQualifiedClassName(obj), appDom);
     }

-    public static function getClassByName (cname :String) :Class
+    public static function getClassByName (cname :String, appDom :ApplicationDomain = null) :Class
     {
         try {
-            // see also ApplicationDomain.currentDomain.getClass(cname)
-            return (getDefinitionByName(cname.replace("::", ".")) as Class);
+            cname = cname.replace("::", ".");
+            if (appDom != null) {
+                try {
+                    var c :Class = appDom.getDefinition(cname) as Class;
+                    if (c != null) {
+                        return c;
+                    }
+                } catch (err :Error) {
+                    // fall through
+                }
+            }
+            return (getDefinitionByName(cname) as Class);

         } catch (error :ReferenceError) {
             var log :Log = Log.getLog(ClassUtil);


update readme

update readme

--- testSrc/TestStream.as
+++ testSrc/TestStream.as
@@ -1,15 +1,15 @@
 package
 {
+    import com.kemsky.$;
     import com.kemsky.impl.Stream;
     import com.kemsky.impl.curry;
     import com.kemsky.impl.filters._;
+    import com.kemsky.impl.filters.add;
     import com.kemsky.impl.filters.eq;
     import com.kemsky.impl.filters.ge;
     import com.kemsky.impl.filters.gt;
-    import com.kemsky.$;
     import com.kemsky.impl.filters.prop;
     import com.kemsky.impl.filters.subtract;
-    import com.kemsky.impl.filters.add;

     import flash.utils.Dictionary;

@@ -20,7 +20,6 @@

     import org.flexunit.asserts.assertEquals;
     import org.flexunit.asserts.assertFalse;
-    import org.flexunit.asserts.assertTrue;

     public class TestStream
     {
@@ -35,7 +34,7 @@
         [Test]
         public function testClonePrimitiveStream():void
         {
-            var primitive:Stream = $(1, 2 , 3);
+            var primitive:Stream = $(1, 2, 3);

             var primitiveClone:Stream = primitive.clone();
             assertEquals(primitiveClone.length, 3);
@@ -166,6 +165,7 @@
             {
                 return a + b + c;
             }
+
             var a:Function = curry(many, 1);
             assertEquals(a(1, 1), 3);

@@ -270,28 +270,6 @@
             for (var k:int = 0; k < flatMap.length; k++)
             {
                 assertEquals(flatMap[k], 3);
-            }
-        }
-
-        [Test]
-        public function testSortOn():void
-        {
-            var s:Stream = new Stream();
-            s.push(new Item("lettuce", 1.49));
-            s.push(new Item("spinach", 1.89));
-            s.push(new Item("asparagus", 3.99));
-            s.push(new Item("celery", 1.29));
-            s.push(new Item("squash", 1.44));
-
-            s.sortOn("name");
-
-            s.sortOn("price", Array.NUMERIC | Array.DESCENDING);
-
-            var val:Number = s[0].price;
-            for (var i:int = 0; i < s.length; i++)
-            {
-                assertTrue(val >= s[i].price);
-                val = s[i].price;
             }
         }

@@ -321,95 +299,74 @@
         }

         [Test]
-        public function testCreate():void
-        {
-            var streamEmpty:Stream = $();
-            assertEquals(streamEmpty.length, 0);
-            iterate(streamEmpty);
-            deleteItem(streamEmpty);
-            push(streamEmpty, 5);
-            pop(streamEmpty);
-
-            var streamArray:Stream = $([1, 2, 3, 4, 5]);
-            assertEquals(streamArray.length, 5);
-            iterate(streamArray);
-            deleteItem(streamArray);
-            push(streamArray, 5);
-            pop(streamArray);
-
-            var streamArrayCollection:Stream = $(new ArrayCollection([1, 2, 3, 4, 5]));
-            assertEquals(streamArrayCollection.length, 5);
-            iterate(streamArrayCollection);
-            deleteItem(streamArrayCollection);
-            push(streamArrayCollection, 5);
-            pop(streamArrayCollection);
-
-            var streamArguments:Stream = $(1, 2, 3, 4, 5);
-            assertEquals(streamArguments.length, 5);
-            iterate(streamArguments);
-            deleteItem(streamArguments);
-            push(streamArguments, 5);
-            pop(streamArguments);
-
-            var streamOneItem:Stream = $("item");
-            assertEquals(streamOneItem.length, 1);
-            iterate(streamOneItem);
-            deleteItem(streamOneItem);
-            push(streamOneItem, 5);
-            pop(streamOneItem);
-        }
-
-        private function join(stream:Stream):void
-        {
-            log.info(stream.join(","));
-        }
-
-        private function pop(stream:Stream):void
-        {
-            var length:int = stream.length;
-            var item:* = stream[length - 1];
-            var popped:* = stream.pop();
-            assertEquals(stream.length, length - 1);
-            assertEquals(popped, item);
-        }
-
-        private function push(stream:Stream, item:*):void
-        {
-            var length:int = stream.length;
-            stream.push(item);
-            assertEquals(stream.length, length + 1);
-            assertEquals(stream[length], item);
-        }
-
-        private function deleteItem(stream:Stream):void
-        {
-            var length:int = stream.length;
-            if (length == 0)
-            {
-                try
-                {
-                    delete stream[0];
-                    assertFalse(true);
-                }
-                catch (e:Error)
-                {
-                }
+        public function testCreateStream():void
+        {
+            var empty:Stream = $();
+            assertEquals(empty.empty, true);
+            assertEquals(empty.length, 0);
+
+
+            var original:Array = [1, 2, 3];
+
+            var array:Stream = $([1, 2, 3]);
+            assertEquals(array.empty, false);
+            assertEquals(array.length, 3);
+            assertEquals(array.first, 1);
+            assertEquals(array[0], 1);
+            assertEquals(array[1], 2);
+            assertEquals(array[2], 3);
+            assertEquals(array.last, 3);
+            verify(array, original);
+            verify(array.array, original);
+            verify(array.collection, original);
+            verify(array.list, original);
+
+
+            var collection:Stream = $(new ArrayCollection([1, 2, 3]));
+            assertEquals(collection.empty, false);
+            assertEquals(collection.length, 3);
+            assertEquals(collection.first, 1);
+            assertEquals(collection[0], 1);
+            assertEquals(collection[1], 2);
+            assertEquals(collection[2], 3);
+            assertEquals(collection.last, 3);
+            verify(collection, original);
+            verify(collection.array, original);
+            verify(collection.collection, original);
+            verify(collection.list, original);
+
+
+            var args:Stream = $(1, 2, 3);
+            assertEquals(args.empty, false);
+            assertEquals(args.length, 3);
+            assertEquals(args.first, 1);
+            assertEquals(args[0], 1);
+            assertEquals(args[1], 2);
+            assertEquals(args[2], 3);
+            assertEquals(args.last, 3);
+            verify(args, original);
+            verify(args.array, original);
+            verify(args.collection, original);
+            verify(args.list, original);
+
+
+            var single:Stream = $("item");
+            assertEquals(single.empty, false);
+            assertEquals(single.length, 1);
+            assertEquals(single[0], "item");
+            assertEquals(single.first, "item");
+            assertEquals(single.last, "item");
+            assertEquals(single.first, single.last);
+        }
+
+        private function verify(s:*, o:Array):void
+        {
+            var index:int = 0;
+            for each (var item:* in s)
+            {
+                assertEquals(item, o[index]);
+                index++;
             }
-            else
-            {
-                delete stream[0];
-                assertEquals(stream.length, length - 1);
-            }
-        }
-
-        private function iterate(stream:Stream):void
-        {
-            var count:int = stream.length;
-            for each (var item:* in stream)
-            {
-                count--;
-            }
-            assertEquals(count, 0);
         }
     }
 }


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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as
@@ -1,13 +1,21 @@
-////////////////////////////////////////////////////////////////////////////////////////////////////
+////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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.
+//
+////////////////////////////////////////////////////////////////////////////////

 package spark.skins.mobile
 {


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

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

 package mx.controls.treeClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 88
Author:   open-source-svn-admin@adobe.com
Date:     2008-01-03T22:47:56.499469Z

Log Message:
-----------
Perforce Change 191925 by proberts@proberts-laptop-flex on 2008/01/03 16:47:12 Severity: ignore Details: doc additions/clean up for FlexNativeMenu. Also FLEXDOCS-320 (update documentation for FlexNativeMenuEvent.MENU_SHOW to explain that the index, label, and item properties are null) Affected files ...

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/in/air/air_version.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/Consumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/NoChannelAvailableError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/config/ServerConfig.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</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/messaging/errors/MessagingError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/InvalidChannelError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXDecoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractProducer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/errors/MessageSerializationError.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/messaging/Channel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.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/airframework/src/mx/controls/FileSystemList.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/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractConsumer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.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/messaging/channels/amfx/AMFXContext.as</path>
<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/airframework/src/mx/events/FlexNativeMenuEvent.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/lib/flex-messaging-common.jar</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/NetConnectionChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXHeader.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/messaging/channels/SecureAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Tree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/StreamingAMFChannel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/Grammar.jj</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ConsumerMessageDispatcher.as</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/messaging/errors/InvalidDestinationError.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXResult.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/channels/amfx/AMFXEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/ChannelSet.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/messaging/AbstractMessageStore.as</path>

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

--- frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as
+++ frameworks/projects/rpc/src/mx/messaging/errors/InvalidDestinationError.as
@@ -1,21 +1,14 @@
-/*************************************************************************
- *
- * ADOBE CONFIDENTIAL
- * __________________
- *
- *  [2002] - [2007] Adobe Systems Incorporated
- *  All Rights Reserved.
- *
- * NOTICE:  All information contained herein is, and remains
- * the property of Adobe Systems Incorporated and its suppliers,
- * if any.  The intellectual and technical concepts contained
- * herein are proprietary to Adobe Systems Incorporated
- * and its suppliers and may be covered by U.S. and Foreign Patents,
- * patents in process, and are protected by trade secret or copyright law.
- * Dissemination of this information or reproduction of this material
- * is strictly forbidden unless prior written permission is obtained
- * from Adobe Systems Incorporated.
- */
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
 package mx.messaging.errors
 {

@@ -52,4 +45,4 @@
     }
 }

-}+}


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.skins
 {


Add tests for Enumerate{UserShared,Workshop}Files

--- test/src/FRESteamWorksTest.as
+++ test/src/FRESteamWorksTest.as
@@ -48,6 +48,8 @@
 			addButton("Toggle fullscreen", toggleFullscreen);
 			addButton("Show Friends overlay", activateOverlay);
 			addButton("List subscribed files", enumerateSubscribedFiles);
+			addButton("List shared files", enumerateSharedFiles);
+			addButton("List workshop files", enumerateWorkshopFiles);

 			Steamworks.addEventListener(SteamEvent.STEAM_RESPONSE, onSteamResponse);
 			Steamworks.addOverlayWorkaround(stage, true);
@@ -177,10 +179,27 @@
 			log("enumerateUserSubscribedFiles(0) == " + Steamworks.enumerateUserSubscribedFiles(0));
 		}

+		private function enumerateSharedFiles(e:Event = null):void {
+			if(!Steamworks.isReady) return;
+
+			var userID:String = Steamworks.getUserID();
+			var res:Boolean = Steamworks.enumerateUserSharedWorkshopFiles(userID, 0, [], []);
+			log("enumerateSharedFiles(" + userID + ", 0, [], []) == " + res);
+		}
+
+		private function enumerateWorkshopFiles(e:Event = null):void {
+			if(!Steamworks.isReady) return;
+
+			var res:Boolean = Steamworks.enumeratePublishedWorkshopFiles(
+				WorkshopConstants.ENUMTYPE_RankedByVote, 0, 10, 0, [], []);
+			log("enumerateSharedFiles(...) == " + res);
+		}
+
 		private var id:String;
 		private var handle:String;
 		private function onSteamResponse(e:SteamEvent):void{
 			var apiCall:Boolean;
+			var i:int;
 			switch(e.req_type){
 				case SteamConstants.RESPONSE_OnUserStatsStored:
 					log("RESPONSE_OnUserStatsStored: "+e.response);
@@ -199,12 +218,28 @@
 					break;
 				case SteamConstants.RESPONSE_OnEnumerateUserSubscribedFiles:
 					log("RESPONSE_OnEnumerateUserSubscribedFiles: " + e.response);
-					var result:SubscribedFilesResult = Steamworks.enumerateUserSubscribedFilesResult();
-					log("User subscribed files: " + result.resultsReturned + "/" + result.totalResults);
-					for(var i:int = 0; i < result.resultsReturned; i++) {
-						id = result.publishedFileId[i];
-						apiCall = Steamworks.getPublishedFileDetails(result.publishedFileId[i]);
-						log(i + ": " + result.publishedFileId[i] + " (" + result.timeSubscribed[i] + ") - " + apiCall);
+					var subRes:SubscribedFilesResult = Steamworks.enumerateUserSubscribedFilesResult();
+					log("User subscribed files: " + subRes.resultsReturned + "/" + subRes.totalResults);
+					for(i = 0; i < subRes.resultsReturned; i++) {
+						id = subRes.publishedFileId[i];
+						apiCall = Steamworks.getPublishedFileDetails(subRes.publishedFileId[i]);
+						log(i + ": " + subRes.publishedFileId[i] + " (" + subRes.timeSubscribed[i] + ") - " + apiCall);
+					}
+					break;
+				case SteamConstants.RESPONSE_OnEnumerateUserSharedWorkshopFiles:
+					log("RESPONSE_OnEnumerateUserSharedWorkshopFiles: " + e.response);
+					var userRes:UserFilesResult = Steamworks.enumerateUserSharedWorkshopFilesResult();
+					log("User shared files: " + userRes.resultsReturned + "/" + userRes.totalResults);
+					for(i = 0; i < userRes.resultsReturned; i++) {
+						log(i + ": " + userRes.publishedFileId[i]);
+					}
+					break;
+				case SteamConstants.RESPONSE_OnEnumeratePublishedWorkshopFiles:
+					log("RESPONSE_OnEnumeratePublishedWorkshopFiles: " + e.response);
+					var fileRes:WorkshopFilesResult = Steamworks.enumeratePublishedWorkshopFilesResult();
+					log("Workshop files: " + fileRes.resultsReturned + "/" + fileRes.totalResults);
+					for(i = 0; i < fileRes.resultsReturned; i++) {
+						log(i + ": " + fileRes.publishedFileId[i] + " - " + fileRes.score[i]);
 					}
 					break;
 				case SteamConstants.RESPONSE_OnGetPublishedFileDetails:
@@ -232,8 +267,8 @@
 							log("Result length: " + ba.position + "//" + ba.length);
 							log("Result: " + ba.readUTFBytes(ugcResult.size));
 						}
-						break;
-					}
+					}
+					break;
 				default:
 					log("STEAMresponse type:"+e.req_type+" response:"+e.response);
 			}


Actually handle all the groups in iq:roster packets rather than just the first one. Also use for each to make one particularly nasty nested loop readable and faster

--- src/org/jivesoftware/xiff/im/Roster.as
+++ src/org/jivesoftware/xiff/im/Roster.as
@@ -383,26 +383,19 @@
 			removeAll();
 			try
 			{
-				var exts:Array = resultIQ.getAllExtensionsByNS( RosterExtension.NS );
-				var len:int = exts.length;
-				for (var x:int; x < len; x++){
-					var ext:RosterExtension = exts[x];
-					var newItems:Array = ext.getAllItems();
-					var eLen:int = newItems.length;
-					for( var i:int=0; i < eLen; i++ ) {
-						var item:* = newItems[ i ];
+				for each(var ext:RosterExtension in resultIQ.getAllExtensionsByNS( RosterExtension.NS )) {
+					for each(var item:* in ext.getAllItems()) {
 						//var classInfo:XML = flash.utils.describeType(item);
-						if (item is XMLStanza){
-							var groups:Array = item.getGroups();
-							var gLen:int = groups.length;
-							if( gLen > 0 ){
-								for (var j:int=0; j < gLen;j++) {
-									addRosterItem( item.jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", item.getGroups()[j], item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
-								}
-							}else{
-								addRosterItem( item.jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", "General", item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
-							}
-						}
+						if (!item is XMLStanza)
+							continue;
+
+						var groups:Array = item.getGroups();
+						if(groups.length == 0)
+							groups = ["General"];
+
+						for each(var group:String in groups) {
+							addRosterItem( item.jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", group, item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
+						}
 					}
 				}

@@ -452,46 +445,49 @@
 					{
 						var tempIQ:IQ = eventObj.iq as IQ;
 						var ext:RosterExtension = tempIQ.getAllExtensionsByNS( RosterExtension.NS )[0] as RosterExtension;
-						var item:* = ext.getAllItems()[0];
-						var i:int = getContactIndex(item.jid);
-						var rosterItemVO:RosterItemVO = getContactInformation(item.jid.toLowerCase());
-						var ev: RosterEvent;
-
-						if (rosterItemVO != null)
+						for each(var item:* in ext.getAllItems())
 						{
-							switch (item.subscription.toLowerCase())
+							var i:int = getContactIndex(item.jid);
+							var rosterItemVO:RosterItemVO = getContactInformation(item.jid.toLowerCase());
+							var ev: RosterEvent;
+
+							if (rosterItemVO)
 							{
-								case RosterExtension.SUBSCRIBE_TYPE_NONE:
-									ev = new RosterEvent(RosterEvent.SUBSCRIPTION_REVOCATION);
-									ev.jid = item.jid;
-									dispatchEvent( ev );
-									break;
-								case RosterExtension.SUBSCRIBE_TYPE_REMOVE:
-									ev = new RosterEvent(RosterEvent.USER_REMOVED);
-									//TODO: is this the right thing to do here?
-									if(i < 0)
-										return; //couldn't find the contact
-									ev.data = removeItemAt(i);
-									ev.jid = item.jid;
-									dispatchEvent(ev);
-									break;
-
-								default:
-									updateRosterItemSubscription(i, item.subscription.toLowerCase(), item.name, item.getGroups()[0] );
-									break;
-							}
-
-
-
-
-						} else {
-							if( item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_REMOVE &&  item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_NONE) {
+								switch (item.subscription.toLowerCase())
+								{
+									case RosterExtension.SUBSCRIBE_TYPE_NONE:
+										ev = new RosterEvent(RosterEvent.SUBSCRIPTION_REVOCATION);
+										ev.jid = item.jid;
+										dispatchEvent( ev );
+										break;
+
+									case RosterExtension.SUBSCRIBE_TYPE_REMOVE:
+										//TODO: is this the right thing to do here?
+										if(i < 0)
+											return; //couldn't find the contact
+										ev = new RosterEvent(RosterEvent.USER_REMOVED);
+										ev.data = removeItemAt(i);
+										ev.jid = item.jid;
+										dispatchEvent(ev);
+										break;
+
+									default:
+										for each(var group:String in item.getGroups())
+										{
+											updateRosterItemSubscription(i, item.subscription.toLowerCase(), item.name, group );
+										}
+										break;
+								}
+							}
+							else if( item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_REMOVE &&  item.subscription.toLowerCase() != RosterExtension.SUBSCRIBE_TYPE_NONE)
+							{
 								// Add this item to the roster if it's not there and if the subscription type is not equal to 'remove' or 'none'
-								addRosterItem( item.jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", item.getGroups()[0], item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
+								for each(var group:String in item.getGroups())
+								{
+									addRosterItem( item.jid, item.name, RosterExtension.SHOW_UNAVAILABLE, "Offline", group, item.subscription.toLowerCase(), item.askType != null ? item.askType.toLowerCase() : RosterExtension.ASK_TYPE_NONE );
+								}
 							}
 						}
-						return;
-
 					}
 					catch (e:Error)
 					{
@@ -504,7 +500,8 @@
 		private function handlePresence( aPresence:Presence ):void
 		{
 			// Handle based on the type of the presence received
-			aPresence.type = (aPresence.type == null)?(Presence.AVAILABLE_TYPE):(aPresence.type);
+			if(!aPresence.type)
+				aPresence.type = Presence.AVAILABLE_TYPE;
 			switch( aPresence.type.toLowerCase() )
 			{
 				case Presence.SUBSCRIBE_TYPE:


Transferred from the Adobe Open Source Subversion Repository

Revision: 18200
Author:   deeptika@adobe.com
Date:     2010-10-19T08:38:49.688818Z

Log Message:
-----------
Datavisualization.swc refactoring - 1

Rewritten Legend component to extend UIComponent instead of Container
Added style "labelClass" to AxisRenderer, ColumnChart, ColumnSeries, BarChart and BarSeries.
Its default value is spark.components.Label (mx.controls.Label if former is not found in the application domain)

QE notes: Legend, Column and Bar chart labeling, Axis labels needs good amount of testing. Mustella tests would fail for labels (a shift in position of labels might be there).

Doc notes: A new style "labelClass" is added for classes AxisRenderer, ColumnChart, ColumnSeries, BarChart and BarSeries

Bugs:
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/LegendAutomationImpl.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/series/items/BarSeriesItem.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/AxisRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/Legend.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/ColumnSeries.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/charts/series/items/ColumnSeriesItem.as</path>

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

--- frameworks/projects/charts/src/mx/charts/AxisRenderer.as
+++ frameworks/projects/charts/src/mx/charts/AxisRenderer.as
@@ -19,6 +19,7 @@
 import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
+import flash.system.ApplicationDomain;
 import flash.text.TextFormat;
 import flash.utils.getQualifiedClassName;

@@ -32,7 +33,6 @@
 import mx.charts.chartClasses.IAxisRenderer;
 import mx.charts.chartClasses.InstanceCache;
 import mx.charts.styles.HaloDefaults;
-import mx.controls.Label;
 import mx.core.ContextualClassFactory;
 import mx.core.IDataRenderer;
 import mx.core.IFactory;
@@ -40,7 +40,6 @@
 import mx.core.IFlexModuleFactory;
 import mx.core.IUIComponent;
 import mx.core.IUITextField;
-import mx.core.IVisualElement;
 import mx.core.UIComponent;
 import mx.core.UITextField;
 import mx.core.UITextFormat;
@@ -131,6 +130,20 @@
  */
 [Style(name="labelAlign", type="String", enumeration="left,top,right,bottom,center", inherit="no")]

+/**
+ *  The class that is used by this component to render labels.
+ *
+ *
It can be set to either the mx.controls.Label class
+ *  or the spark.components.Label class.

+ *
+ *  @default spark.components.Label
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.0
+ *  @productversion Flex 4
+ */
+[Style(name="labelClass", type="Class", inherit="no")]
 /**
  *  Specifies the gap between the end of the tick marks
  *  and the top of the labels, in pixels.
@@ -423,10 +436,10 @@
     public function AxisRenderer()
     {
         super();
-
-        textFieldFactory =  new ContextualClassFactory(Label, moduleFactory);
-
-        _labelCache = new InstanceCache(Label, this);
+        var labelClass:Class = getLabelClass();
+        textFieldFactory =  new ContextualClassFactory(labelClass, moduleFactory);
+
+        _labelCache = new InstanceCache(labelClass, this);

        	_labelCache.discard = true;
         _labelCache.remove = true;
@@ -1242,12 +1255,9 @@

 		if (!labelRenderer)
 		{
-			/*var textFieldClass:Class = getStyle('textFieldClass');
+			var labelClass:Class = getLabelClass();

-			if(textFieldClass != null)
-				textFieldFactory = new ContextualClassFactory(textFieldClass, moduleFactory);
-			else
-				*/textFieldFactory = new ContextualClassFactory(Label, moduleFactory);
+			textFieldFactory = new ContextualClassFactory(labelClass, moduleFactory);

 			_labelCache.factory = textFieldFactory;
 		}
@@ -1683,6 +1693,24 @@
                 _titleField.styleName = this;
         }
     }
+
+	private function getLabelClass():Class
+	{
+		var labelClass:Class = getStyle("labelClass");
+		if(labelClass == null)
+		{
+			try{
+				labelClass = Class(ApplicationDomain.currentDomain.
+					getDefinition("spark.components::Label"));
+			}
+			catch(e:Error)
+			{
+				labelClass = Class(ApplicationDomain.currentDomain.
+					getDefinition("mx.controls::Label"));
+			}
+		}
+		return labelClass;
+	}

     /**
      *  @private
@@ -2896,7 +2924,7 @@
             if (!_labelRenderer)
             {
                 _labelCache.properties =
-                    { selectable: false, styleName: this, truncateToFit: false};
+                    { styleName: this};
             }
             else
             {
@@ -3233,7 +3261,7 @@
                 {
                     labelData = _labels[i];
                     labelData.instance = _labelCache.instances[visCount++];
-					var label:Label = labelData.instance as Label;
+					var label:Object = labelData.instance;// as Label;
                     label.text = labelData.text;

                     labelData.instance.width = labelData.width;
@@ -3883,7 +3911,8 @@
 ////////////////////////////////////////////////////////////////////////////////

 import flash.display.DisplayObject;
-import mx.charts.AxisLabel
+
+import mx.charts.AxisLabel;
 import mx.styles.ISimpleStyleClient;

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 6003
Author:   egeorgie@adobe.com
Date:     2009-04-07T22:44:37.670097Z

Log Message:
-----------
Fix bug http://bugs.adobe.com/jira/browse/SDK-19154 layoutBounds for group that has a path with a larger stroke weight is incorrect

Fix: Modify BasicLayout to use the new ILayoutElement APIs getLayoutBoundsXAtSize, getLayoutBoundsYAtSize.

QE Notes: None
Doc Notes: None
Bugs: SDK-19154
Reviewer: Ely
tests: checkintests, mustella (group, layout)

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Path.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Ellipse.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/Rect.as</path>

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

--- frameworks/projects/framework/src/mx/core/UIComponent.as
+++ frameworks/projects/framework/src/mx/core/UIComponent.as
@@ -11886,6 +11886,34 @@
     {
         return LayoutElementUIComponentUtils.getMaxBoundsHeight(this,postTransform? nonDeltaLayoutMatrix():null);
     }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getBoundsXAtSize(width:Number, height:Number, postTransform:Boolean = true):Number
+    {
+        return LayoutElementUIComponentUtils.getBoundsXAtSize(this, width, height,
+                                                              postTransform ? nonDeltaLayoutMatrix() : null);
+    }
+
+    /**
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function getBoundsYAtSize(width:Number, height:Number, postTransform:Boolean = true):Number
+    {
+        return LayoutElementUIComponentUtils.getBoundsYAtSize(this, width, height,
+                                                              postTransform ? nonDeltaLayoutMatrix() : null);
+    }

     /**
      *  @inheritDoc


Updated comment.

Updated comment.

--- Bin/Data/Scripts/Editor/EditorScene.as
+++ Bin/Data/Scripts/Editor/EditorScene.as
@@ -343,8 +343,8 @@
 bool ToggleSceneUpdate()
 {
     runUpdate = !runUpdate;
-    // Run audio playback only when scene is updating, to allow editing SoundSources without the play position changing
-    // or onestop sounds losing their assigned sound resource after playing once
+    // Run audio playback only when scene is updating, so that audio components' time-dependent attributes stay constant when
+    // paused (similar to physics)
     if (runUpdate)
         audio.Play();
     else


Transferred from the Adobe Open Source Subversion Repository

Revision: 2906
Author:   gcomnino@adobe.com
Date:     2008-08-19T20:57:18.407001Z

Log Message:
-----------
Added flash component templates for flex builder. Checkin tests pass. Reviewed by Pete. QA: No. Docs: No. Bugs: SDK-16449

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/utilities/libs/FlexContentHolder.swc</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashComponentPlaceholder.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/build.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/UtilitiesClasses.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/utilities/libs</path>

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

--- frameworks/projects/authoringsupport/src/AuthoringSupportClasses.as
+++ frameworks/projects/authoringsupport/src/AuthoringSupportClasses.as
@@ -24,6 +24,8 @@
  */
 internal class UtilitiesClasses
 {
+	import FlashComponentPlaceholder; FlashComponentPlaceholder;
+	import FlashContainerPlaceholder; FlashContainerPlaceholder;
 	import com.adobe.viewsource.ViewSource; ViewSource;
 	// Maintain alphabetical order
 }


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

--- frameworks/projects/charts/src/mx/charts/chartClasses/LegendData.as
+++ frameworks/projects/charts/src/mx/charts/chartClasses/LegendData.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Stuck upload new in between uploaded and default items in media picker

--- flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
+++ flexEditor/src/org/arisgames/editor/components/ItemEditorMediaPickerView.as
@@ -145,25 +145,23 @@
 		}
 		else {
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_IMAGE + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_AUDIO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
 			xmlData.appendChild('<node label="' + AppConstants.MEDIATYPE_VIDEO + '"/>');
-			xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
-		}
+		}
+
 		this.printXMLData();

 		var media:Array = obj.result.data as Array;
         trace("Number of Media Objects returned from server = '" + media.length + "'");

-		for (var k:Number = 0; k <= 1; k++)
+		//Puts media items in xml readable format
+		for (var k:Number = 0; k <= 1; k++) //Iterates over list twice; once for uploaded items, again for default
 		{
 			for (var j:Number = 0; j < media.length; j++)
 			{
 				var o:Object = media[j];

 				if((k==0 && !o.is_default) || (k==1 && o.is_default)){
-					trace(k);
 					var m:Media = new Media();

 					m.mediaId = o.media_id;
@@ -195,6 +193,13 @@
 					}
 				}
 			}
+			//Add "Upload new" in between uploaded and default pictures
+			if(k==0){
+				xmlData.node.(@label == AppConstants.MEDIATYPE_IMAGE).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_AUDIO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+				xmlData.node.(@label == AppConstants.MEDIATYPE_VIDEO).appendChild('<node label="' + AppConstants.MEDIATYPE_UPLOADNEW + '"/>');
+			}
+
 		}
         trace("ItemEditorMediaPickerView: handleLoadingOfMediaIntoXML: Just finished loading Media Objects into XML.  Here's what the new XML looks like:");
         this.printXMLData();


add margin styles

add margin styles

--- frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
+++ frameworks/as/projects/FlexJSJX/src/org/apache/flex/core/SimpleCSSStyles.as
@@ -81,6 +81,11 @@
         public var paddingRight:*;
         public var paddingTop:*;
         public var paddingBottom:*;
+        public var margin:*;
+        public var marginLeft:*;
+        public var marginRight:*;
+        public var marginTop:*;
+        public var marginBottom:*;
         public var horizontalCenter:*;
         public var verticalCenter:*;
         public var horizontalAlign:*;


Passing antiAliasing parameter to RenderTarget constructor

--- src/aerys/minko/render/Viewport.as
+++ src/aerys/minko/render/Viewport.as
@@ -394,7 +394,7 @@
 			var backBufferHeight	: Number = _height * getGlobalScaleY();

 			_stage3d.context3D.configureBackBuffer(backBufferWidth, backBufferHeight, _antiAliasing, true);
-			_backBuffer = new RenderTarget(backBufferWidth, backBufferHeight, null, 0, _backgroundColor);
+			_backBuffer = new RenderTarget(backBufferWidth, backBufferHeight, null, 0, _backgroundColor, true, _antiAliasing);

 			graphics.clear();
 			graphics.beginFill(0, 0);


remove OrientationAxisController

remove OrientationAxisController

--- src/aerys/minko/scene/controller/debug/OrientationAxisController.as
+++ src/aerys/minko/scene/controller/debug/OrientationAxisController.as
@@ -1,153 +0,0 @@
-package aerys.minko.scene.controller.debug
-{
-	import aerys.minko.render.effect.basic.BasicProperties;
-	import aerys.minko.scene.controller.ScriptController;
-	import aerys.minko.scene.controller.camera.ArcBallController;
-	import aerys.minko.scene.node.Camera;
-	import aerys.minko.scene.node.Group;
-	import aerys.minko.scene.node.ISceneNode;
-	import aerys.minko.scene.node.Scene;
-	import aerys.minko.scene.node.debug.OrientationAxis;
-	import aerys.minko.scene.node.mesh.Mesh;
-	import aerys.minko.type.math.Plane;
-	import aerys.minko.type.math.Ray;
-	import aerys.minko.type.math.Vector4;
-
-	import flash.ui.MouseCursor;
-
-	public final class OrientationAxisController extends ScriptController
-	{
-		private static const SELECTED_COLOR	: uint				= 0xffff00ee;
-		private static const AXIS			: Vector.<Vector4>	= new <Vector4>[
-			Vector4.X_AXIS,
-			Vector4.Y_AXIS,
-			Vector4.Z_AXIS
-		];
-		private static const PLANES			: Vector.<Plane>	= new <Plane>[
-			new Plane(0, 1, 0, 0),
-			new Plane(0, 0, 1, 0),
-			new Plane(1, 0, 0, 0)
-		];
-
-		private var _lastHit			: Mesh		= null;
-		private var _oldDiffuseColor	: uint		= 0;
-
-		private var _dragOffset			: Vector4	= null;
-		private var _dragPlane			: Plane		= null;
-		private var _dragAxis			: Vector4	= null;
-
-		public function OrientationAxisController()
-		{
-//			super(OrientationAxis);
-		}
-
-		override protected function update(target : ISceneNode) : void
-		{
-			var scene 	: Scene 	= target.root as Scene;
-			var camera 	: Camera 	= scene.activeCamera;
-			var ray 	: Ray 		= camera.unproject(viewport.mouseX, viewport.mouseY);
-			var group 	: Group 	= target as Group;
-
-			updateScale(target, camera);
-			updateMouseOver(group, ray);
-//			updateDragAndDrop(group, camera, ray);
-		}
-
-		private function updateScale(target : ISceneNode, camera : Camera) : void
-		{
-			if (_dragAxis != null)
-				return ;
-
-			var distance : Number = Vector4.distance(
-				camera.localToWorld.getTranslation(),
-				target.localToWorld.getTranslation()
-			);
-
-			distance *= .05;
-
-			target.transform.setScale(distance, distance, distance);
-		}
-
-		private function updateMouseOver(target : Group, ray : Ray) : void
-		{
-			if (_dragAxis != null)
-				return ;
-
-			var hit : Mesh = (target as Group).cast(ray)[0];
-
-			if (_lastHit != null && _lastHit != hit)
-			{
-				_lastHit.properties.setProperty(
-					BasicProperties.DIFFUSE_COLOR,
-					_oldDiffuseColor
-				);
-				mouse.popCursor();
-			}
-
-			if (hit)
-			{
-				if (hit != _lastHit)
-				{
-					_oldDiffuseColor = hit.properties.getProperty(BasicProperties.DIFFUSE_COLOR);
-					mouse.pushCursor(MouseCursor.HAND);
-					hit.properties.setProperty(
-						BasicProperties.DIFFUSE_COLOR,
-						SELECTED_COLOR
-					);
-				}
-			}
-
-			_lastHit = hit;
-		}
-
-		private function updateDragAndDrop(target : Group, camera : Camera, ray : Ray) : void
-		{
-			if (mouse.leftButtonDown)
-			{
-				if (!_dragAxis && _lastHit)
-				{
-					var index : uint = target.getChildIndex(_lastHit);
-
-					_dragAxis = AXIS[index];
-					_dragPlane = PLANES[index];
-					_dragOffset = getDragPlaneIntersection(ray).subtract(target.transform.getTranslation());
-				}
-
-				if (_dragAxis != null)
-				{
-					var intersection 	: Vector4 	= getDragPlaneIntersection(ray);
-					var offsetX			: Number	= (intersection.x - _dragOffset.x) * _dragAxis.x;
-					var offsetY			: Number	= (intersection.y - _dragOffset.y) * _dragAxis.y;
-					var offsetZ			: Number	= (intersection.z - _dragOffset.z) * _dragAxis.z;
-
-					_dragOffset.x += offsetX;
-					_dragOffset.y += offsetY
-					_dragOffset.z += offsetZ;
-
-					target.transform.appendTranslation(offsetX, offsetY, offsetZ);
-				}
-			}
-			else
-			{
-				_dragAxis = null;
-			}
-
-			var ctrl : ArcBallController = camera.getControllersByType(ArcBallController)[0]
-				as ArcBallController;
-
-			if (ctrl)
-				ctrl.enabled = _dragAxis == null;
-		}
-
-		private function getDragPlaneIntersection(ray : Ray) : Vector4
-		{
-			var t : Number = -(Vector4.dotProduct(ray.origin, _dragPlane.normal) + _dragPlane.d) /
-				Vector4.dotProduct(ray.direction, _dragPlane.normal);
-
-			return Vector4.add(
-				ray.origin,
-				new Vector4(t * ray.direction.x, t * ray.direction.y, t * ray.direction.z)
-			);
-		}
-	}
-}


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

--- frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
+++ frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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: 17119
Author:   klin@adobe.com
Date:     2010-07-29T21:56:07.654999Z

Log Message:
-----------
Missed one change in GridDimensions for skinning and also fix one bug in GD.

-defaultRowHeight is now 26 for fixed height rows.
-Fixed bug in getColumnBounds where the height would always be NaN. Also, if there are no rows or columns, we return a 0 sized rectangle.

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

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridDimensions.as
@@ -186,7 +186,7 @@
     //  defaultRowHeight
     //----------------------------------

-    private var _defaultRowHeight:Number = 22;
+    private var _defaultRowHeight:Number = 26;

     /**
      *  The default height of a row. The defaultRowHeight is always
@@ -629,12 +629,15 @@
     public function getRowBounds(row:int):Rectangle
     {
         // TBD: provide optional return value (Rectangle) parameter
-        if ((row < 0) || (row >= rowCount))
+        if ((row < 0) || (row >= _rowCount))
             return null;  // TBD: return empty Rectangle instead
+
+        if (_columnCount == 0 || _rowCount == 0)
+            return new Rectangle(0, 0, 0, 0);

         const x:Number = getCellX(row, 0);
         const y:Number = getCellY(row, 0);
-        const rowWidth:Number = getCellX(row, columnCount - 1) + getColumnWidth(columnCount - 1) - x;
+        const rowWidth:Number = getCellX(row, _columnCount - 1) + getColumnWidth(_columnCount - 1) - x;
         const rowHeight:Number = getRowHeight(row);
         return new Rectangle(x, y, rowWidth, rowHeight);
     }
@@ -645,13 +648,16 @@
     public function getColumnBounds(col:int):Rectangle
     {
         // TBD: provide optional return value (Rectangle) parameter
-        if ((col < 0) || (col >= columnCount))
+        if ((col < 0) || (col >= _columnCount))
             return null;  // TBD: return empty Rectangle instead
+
+        if (_columnCount == 0 || _rowCount == 0)
+            return new Rectangle(0, 0, 0, 0);

         const x:Number = getCellX(0, col);
         const y:Number = getCellY(0, col);
         const colWidth:Number = getColumnWidth(col);
-        const colHeight:Number = getCellY(rowCount - 1, col) + getCellHeight(rowCount - 1, col) - y;
+        const colHeight:Number = getCellY(_rowCount - 1, col) + getRowHeight(_rowCount - 1) - y;
         return new Rectangle(x, y, colWidth, colHeight);
     }

@@ -1002,7 +1008,7 @@
     {
         typicalCellWidths.length = 0;
         typicalCellHeights.length = 0;
-        defaultRowHeight = 22;
+        defaultRowHeight = 26;
         isFirstTypicalCellHeight = true;
     }


Minor fix for consistent behaviour immediately after viewport setup.

--- Bin/Data/Scripts/Editor/EditorToolBar.as
+++ Bin/Data/Scripts/Editor/EditorToolBar.as
@@ -365,7 +365,8 @@
 void ToolBarSetViewportMode(StringHash eventType, VariantMap& eventData)
 {
     DropDownList@ dropDown = eventData["Element"].GetUIElement();
-    UIElement@ selected = dropDown.GetItems()[dropDown.selection];
+    UIElement@ selected = dropDown.selectedItem;
+    dropDown.focus = false;     // Lose the focus so the RMB dragging, immediately followed after changing viewport setup, behaves as expected
     uint mode = selected.vars[VIEW_MODE].GetUInt();
     SetViewportMode(mode);
 }


renamed Weave.$ to Weave.id

renamed Weave.$ to Weave.id

--- WeaveJS/src/Weave.as
+++ WeaveJS/src/Weave.as
@@ -737,10 +737,13 @@
 			return stringify(state, null, '\t');
 		}

-		public static function $(arg:* = undefined):*
+		/**
+		 * Shortcut for DebugUtils.debugId() and DebugUtils.debugLookup()
+		 */
+		public static function id(arg:* = undefined):*
 		{
 			var type:String = typeof(arg);
-			if (arg === undefined || (type != 'object' && type != 'function'))
+			if (arguments.length == 0 || (type != 'object' && type != 'function'))
 				return DebugUtils.debugLookup(arg);
 			return DebugUtils.debugId(arg);
 		}


Prevented unnecessary premature call to SpatialIndex.triggerCallbacks().

--- WeaveUI/src/weave/utils/SpatialIndex.as
+++ WeaveUI/src/weave/utils/SpatialIndex.as
@@ -126,7 +126,13 @@
 			}

 			_tempBounds.copyFrom(collectiveBounds);
-
+
+			var shouldTrigger:Boolean = false;
+			if (_keysArray.length > 0)
+			{
+				shouldTrigger = true;
+				_keysArray.length = 0; // hack to prevent callbacks
+			}
 			clear();

 			if (_plotter != null)
@@ -148,21 +154,22 @@
 						var geoms:Array = ((_plotter as DynamicPlotter).internalObject as IPlotterWithGeometries).getGeometriesFromRecordKey(key);
 						_keyToGeometriesMap[key] = geoms;
 					}
-				}
+				}
 			}

-			// if auto-balance is disabled, randomize insertion order
-			if (!_kdTree.autoBalance)
-			{
-				// randomize the order of the shapes to avoid a possibly poorly-performing
-				// KDTree structure due to the given ordering of the records
-				VectorUtils.randomSort(_keysArray);
+			if (_keysArray.length > 0)
+			{
+				// if auto-balance is disabled, randomize insertion order
+				if (!_kdTree.autoBalance)
+				{
+					// randomize the order of the shapes to avoid a possibly poorly-performing
+					// KDTree structure due to the given ordering of the records
+					VectorUtils.randomSort(_keysArray);
+				}
+				// insert bounds-to-key mappings in the kdtree
+				StageUtils.startTask(this, _insertNext);
 			}
-
-			// insert bounds-to-key mappings in the kdtree
-			StageUtils.startTask(this, _insertNext);
-
-			if (!_tempBounds.equals(collectiveBounds))
+			else if (!_tempBounds.equals(collectiveBounds) || shouldTrigger)
 				triggerCallbacks();

 			resumeCallbacks();


Updated 'handleUncaughtError' handler

Updated 'handleUncaughtError' handler

Now also custom and async errors are reported to Bugsnag

--- actionscript/src/com/bugsnag/Bugsnag.as
+++ actionscript/src/com/bugsnag/Bugsnag.as
@@ -2,6 +2,7 @@
 {
 	import flash.desktop.NativeApplication;
 	import flash.display.LoaderInfo;
+	import flash.events.ErrorEvent;
 	import flash.events.EventDispatcher;
 	import flash.events.UncaughtErrorEvent;
 	import flash.external.ExtensionContext;
@@ -78,10 +79,24 @@
 			event.stopImmediatePropagation();
 			event.stopPropagation();

-			if(event.error != null && event.error is Error)
-			{
-				trace(TAG, event.error);
-				notifyError(event.error);
+			if(event.error != null)
+			{
+				if(event.error is Error)
+				{
+					trace(TAG, event.error);
+					notifyError(event.error);
+				}
+				else if(event.error is ErrorEvent)
+				{
+					var errorEvent:ErrorEvent = event.error as ErrorEvent;
+					trace(TAG, "Async error occurred:", errorEvent.text);
+					notify("Error #" + errorEvent.errorID, "(Asynchronous) " + errorEvent.text);
+				}
+				else
+				{
+					trace(TAG, "Custom error:", event.error.toString());
+					notify("Custom Error", event.error.toString());
+				}
 			}
 		}


Fixed bug in parentheses compile order. Improved handling of string
literals and added iif().  Fixed bug in branching code.

Change-Id: I9bbc4dffec50aaab8a73906c2003857b7f960b1a

--- WeaveData/src/weave/compiler/Compiler.as
+++ WeaveData/src/weave/compiler/Compiler.as
@@ -89,23 +89,26 @@
 			\x00 .. \xFF        a byte specified in hexadecimal
 			\u0000 .. \uFFFF    a 16-bit Unicode character specified in hexadecimal
 		*/
-		private static const ENCODE_LOOKUP:Object = {'\b':'b', '\f':'f', '\n':'n', '\r':'r', '\t':'t', '"':'"', '\\':'\\'};
+		private static const ENCODE_LOOKUP:Object = {'\b':'b', '\f':'f', '\n':'n', '\r':'r', '\t':'t', '\\':'\\'};
 		private static const DECODE_LOOKUP:Object = {'b':'\b', 'f':'\f', 'n':'\n', 'r':'\r', 't':'\t'};

 		/**
 		 * This function surrounds a String with quotes and escapes special characters using ActionScript string literal format.
-		 * @param A String that may contain special characters.
+		 * @param string A String that may contain special characters.
+		 * @param useDoubleQuotes If this is true, double-quote will be used.  If false, single-quote will be used.
 		 * @return The given String formatted for ActionScript.
 		 */
-		public static function encodeString(string:String):String
+		public static function encodeString(string:String, doubleQuote:Boolean = true):String
 		{
+			var quote:String = doubleQuote ? '"' : "'";
 			var result:Array = new Array(string.length);
 			for (var i:int = 0; i < string.length; i++)
 			{
-				var esc:String = ENCODE_LOOKUP[string.charAt(i)];
-				result[i] = esc ? '\\' + esc : string.charAt(i);
+				var chr:String = string.charAt(i);
+				var esc:String = chr == quote ? quote : ENCODE_LOOKUP[chr];
+				result[i] = esc ? '\\' + esc : chr;
 			}
-			return '"' + result.join("") + '"';
+			return quote + result.join("") + quote;
 		}

 		/**
@@ -116,7 +119,9 @@
 		private static function decodeString(encodedString:String):String
 		{
 			// remove quotes
+			var quote:String = encodedString.charAt(0);
 			var input:String = encodedString.substr(1, encodedString.length - 2);
+			input = input.split(quote + quote).join(quote); // handle doubled quote escape sequences
 			var output:String = "";
 			var begin:int = 0;
 			while (true)
@@ -249,8 +254,9 @@
 			unaryOperators = new Object();
 			impureFunctions = new Object();

-			// add cast functions
-			functions['isNaN'] = isNaN;
+			// add built-in functions
+			functions['iif'] = function(c:*, t:*, f:*):* { return c ? t : f; };
+			functions['isNaN'] = isNaN;
 			functions['isFinite'] = isFinite;
 			functions['typeof'] = function(value:*):* { return typeof(value); };
 			functions['Number'] = MathLib.toNumber;
@@ -328,7 +334,7 @@
 			// branching
 			operators["?"] = true;
 			operators[":"] = true;
-			operators["?:"] = function(c:*, t:*, f:*):* { return c ? t : f; };
+			operators["?:"] = functions['iif'];
 			// assignment
 			//operators["="] = true;

@@ -414,13 +420,18 @@
 				for (endIndex = index + 1; endIndex < n; endIndex++)
 				{
 					c = expression.charAt(endIndex);
-					// stop when matching quote found
+					// stop when matching quote found, unless there are two together for an escape sequence
 					if (c == quote)
-						break;
+					{
+						if (endIndex < n - 1 && expression.charAt(endIndex + 1) == quote)
+							endIndex++; // skip second quote
+						else
+							break;
+					}

 					// TODO: handle octal and hex escape sequences

-					// handle escape sequence
+					// handle remaining escape sequences
 					if (c == '\\')
 						endIndex++;
 				}
@@ -480,10 +491,11 @@
 					continue;

 				// if the token starts with a quote, treat it as a String
-				if (str.charAt(0) == '"' || str.charAt(0) == "'")
+				var quote:String = str.charAt(0);
+				if (quote == '"' || quote == "'")
 				{
-					// parse quoted String, handling '""' escape sequence.
-					tokens[i] = new CompiledConstant(str, decodeString(str));
+					str = decodeString(str);
+					tokens[i] = new CompiledConstant(encodeString(str, quote == '"'), str);
 				}
 				else
 				{
@@ -496,22 +508,17 @@
 				}
 			}

-			// step 1: group tokens by parentheses and compile function calls
+			// step 1: group tokens by parentheses and compile function calls
 			while (true)
 			{
-				/////////////////////////////////////////////////////////////////////////////////
-				/////////////////////////////////////////////////////////////////////////////////
-				/////////////////////////////////////////////////////////////////////////////////
-				// TODO: find the first '(' such that the next ')' appears before the next '(' //
-				/////////////////////////////////////////////////////////////////////////////////
-				/////////////////////////////////////////////////////////////////////////////////
-				/////////////////////////////////////////////////////////////////////////////////
-
-				// find last index of '(', then find index of matching ')'
-				var open:int = tokens.lastIndexOf('(');
-				if (open < 0)
-					break; // no '(' found
-				var close:int = tokens.indexOf(')', open + 1);
+				// find first ')' and work backwards to a '('
+				var open:int;
+				var close:int = tokens.indexOf(')');
+				for (open = close - 1; open >= 0; open--)
+					if (tokens[open] == '(')
+						break;
+				if (open < 0)
+					break;
 				if (open < close)
 				{
 					// cut out tokens between '(' and ')'
@@ -845,13 +852,14 @@
 			}

 			// create the variables that will be used inside the wrapper function
-			const OPERATOR_BRANCH:String = OPERATOR_PREFIX + '?:';
-			const OPERATOR_AND:String = OPERATOR_PREFIX + '&&';
-			const OPERATOR_OR:String = OPERATOR_PREFIX + '||';
 			const METHOD_INDEX:int = -1;
 			const CONDITION_INDEX:int = 0;
 			const TRUE_INDEX:int = 1;
 			const FALSE_INDEX:int = 2;
+			const BRANCH_LOOKUP:Dictionary = new Dictionary();
+			BRANCH_LOOKUP[functions[OPERATOR_PREFIX + '?:']] = true;
+			BRANCH_LOOKUP[functions[OPERATOR_PREFIX + '&&']] = true;
+			BRANCH_LOOKUP[functions[OPERATOR_PREFIX + '||']] = false;

 			const stack:Array = []; // used as a queue of function calls
 			var call:CompiledFunctionCall;
@@ -883,15 +891,11 @@
 						{
 							//trace(StringLib.lpad('', stack.length, '\t') + "[" + call.evalIndex + "] " + compiledParams[call.evalIndex].name);

-							if (call.evalIndex > CONDITION_INDEX)
-							{
-								// handle branching and short-circuiting
-								if (call.evaluatedMethod == OPERATOR_BRANCH || call.evaluatedMethod == OPERATOR_AND)
-									if (call.evalIndex != (call.evaluatedParams[CONDITION_INDEX] ? TRUE_INDEX : FALSE_INDEX))
-										continue;
-								if (call.evaluatedMethod == OPERATOR_OR && call.evalIndex == (call.evaluatedParams[CONDITION_INDEX] ? TRUE_INDEX : FALSE_INDEX))
+							// handle branching and short-circuiting
+							result = BRANCH_LOOKUP[call.evaluatedMethod];
+							if (result !== undefined && call.evalIndex > CONDITION_INDEX)
+								if (result == (call.evalIndex != (call.evaluatedParams[CONDITION_INDEX] ? TRUE_INDEX : FALSE_INDEX)))
 									continue;
-							}

 							if (call.evalIndex == METHOD_INDEX)
 								subCall = call.compiledMethod as CompiledFunctionCall;
@@ -923,7 +927,7 @@
 							// variable lookup -- call.compiledMethod is a constant and call.evaluatedMethod is the method name
 							result = symbolTable is Function ? symbolTable(call.evaluatedMethod) : symbolTable[call.evaluatedMethod];
 							if (result === undefined)
-								result = defaultSymbolTable[call.evaluatedMethod];
+								result = functions[call.evaluatedMethod] || defaultSymbolTable[call.evaluatedMethod];
 						}
 					}
 					catch (e:Error)
@@ -995,7 +999,7 @@
 			};

 			var prevDebug:Boolean = debug;
-//			debug = true;
+			debug = true;

 			for each (var eq:String in eqs)
 			{


CSV export no longer uses NaN.

CSV export no longer uses NaN.

Change-Id: If9d0f82dedc4f6390dc0a5c94d2670ea05d1e381

--- WeaveData/src/weave/utils/ColumnUtils.as
+++ WeaveData/src/weave/utils/ColumnUtils.as
@@ -408,7 +408,11 @@
 				keyTypeMap[key.keyType] = true;

 				for (i = 0; i < definedAttrCols.length; i++)
-					record[columnTitles[i]] = (definedAttrCols[i] as IAttributeColumn).getValueFromKey(key, dataType);
+				{
+					var value:Object = (definedAttrCols[i] as IAttributeColumn).getValueFromKey(key, dataType);
+					if (!isNaN(value as Number))
+						record[columnTitles[i]] = value;
+				}
 				records.push(record);
 			}


Transferred from the Adobe Open Source Subversion Repository

Revision: 17444
Author:   clucier@adobe.com
Date:     2010-08-23T16:54:41.091790Z

Log Message:
-----------
We pass requestTimeout down to URLRequest.idleTimeout now if relevant (e.g. AIR 2.0).

QE notes: None
Doc notes: None
Bugs: SDK-22016
Reviewer: Paul, Peter
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/channels/DirectHTTPChannel.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/messaging/channels/HTTPChannel.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as
+++ frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as
@@ -287,6 +287,41 @@
         _concurrency = c;
     }

+    //----------------------------------
+    //  requestTimeout
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    private var _requestTimeout:int = -1;
+
+    /**
+     *  Provides access to the request timeout in seconds for sent messages.
+     *  If an acknowledgement, response or fault is not received from the
+     *  remote destination before the timeout is reached the message is faulted
+     *  on the client. A value less than or equal to zero prevents request timeout.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion BlazeDS 4
+     *  @productversion LCDS 3
+     */
+    public function get requestTimeout():int
+    {
+        return _requestTimeout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestTimeout(value:int):void
+    {
+        if (_requestTimeout != value)
+            _requestTimeout = value;
+    }
+
     /**
      *  @private
      */
@@ -643,7 +678,7 @@
     {
         _contentType = ct;
     }
-
+
     //----------------------------------
     //  showBusyCursor
     //----------------------------------
@@ -1142,7 +1177,9 @@
         if (_directChannelSet == null)
         {
             var dcs:ChannelSet = new ChannelSet();
-            dcs.addChannel(new DirectHTTPChannel("direct_http_channel"));
+            var dhc:DirectHTTPChannel = new DirectHTTPChannel("direct_http_channel");
+            dhc.requestTimeout = requestTimeout;
+            dcs.addChannel(dhc);
             _directChannelSet = dcs;
         }
         return _directChannelSet;


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6968
Author:   mhorn@adobe.com
Date:     2009-05-15T19:49:21.838660Z

Log Message:
-----------
minor asdoc updates

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ErrorSkin.as

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

--- frameworks/projects/spark/src/spark/skins/spark/ErrorSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/ErrorSkin.as
@@ -28,7 +28,7 @@
 import flash.utils.Dictionary;

 /**
- *  Error skins for Spark components.
+ *  Error skin for Spark components.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -67,6 +67,14 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
     public function ErrorSkin()
     {
         super();
@@ -98,7 +106,7 @@
     private var _errorObject:SkinnableComponent;

     /**
-     *  Object to draw error around.
+     *  Object to draw the error glow around.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -127,6 +135,9 @@
     //
     //--------------------------------------------------------------------------

+    /**
+     * @inheritDoc
+     */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
         // Early exit if we don't have an error object


Transferred from the Adobe Open Source Subversion Repository

Revision: 4743
Author:   aharui@adobe.com
Date:     2009-01-29T22:28:50.531343Z

Log Message:
-----------
Bunches of FxButtonBar bugs

Most notable change: Re-factored ButtonBar's topology to look less like a container of Buttons and more like a control with child buttons.  The child buttons no longer actually get focus although they appear to.

QE Notes: None
Doc Notes: None
Bugs: SDK-18305, SDK-18366, SDK-18369, SDK-18374, SDK-18376, SDK-18393, SDK-13592, SDK-18611, SDK-18648
Reviewer: Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxFocusSkin.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/core/ISelectableRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxButtonBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
@@ -77,6 +77,11 @@
      *  filter that shows the focus glow.
      */
     private var bitmap:Bitmap;
+
+    /**
+     *  Object to draw focus around.  If null, uses focusManager.getFocus();
+     */
+	public var focusObject:Object;

     //--------------------------------------------------------------------------
     //
@@ -91,7 +96,8 @@
             return;

         // Grab a bitmap of the focused object
-        var focusObject:Object = focusManager.getFocus();
+        if (!focusObject)
+			focusObject = focusManager.getFocus();
         var bitmapData:BitmapData = new BitmapData(
                     focusObject.width + (FOCUS_THICKNESS * 2),
                     focusObject.height + (FOCUS_THICKNESS * 2), true, 0);


Transferred from the Adobe Open Source Subversion Repository

Revision: 8556
Author:   clucier@adobe.com
Date:     2009-07-14T20:28:40.866257Z

Log Message:
-----------
Reverting revision 8551.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ErrorSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as</path>

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

--- frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
+++ frameworks/projects/spark/src/spark/skins/spark/FocusSkin.as
@@ -21,7 +21,6 @@
 import flash.geom.Matrix;
 import flash.geom.Point;
 import flash.geom.Rectangle;
-import flash.geom.Matrix3D;

 import mx.core.UIComponent;
 import mx.core.mx_internal;
@@ -151,14 +150,6 @@
         if (focusObject.focusObj)
             focusObject.focusObj.visible = false;

-        // Ensure no 3D transforms apply, as this skews our snapshot bitmap.
-        var transform3D:Matrix3D = null;
-        if (focusObject.transform.matrix3D)
-        {
-            transform3D = focusObject.transform.matrix3D;
-            focusObject.transform.matrix3D = null;
-        }
-
         // Temporary solution for focus drawing on CheckBox and RadioButton components.
         // Hide the label before drawing the focus.
         // FIXME (gruehle): Figure out a better solution.
@@ -223,10 +214,6 @@
         }

         bitmap.bitmapData = bitmapData;
-
-        // Restore original 3D matrix if applicable.
-        if (transform3D)
-            focusObject.transform.matrix3D = transform3D;
     }

     private static var classDefCache:Object = {};


- fixed a bug in CSSProperty::clone that caused the calculation results cache for relative styles to be uninitialized for cloned relative properties

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

--- src/reprise/css/CSSProperty.as
+++ src/reprise/css/CSSProperty.as
@@ -218,6 +218,10 @@
 			prop.m_unit = m_unit;
 			prop.m_inheritsValue = m_inheritsValue;
 			prop.m_isRelativeValue = m_isRelativeValue;
+			if (m_isRelativeValue)
+			{
+				prop.m_calculationResultsCache = {};
+			}
 			prop.m_cssFile = m_cssFile;

 			if (deep)


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

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

 package mx.graphics.codec
 {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

 package spark.components
 {


替换掉所有的 \.

替换掉所有的 \.

--- as3/com/netease/protobuf/SimpleWebRPC.as
+++ as3/com/netease/protobuf/SimpleWebRPC.as
@@ -39,7 +39,7 @@
 			loader.addEventListener(
 					SecurityErrorEvent.SECURITY_ERROR, errorEventHandler)
 			const request:URLRequest = new URLRequest(
-				urlPrefix + qualifiedMethodName.replace(/\./, "/"))
+				urlPrefix + qualifiedMethodName.replace(/\./g, "/"))
 			request.method = URLRequestMethod.POST
 			const requestContent:ByteArray = new ByteArray
 			input.writeExternal(requestContent)


Transferred from the Adobe Open Source Subversion Repository

Revision: 8605
Author:   jszeto@adobe.com
Date:     2009-07-15T22:30:29.555333Z

Log Message:
-----------
Transform bug fixes

http://bugs.adobe.com/jira/browse/SDK-22046 - Can't set matrix3D property on Transform

Player declares matrix3D setter with * return type. So mx.geom.Transform override must also use *. Note that once the Player is updated with void, this will need to be changed to void.

http://bugs.adobe.com/jira/browse/SDK-22146 - [CT 2373084] AlphaMultiplier and AlphaOffset in color transformation are ignored in MXML Graphics

Changed the behavior of alpha and ColorTransform for GraphicElement to match the behavior of DisplayObject.

- ColorTransform.alphaMultiplier and alpha are equivalent and are kept in sync.
- ColorTransform.alphaOffset is still applied even if alpha is set.

Implementation details:
- mx.geom.Transform sets the colorTransformExplicitlySet flag whenever the colorTransform setter is called
- GraphicElement alpha setter clears the colorTransformExplicitlySet flag whenever it is called
- Setting GraphicElement.transform will update the alpha property with ColorTransform.alphaMultiplier if a colorTransform was explicitly set
- Setting the colorTransform on a mx.geom.Transform that is assigned to a GraphicElement, calls setColorTransform, which updates the alpha property with ColorTransform.alphaMultiplier.
- In commitProperties, the displayObject.alpha is updated only if there is no transform or if colorTransformExplicitlySet is false.

QE Notes: Need tests for combo of alpha and colorTransform alpha props
Doc Notes: None
Bugs: SDK-22046, SDK-22146
Reviewer: Chet

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/framework/src/mx/geom/Transform.as</path>

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

--- frameworks/projects/framework/src/mx/geom/Transform.as
+++ frameworks/projects/framework/src/mx/geom/Transform.as
@@ -64,17 +64,21 @@
     //
     //--------------------------------------------------------------------------

+    mx_internal var applyColorTransformAlpha:Boolean = false;
+
     /**
      *  @private
      */
     override public function set colorTransform(value:ColorTransform):void
-    {
+    {
         if (target && "$transform" in target) // UIComponent/UIMovieClip
             target["$transform"]["colorTransform"] = value;
         else if (target && "setColorTransform" in target)
             target["setColorTransform"](value);
         else
             super.colorTransform = value;
+
+        applyColorTransformAlpha = true;
     }

     /**
@@ -121,7 +125,7 @@
      */
     override public function set matrix(value:Matrix):void
     {
-        if (target is ILayoutElement)
+        if (target is ILayoutElement && value != null)
             ILayoutElement(target).setLayoutMatrix(value, true);
         else
             super.matrix = value;
@@ -138,14 +142,15 @@
             return super.matrix;
     }

-    // FIXME (jszeto): Figure out why this throws an illegal override compiler error SDK-22046
-    /*override public function set matrix3D(value:Matrix3D):void
-    {
-        if (target is ILayoutElement)
+    // TODO (jszeto): SDK-22046 If the Player team changes the return type,
+    // we will need to update
+    override public function set matrix3D(value:Matrix3D):*
+    {
+        if (target is ILayoutElement && value != null)
             ILayoutElement(target).setLayoutMatrix3D(value, true);
         else
             super.matrix3D = value;
-    }*/
+    }

     /**
      *  @private