Transferred from the Adobe Open Source Subversion Repository

Revision: 19797
Author:   klin@adobe.com
Date:     2011-01-19T00:06:54.932970Z

Log Message:
-----------
Initial checkin of override default density mapping feature. Application and other classes delegate calculating runtimeDPI to a RuntimeDPIProvider class. Developers that wish to override how the runtimeDPI is calculated should subclass RuntimeDPIProvider and set it to the runtimeDPIProvider property on Application. Application actually calls DensityUtil.getRuntimeDPI() which creates the instance of the runtimeDPIProvider class and caches the runtimeDPI. I've also modified the compiler so that runtimeDPIProvider is recognized as a special attribute on Application. This checkin includes the PARB updates for changing DPI related properties and variables from ints to Numbers.

QE notes: Update tests
Doc notes: N/A
Bugs: SDK-28731
Reviewer: Evtim
Tests run: checkintests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler/mxml/builder/DocumentBuilder.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/ViewNavigatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/BusyIndicator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/MediaQueryParser.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/utils/MultiDPIBitmapSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/BitmapImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/tools/dependencychecker/frameworkSwcExceptionsList.txt</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/framework/src/mx/utils/DensityUtil.as
+++ frameworks/projects/framework/src/mx/utils/DensityUtil.as
@@ -12,6 +12,8 @@
 package mx.utils
 {
 import mx.core.DPIClassification;
+import mx.core.RuntimeDPIProvider;
+import mx.core.Singleton;

 [ExcludeClass]

@@ -28,50 +30,55 @@
 public class DensityUtil
 {
     /**
-     *  Matches the specified DPI to a DPIClassification value.
+     *  Cached runtimeDPI value, which is computed from the runtimeDPIProvider class.
+     */
+    private static var runtimeDPI:Number;
+
+    /**
+     *  Returns the current runtimeDPI value which is calculated by
+     *  an instance of the runtimeDPIProvider class.
+     *  If a runtimeDPIProvider class is not provided to the Application,
+     *  Flex uses the default class, RuntimeDPIProvider.
      *
-     *  Flex uses this method to calculate the current dpi value when an Application
-     *  authored for a specific dpi is adapted to the current one through scaling.
-     *
-     *  A number of devices can have slightly different DPI values and Flex maps these
-     *  into the several dpi buckets.
-     *
-     *  Flex uses the flash.system.Capabilities.screenDPI to calculate the
-     *  current device dpi.
-     *
-     *  @param dpi The DPI value.
-     *  @return The corresponding DPIClassification value.
-     *
      *  @see #getDPIScale
-     *  @see mx.core.DPIClassification
+     *  @see mx.core.RuntimeDPIProvider
      */
-    public static function classifyDPI(dpi:Number):int
+    public static function getRuntimeDPI():Number
     {
-        if (dpi < 200)
-            return DPIClassification.DPI_160;
+        if (!isNaN(runtimeDPI))
+            return runtimeDPI;

-        if (dpi <= 280)
-            return DPIClassification.DPI_240;
+        var runtimeDPIProviderClass:Class = Singleton.getClass("mx.core::RuntimeDPIProvider");

-        return DPIClassification.DPI_320;
+        // Default to RuntimeDPIProvider
+        if (!runtimeDPIProviderClass)
+            runtimeDPIProviderClass = RuntimeDPIProvider;
+
+        var instance:RuntimeDPIProvider = (new runtimeDPIProviderClass()) as RuntimeDPIProvider;
+        if (!instance)
+            return NaN;
+
+        runtimeDPI = instance.runtimeDPI;
+
+        return runtimeDPI;
     }

     /**
      *  Calculates a scale factor to be used when element authored for
      *  sourceDPI is rendered at targetDPI.
      *
-     *  @param sourceDPI The DPIClassification value for which a
-     *  resource is optimized.
+     *  @param sourceDPI The DPIClassification dpi value for which
+     *  a resource is optimized.
      *
      *  @param targetDPI The DPIClassification dpi value at
      *  which a resource is rendered.
      *
      *  @return The scale factor to be applied to the resource at render time.
      *
-     *  @see #classifyDPI
+     *  @see #getRuntimeDPI
      *  @see mx.core.DPIClassification
      */
-    public static function getDPIScale(sourceDPI:int, targetDPI:int):Number
+    public static function getDPIScale(sourceDPI:Number, targetDPI:Number):Number
     {
         // Unknown dpi returns NaN
         if ((sourceDPI != DPIClassification.DPI_160 && sourceDPI != DPIClassification.DPI_240 && sourceDPI != DPIClassification.DPI_320) ||
@@ -80,7 +87,7 @@
             return NaN;
         }

-        return Number(targetDPI) / Number(sourceDPI);
+        return targetDPI / sourceDPI;
     }
 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6413
Author:   dsubrama@adobe.com
Date:     2009-04-30T05:57:33.006779Z

Log Message:
-----------
And multiple selection is now hookedup to keyboard navigation. Also cleaned up some ASDoc comments.

QA: Yes
Checkintests/List Mustella tests: Pass

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

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

--- frameworks/projects/spark/src/spark/layouts/TileLayout.as
+++ frameworks/projects/spark/src/spark/layouts/TileLayout.as
@@ -1425,7 +1425,10 @@
              }
              case Keyboard.DOWN:
              {
-                 retVal = Math.min(currentIndex + columnCount, maxIndex)
+                 if (currentIndex == -1)
+                    retVal = 0;
+                 else
+                    retVal = Math.min(currentIndex + columnCount, maxIndex)
                  break;
              }
              case Keyboard.UP:


:memo:

:memo:

--- index.as
+++ index.as
@@ -3,16 +3,20 @@
 // [ ] Extern Function / Extern Call @mehcode
 // [ ] Structure
 // [ ] Pointers
-// [ ] Float
+// [ ] Real
+// [ ]  - Binary operations (FAdd)
 // [ ] (C-)String
 // [ ] Bitwise

 // [ ] Integer literals should have their own type with a name of `_`
 // [ ] Pass: Declare
 // [ ] Main!
+// [ ] Type determination on operators

 type c_int = int32;
 extern def puts(s: str) -> c_int;
+
+printf(c_str("..."), c_int(3))

 def method(a: int32) {
   return 30;


:memo:

:memo:


let the base class draw the background

let the base class draw the background

--- frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/StringItemRenderer.as
+++ frameworks/projects/HTML/as/src/org/apache/flex/html/supportClasses/StringItemRenderer.as
@@ -52,6 +52,7 @@
 			textField.type = TextFieldType.DYNAMIC;
 			textField.autoSize = TextFieldAutoSize.LEFT;
 			textField.selectable = false;
+            textField.parentDrawsBackground = true;
 		}

 		public var textField:CSSTextField;
@@ -118,15 +119,5 @@
 			else textField.text = String(value);
 		}

-		/**
-		 * @private
-		 */
-		override public function updateRenderer():void
-		{
-			super.updateRenderer();
-
-			textField.background = (down || selected || hovered);
-			textField.backgroundColor = backgroundColor;
-		}
 	}
 }


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

--- frameworks/projects/automation/src/mx/automation/delegates/core/RepeaterAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/core/RepeaterAutomationImpl.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2009 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//  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
+//
+//      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 mx.automation.delegates.core


Fixed pathover/multisource bug

Fixed pathover/multisource bug

--- src/Components/Wire.as
+++ src/Components/Wire.as
@@ -199,17 +199,25 @@
 				return false;

 			var source:Port = null;
-			for each (var carriers:Vector.<Carrier> in [U.state.grid.carriersAtPoint(path[0]), U.state.grid.carriersAtPoint(path[path.length - 1])])
-				if (carriers)
-					for each (var carrier:Carrier in carriers) {
-						var carrierSource:Port = carrier.getSource();
-						if (carrierSource) {
-							if (!source)
-								source = carrierSource;
-							else if (source != carrierSource)
-								return false;
-						}
+			for each (var p:Point in path) {
+				var carriers:Vector.<Carrier> = U.state.grid.carriersAtPoint(p);
+				if (!carriers)
+					continue;
+
+				var pointIsEndpoint:Boolean = isEndpoint(p);
+				for each (var carrier:Carrier in carriers) {
+					if (!pointIsEndpoint && !carrier.isEndpoint(p))
+						continue;
+
+					var carrierSource:Port = carrier.getSource();
+					if (carrierSource) {
+						if (!source)
+							source = carrierSource;
+						else if (source != carrierSource)
+							return false;
 					}
+				}
+			}
 			return true;
 		}


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

--- frameworks/projects/framework/src/mx/binding/FunctionReturnWatcher.as
+++ frameworks/projects/framework/src/mx/binding/FunctionReturnWatcher.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2003-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//  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
+//
+//      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: 12572
Author:   jszeto@adobe.com
Date:     2009-12-05T00:56:48.372901Z

Log Message:
-----------
LinearGradientStroke bug fix

http://bugs.adobe.com/jira/browse/SDK-24473 - Output from MXML Graphics for a shape with linear gradient stroke with dscrete transform specified as x=0, y=0 seems to be incorrectly translated

Changed LinearGradientStroke to use the same logic as LinearGradient. Now it handles rotation properly.

QE notes: Need to update LinearGradientStroke tests
Doc notes: None
Bugs: SDK-24473
Reviewer: Evtim
Tests run: Button, ButtonBar, spark/primitives, Group, Panel, Managers/StyleManager, mx/graphics/LinearGradientStroke
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as

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

--- frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as
+++ frameworks/projects/framework/src/mx/graphics/LinearGradientStroke.as
@@ -241,26 +241,93 @@
      *  Calculates this LinearGradientStroke's transformation matrix.
      */
     private function calculateTransformationMatrix(targetBounds:Rectangle, matrix:Matrix, targetOrigin:Point):void
-    {
+    {
+        matrix.identity();
+
         if (!compoundTransform)
         {
-            var w:Number = !isNaN(scaleX) ? scaleX : targetBounds.width;
-            var bX:Number = !isNaN(x) ? x + targetOrigin.x : targetBounds.left;
-            var bY:Number = !isNaN(y) ? y + targetOrigin.y : targetBounds.top;
-
-            matrix.createGradientBox(w, targetBounds.height,
-                                    !isNaN(_angle) ?
-                                        _angle : rotationInRadians,
-                                     bX, bY);
+            var tx:Number = x;
+            var ty:Number = y;
+            var length:Number = scaleX;
+
+            if (isNaN(length))
+            {
+                // Figure out the two sides
+                if (rotation % 90 != 0)
+                {
+                    // Normalize angles with absolute value > 360
+                    var normalizedAngle:Number = rotation % 360;
+                    // Normalize negative angles
+                    if (normalizedAngle < 0)
+                        normalizedAngle += 360;
+
+                    // Angles wrap at 180
+                    normalizedAngle %= 180;
+
+                    // Angles > 90 get mirrored
+                    if (normalizedAngle > 90)
+                        normalizedAngle = 180 - normalizedAngle;
+
+                    var side:Number = targetBounds.width;
+                    // Get the hypotenuse of the largest triangle that can fit in the bounds
+                    var hypotenuse:Number = Math.sqrt(targetBounds.width * targetBounds.width + targetBounds.height * targetBounds.height);
+                    // Get the angle of that largest triangle
+                    var hypotenuseAngle:Number =  Math.acos(targetBounds.width / hypotenuse) * 180 / Math.PI;
+
+                    // If the angle is larger than the hypotenuse angle, then use the height
+                    // as the adjacent side of the triangle
+                    if (normalizedAngle > hypotenuseAngle)
+                    {
+                        normalizedAngle = 90 - normalizedAngle;
+                        side = targetBounds.height;
+                    }
+
+                    // Solve for the hypotenuse given an adjacent side and an angle.
+                    length = side / Math.cos(normalizedAngle / 180 * Math.PI);
+                }
+                else
+                {
+                    // Use either width or height based on the rotation
+                    length = (rotation % 180) == 0 ? targetBounds.width : targetBounds.height;
+                }
+            }
+
+            // If only x or y is defined, force the other to be set to 0
+            if (!isNaN(tx) && isNaN(ty))
+                ty = 0;
+            else if (isNaN(tx) && !isNaN(ty))
+                tx = 0;
+
+            // If x and y are specified, then move the gradient so that the
+            // top left corner is at 0,0
+            if (!isNaN(tx) && !isNaN(ty))
+                matrix.translate(GRADIENT_DIMENSION / 2, GRADIENT_DIMENSION / 2); // 1638.4 / 2
+
+            // Force the length to a minimum of 2. Values of 0 or 1 have undesired behavior
+            length = Math.max(length, 2);
+
+            // Scale the gradient in the x direction. The natural size is 1638.4px. No need
+            // to scale the y direction because it is infinite
+            matrix.scale (length / GRADIENT_DIMENSION, 1 / GRADIENT_DIMENSION);
+
+            matrix.rotate (!isNaN(_angle) ? _angle : rotationInRadians);
+            if (isNaN(tx))
+                tx = targetBounds.left + targetBounds.width / 2;
+            else
+                tx += targetOrigin.x;
+            if (isNaN(ty))
+                ty = targetBounds.top + targetBounds.height / 2;
+            else
+                ty += targetOrigin.y;
+            matrix.translate(tx, ty);
         }
         else
-        {
-            matrix.identity();
+        {
             matrix.translate(GRADIENT_DIMENSION / 2, GRADIENT_DIMENSION / 2);
             matrix.scale(1 / GRADIENT_DIMENSION, 1 / GRADIENT_DIMENSION);
             matrix.concat(compoundTransform.matrix);
             matrix.translate(targetOrigin.x, targetOrigin.y);
-        }
+        }
     }

 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 2878
Author:   gosmith@adobe.com
Date:     2008-08-19T01:47:49.628691Z

Log Message:
-----------
Added an ObjectUtil.getUnqualifiedClassName() utility method for use in the className getter in four classes, which previously had copy-and-paste code.

Moved the STYLE_UNINITIALIZED constant from StyleManager to StyleProtoChain, since it indicates an uninitialized style proto chain.

Reviewer: Jono
Bugs: -
QA: No
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridItemRenderer.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/flex/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -3117,7 +3117,7 @@
                 {
                     // Does this object already have a proto chain?  If not,
                     // there's no need to regenerate a new one.
-                    if (UIComponent(child).inheritingStyles != StyleManager.STYLE_UNINITIALIZED)
+                    if (UIComponent(child).inheritingStyles != StyleProtoChain.STYLE_UNINITIALIZED)
                         UIComponent(child).regenerateStyleCache(recursive);
                 }
                 else if (child is IUITextField && IUITextField(child).inheritingStyles)


This needs to be a TypedArray and then written out with writeObject() not
writeField(). Fiddly.

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

--- src/as/com/threerings/presents/net/AuthRequest.as
+++ src/as/com/threerings/presents/net/AuthRequest.as
@@ -2,6 +2,7 @@

 import com.threerings.io.ObjectInputStream;
 import com.threerings.io.ObjectOutputStream;
+import com.threerings.io.TypedArray;

 import com.threerings.util.StringUtil;

@@ -11,7 +12,8 @@
     {
         _creds = creds;
         _version = version;
-        _bootGroups = bootGroups;
+        _bootGroups = new TypedArray("[Ljava.lang.String;");
+        _bootGroups.concat(bootGroups);

         // magic up a timezone in the format "GMT+XX:XX"
         // Of course, the sign returned from getTimezoneOffset() is wrong
@@ -31,12 +33,12 @@
         out.writeObject(_creds);
         out.writeField(_version);
         out.writeField(_zone);
-        out.writeField(_bootGroups);
+        out.writeObject(_bootGroups);
     }

     protected var _creds :Credentials;
     protected var _version :String;
     protected var _zone :String;
-    protected var _bootGroups :Array;
+    protected var _bootGroups :TypedArray;
 }
 }


Support Dictionary, too.

Support Dictionary, too.

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

--- src/as/com/threerings/util/ObjectMarshaller.as
+++ src/as/com/threerings/util/ObjectMarshaller.as
@@ -29,6 +29,7 @@
 import flash.system.ApplicationDomain;

 import flash.utils.ByteArray;
+import flash.utils.Dictionary;
 import flash.utils.Endian;
 import flash.utils.IExternalizable;
 import flash.utils.getQualifiedSuperclassName; // function import
@@ -146,6 +147,20 @@
             }
             // then, continue on with the sub-properties check (below)

+        } else if (value is Dictionary) {
+            if (ClassUtil.getClassName(value) != "flash.utils.Dictionary") {
+                return "Custom Dictionary subclasses are not supported";
+            }
+            // check all the keys
+            for (var key :* in value) {
+                var se :String = getValidationError(key);
+                if (se != null) {
+                    return se;
+                }
+            }
+            // then, continue on with sub-property check (below)
+
+
         } else {
             var type :String = typeof(value);
             if (type == "number" || type == "string" || type == "boolean" ) {


Simplified TextCore by making its textPrinter public (used by AsUnitRunner).

--- asunit-4.0/src/asunit/core/TextCore.as
+++ asunit-4.0/src/asunit/core/TextCore.as
@@ -3,52 +3,34 @@
 	import asunit.printers.TextPrinter;

 	import flash.display.DisplayObjectContainer;
-
-    /**
-     * TextCore is just a simple helper class that
-     * configures the base class AsUnitCore to use the
-     * standard TextPrinter.
-     *
-     * The main idea is that you may want a completely
-     * different text output without the default TextPrinter,
-     * and if that's the case, you can go ahead and
-     * instantiate AsUnitCore and configure it however you
-     * wish.
-     */
-    public class TextCore extends AsUnitCore {
-
-        private var textPrinter:TextPrinter;
-
-        override protected function initializeObservers():void {
-            super.initializeObservers();
-
-            textPrinter = new TextPrinter();
-            addListener(textPrinter);
-        }
-
-        /* Delegate some configuration to the TextPrinter */
-        public function set displayPerformanceDetails(show:Boolean):void {
-            textPrinter.displayPerformanceDetails = show;
-        }
-
-        public function get displayPerformanceDetails():Boolean {
-            return textPrinter.displayPerformanceDetails;
-        }
-
-        public function set traceOnComplete(should:Boolean):void {
-            textPrinter.traceOnComplete = should;
-        }
-
-        public function get traceOnComplete():Boolean {
-            return textPrinter.traceOnComplete;
-        }
-
-
-        override public function set visualContext(context:DisplayObjectContainer):void {
-            super.visualContext = context;
-            // Add the TextPrinter to the Display List:
-            visualContext.addChild(textPrinter);
-        }
-    }
-}
-
+
+    /**
+     * TextCore is just a simple helper class that
+     * configures the base class AsUnitCore to use the
+     * standard TextPrinter.
+     *
+     * The main idea is that you may want a completely
+     * different text output without the default TextPrinter,
+     * and if that's the case, you can go ahead and
+     * instantiate AsUnitCore and configure it however you
+     * wish.
+     */
+    public class TextCore extends AsUnitCore {
+
+        public var textPrinter:TextPrinter;
+
+        override protected function initializeObservers():void {
+            super.initializeObservers();
+
+            textPrinter = new TextPrinter();
+            addListener(textPrinter);
+        }
+
+        override public function set visualContext(context:DisplayObjectContainer):void {
+            super.visualContext = context;
+            // Add the TextPrinter to the Display List:
+            visualContext.addChild(textPrinter);
+        }
+    }
+}
+


- error handling for stream time

- error handling for stream time

--- src/flash/htmlelements/VideoElement.as
+++ src/flash/htmlelements/VideoElement.as
@@ -64,7 +64,11 @@
 		}

 		public function currentTime():Number {
-			return _stream.time;
+			if (_stream != null) {
+				return _stream.time;
+			} else {
+				return 0;
+			}
 		}

 		// (1) load()


Added PropertyChangeEvent.CHANGE calls to when the active, affiliation, and role property values change.

Alphabetized the events at the top.

git-svn-id: c197267f952b24206666de142881703007ca05d5@11807 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/igniterealtime/xiff/conference/Room.as
+++ src/org/igniterealtime/xiff/conference/Room.as
@@ -34,41 +34,24 @@
 	import org.igniterealtime.xiff.events.*;

 	/**
-	 * Dispatched when the room subject changes.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.SUBJECT_CHANGE
-	 */
-	[Event( name="subjectChange",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched whenever a new message intented for all room occupants is received. The
-	 * RoomEvent class will contain an attribute data with the
-	 * group message as an instance of the Message class.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.GROUP_MESSAGE
-	 */
-	[Event( name="groupMessage",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched whenever a new private message is received. The RoomEvent class
-	 * contains an attribute data with the private message as an instance of the
-	 * Message class.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.PRIVATE_MESSAGE
-	 */
-	[Event( name="privateMessage",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when you have entered the room and messages that are sent
-	 * will be displayed to other users. The room's role and affiliation will
-	 * be visible from this point forward.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_JOIN
-	 */
-	[Event( name="roomJoin",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when the server acknoledges that you have the left the room.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_LEAVE
-	 */
-	[Event( name="roomLeave",type="org.igniterealtime.xiff.events.RoomEvent" )]
+	 * Dispatched when the active, affiliation, or role property changes.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.PropertyChangeEvent.CHANGE
+	 */
+	[Event( name="change", type="org.igniterealtime.xiff.events.PropertyChangeEvent" )]
+	/**
+	 * Dispatched when an administration action failed.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ADMIN_ERROR
+	 * @see	org.igniterealtime.xiff.core.XMPPConnection.error
+	 */
+	[Event( name="adminError", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when an affiliation change has completed.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.AFFILIATION_CHANGE_COMPLETE
+	 */
+	[Event( name="affiliationChangeComplete", type="org.igniterealtime.xiff.events.RoomEvent" )]
 	/**
 	 * Dispatched when an affiliation list has been requested. The event object contains an
 	 * array of MUCItems containing the JID and affiliation properties.
@@ -78,93 +61,14 @@
 	 *
 	 * @eventType org.igniterealtime.xiff.events.RoomEvent.AFFILIATIONS
 	 */
-	[Event( name="affiliations",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when an administration action failed.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ADMIN_ERROR
-	 * @see	org.igniterealtime.xiff.core.XMPPConnection.error
-	 */
-	[Event( name="adminError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when the room requires a password and the user did not supply one (or
-	 * the password provided is incorrect).
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.PASSWORD_ERROR
-	 */
-	[Event( name="passwordError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when the room is members-only and the user is not on the member list.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.REGISTRATION_REQ_ERROR
-	 */
-	[Event( name="registrationReqError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when the room is removed.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_DESTROYED
-	 */
-	[Event( name="roomDestroyed",type="org.igniterealtime.xiff.events.RoomEvent" )]
+	[Event( name="affiliations", type="org.igniterealtime.xiff.events.RoomEvent" )]
 	/**
 	 * Dispatched if the user attempted to join the room but was not allowed to do so because
 	 * they are banned (i.e., has an affiliation of "outcast").
 	 *
 	 * @eventType org.igniterealtime.xiff.events.RoomEvent.BANNED_ERROR
 	 */
-	[Event( name="bannedError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched if the room has reached its maximum number of occupants.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.MAX_USERS_ERROR
-	 */
-	[Event( name="maxUsersError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched if a user attempts to enter a room while it is "locked" (i.e., before the room
-	 * creator provides an initial configuration and therefore before the room officially exists).
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.LOCKED_ERROR
-	 */
-	[Event( name="lockedError",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched whenever an occupant joins the room. The RoomEvent instance will
-	 * contain an attribute nickname with the nickname of the occupant who joined.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_JOIN
-	 */
-	[Event( name="userJoin",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched whenever an occpant leaves the room. The RoomEvent instance will
-	 * contain an attribute nickname with the nickname of the occupant who left.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_DEPARTURE
-	 */
-	[Event( name="userDeparture",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when a user is kicked from the room.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_KICKED
-	 */
-	[Event( name="userKicked",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when a user is banned from the room.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_BANNED
-	 */
-	[Event( name="userBanned",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when a user's presence changes.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_PRESENCE_CHANGE
-	 */
-	[Event( name="userPresenceChange",type="org.igniterealtime.xiff.events.RoomEvent" )]
-	/**
-	 * Dispatched when the user's preferred nickname already exists in the room.	The
-	 * RoomEvent will contain an attribute nickname with the nickname
-	 * already existing in the room.
-	 *
-	 * @eventType org.igniterealtime.xiff.events.RoomEvent.NICK_CONFLICT
-	 */
-	[Event( name="nickConflict",type="org.igniterealtime.xiff.events.RoomEvent" )]
+	[Event( name="bannedError", type="org.igniterealtime.xiff.events.RoomEvent" )]
 	/**
 	 * Dispatched when a room configuration form is required.	This can occur during the
 	 * creation of a room, or if a room configuration is requested.	The RoomEvent
@@ -184,7 +88,7 @@
 	 * @see	#configure
 	 * @eventType org.igniterealtime.xiff.events.RoomEvent.CONFIGURE_ROOM
 	 */
-	[Event( name="configureRoom",type="org.igniterealtime.xiff.events.RoomEvent" )]
+	[Event( name="configureRoom", type="org.igniterealtime.xiff.events.RoomEvent" )]
 	/**
 	 * Dispatched when a room configuration form is complete.
 	 *
@@ -202,7 +106,115 @@
 	 *
 	 * @eventType org.igniterealtime.xiff.events.RoomEvent.DECLINED
 	 */
-	[Event( name="declined",type="org.igniterealtime.xiff.events.RoomEvent" )]
+	[Event( name="declined", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched whenever a new message intented for all room occupants is received. The
+	 * RoomEvent class will contain an attribute data with the
+	 * group message as an instance of the Message class.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.GROUP_MESSAGE
+	 */
+	[Event( name="groupMessage", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched if a user attempts to enter a room while it is "locked" (i.e., before the room
+	 * creator provides an initial configuration and therefore before the room officially exists).
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.LOCKED_ERROR
+	 */
+	[Event( name="lockedError", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched if the room has reached its maximum number of occupants.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.MAX_USERS_ERROR
+	 */
+	[Event( name="maxUsersError", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the user's preferred nickname already exists in the room.	The
+	 * RoomEvent will contain an attribute nickname with the nickname
+	 * already existing in the room.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.NICK_CONFLICT
+	 */
+	[Event( name="nickConflict", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the room requires a password and the user did not supply one (or
+	 * the password provided is incorrect).
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.PASSWORD_ERROR
+	 */
+	[Event( name="passwordError", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched whenever a new private message is received. The RoomEvent class
+	 * contains an attribute data with the private message as an instance of the
+	 * Message class.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.PRIVATE_MESSAGE
+	 */
+	[Event( name="privateMessage", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the room is members-only and the user is not on the member list.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.REGISTRATION_REQ_ERROR
+	 */
+	[Event( name="registrationReqError", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the room is removed.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_DESTROYED
+	 */
+	[Event( name="roomDestroyed", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when you have entered the room and messages that are sent
+	 * will be displayed to other users. The room's role and affiliation will
+	 * be visible from this point forward.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_JOIN
+	 */
+	[Event( name="roomJoin", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the server acknoledges that you have the left the room.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.ROOM_LEAVE
+	 */
+	[Event( name="roomLeave", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when the room subject changes.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.SUBJECT_CHANGE
+	 */
+	[Event( name="subjectChange", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when a user is banned from the room.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_BANNED
+	 */
+	[Event( name="userBanned", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched whenever an occpant leaves the room. The RoomEvent instance will
+	 * contain an attribute nickname with the nickname of the occupant who left.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_DEPARTURE
+	 */
+	[Event( name="userDeparture", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched whenever an occupant joins the room. The RoomEvent instance will
+	 * contain an attribute nickname with the nickname of the occupant who joined.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_JOIN
+	 */
+	[Event( name="userJoin", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when a user is kicked from the room.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_KICKED
+	 */
+	[Event( name="userKicked", type="org.igniterealtime.xiff.events.RoomEvent" )]
+	/**
+	 * Dispatched when a user's presence changes.
+	 *
+	 * @eventType org.igniterealtime.xiff.events.RoomEvent.USER_PRESENCE_CHANGE
+	 */
+	[Event( name="userPresenceChange", type="org.igniterealtime.xiff.events.RoomEvent" )]

 	/**
 	 * Manages incoming and outgoing data from a conference room as part of multi-user conferencing (XEP-0045).
@@ -874,6 +886,21 @@
 		private function configure_response( iq:IQ ):void
 		{
 			var event:RoomEvent = new RoomEvent( RoomEvent.CONFIGURE_ROOM_COMPLETE );
+			dispatchEvent( event );
+		}
+
+		/**
+		 * Helper to dispatch a property change event.
+		 * @param	name
+		 * @param	newValue
+		 * @param	oldValue
+		 */
+		private function dispatchChangeEvent( name:String, newValue:*, oldValue:* ):void
+		{
+			var event:PropertyChangeEvent = new PropertyChangeEvent( PropertyChangeEvent.CHANGE );
+			event.name = name;
+			event.newValue = newValue;
+			event.oldValue = oldValue;
 			dispatchEvent( event );
 		}

@@ -1148,8 +1175,9 @@
 		 */
 		private function setActive( state:Boolean ):void
 		{
+			var oldActive:Boolean = _active;
 			_active = state;
-			dispatchEvent( new Event( "activeStateUpdated" ));
+			if( _active != oldActive ) dispatchChangeEvent( "active", _active, oldActive );
 		}

 		/**
@@ -1203,10 +1231,13 @@

 			if ( isThisUser( aPresence.from.unescaped ))
 			{
+				var oldAffiliation:String = _affiliation;
 				_affiliation = item.affiliation;
-				dispatchEvent( new Event( "affiliationSet" )); //update bindings
+				if( _affiliation != oldAffiliation ) dispatchChangeEvent( "affiliation", _affiliation, oldAffiliation );
+
+				var oldRole:String = _role;
 				_role = item.role;
-				dispatchEvent( new Event( "roleSet" )); //update bindings
+				if( _role != oldRole ) dispatchChangeEvent( "role", _role, oldRole );

 				if ( !isActive && aPresence.type != Presence.TYPE_UNAVAILABLE )
 				{


XIFF-71: Add support for retrieving one's own vCard

--- src/org/igniterealtime/xiff/vcard/VCard.as
+++ src/org/igniterealtime/xiff/vcard/VCard.as
@@ -24,16 +24,15 @@
  */
 package org.igniterealtime.xiff.vcard
 {
+	import com.hurlant.util.Base64;
+
 	import flash.display.*;
 	import flash.events.*;
 	import flash.utils.ByteArray;
 	import flash.utils.Timer;
 	import flash.xml.XMLDocument;
-	import flash.xml.XMLNode;
-
-	//import mx.utils.Base64Decoder;
-	import com.hurlant.util.Base64;
-
+
+	import org.igniterealtime.xiff.core.EscapedJID;
 	import org.igniterealtime.xiff.core.UnescapedJID;
 	import org.igniterealtime.xiff.core.XMPPConnection;
 	import org.igniterealtime.xiff.data.IQ;
@@ -52,7 +51,7 @@
 	 * @eventType org.igniterealtime.xiff.events.VCardEvent.AVATAR_SENT
 	 */
 	[Event(name="vcardAvatarSent", type="org.igniterealtime.xiff.events.VCardEvent")]
-
+
 	/**
 	 * @eventType org.igniterealtime.xiff.events.VCardEvent.LOADED
 	 */
@@ -62,14 +61,14 @@
 	 * @eventType org.igniterealtime.xiff.events.VCardEvent.ERROR
 	 */
 	[Event(name="vcardError", type="org.igniterealtime.xiff.events.VCardEvent")]
-
+
 	/**
 	 * @see http://tools.ietf.org/html/rfc2426
 	 */
 	public class VCard extends EventDispatcher
 	{
 		/**
-		 * VCard cache indexed by the UnescapedJID.toString() of the user.
+		 * VCard cache indexed by the UnescapedJID.bareJID of the contact or current user.
 		 */
 		private static var cache:Object = {};

@@ -278,7 +277,7 @@
 		 *
 		 */
 		private var _avatar:DisplayObject;
-
+
 		/**
 		 *
 		 * @hint for saving avatar
@@ -300,7 +299,6 @@
 		 */
 		public function VCard()
 		{
-
 		}

 		/**
@@ -308,10 +306,10 @@
 		 * var vCard:VCard = VCard.getVCard(_connection, item);

 		 * vCard.addEventListener(VCardEvent.LOADED, onVCard);
 		 * @param connection
-		 * @param user
+		 * @param contact (if null, will get current user's vCard)
 		 * @return Reference to the VCard which will be filled once the loaded event occurs.
 		 */
-		public static function getVCard( connection:XMPPConnection, user:RosterItemVO ):VCard
+		public static function getVCard( connection:XMPPConnection, contact:RosterItemVO=null ):VCard
 		{
 			if ( !cacheFlushTimer.running )
 			{
@@ -326,7 +324,7 @@
 				} );
 			}

-			var bareJID:String = user.jid.bareJID;
+			var bareJID:String = contact ? contact.jid.bareJID : connection.jid.bareJID;

 			var cachedCard:VCard = cache[ bareJID ] as VCard;
 			if ( cachedCard )
@@ -335,8 +333,11 @@
 			}

 			var vcard:VCard = new VCard();
-			vcard.contact = user;
-			vcard.jid = user.jid;
+			if( contact )
+			{
+				vcard.contact = contact;
+				vcard.jid = contact.jid;
+			}
 			cache[ bareJID ] = vcard;

 			pushRequest( connection, vcard );
@@ -374,10 +375,11 @@
 			var req:Object = requestQueue.pop();
 			var connection:XMPPConnection = req.connection;
 			var vcard:VCard = req.card;
-			var user:RosterItemVO = vcard.contact;
-
-			var iq:IQ = new IQ( user.jid.escaped, IQ.TYPE_GET );
-			vcard.jid = user.jid;
+			var contact:RosterItemVO = vcard.contact;
+
+			var recipient:EscapedJID = contact ? contact.jid.escaped : null;
+			var iq:IQ = new IQ( recipient, IQ.TYPE_GET );
+			vcard.jid = contact ? contact.jid : connection.jid;

 			iq.callback = vcard.handleVCard;
 			iq.addExtension( new VCardExtension() );
@@ -418,7 +420,7 @@
 		{
 			_imageBytes = value;
 		}
-
+
 		/**
 		 * The image type of the avatar. Used for saving the image.
 		 * If this is blank, the avatar will not be saved.
@@ -427,7 +429,7 @@
 		{
 			_avatarType = value;
 		}
-
+
 		/**
 		 * Deserializes the incoming IQ to fill the values of this vcard.
 		 * @param iq
@@ -436,7 +438,7 @@
 		{
 			namespace ns = "vcard-temp";
 			use namespace ns;
-
+
 			var node:XML = XML( iq.getNode() );
 			var vCardNode:XML = node.children()[ 0 ];

@@ -461,15 +463,8 @@

 							if ( photo.localName() == "BINVAL" && value.length > 0 )
 							{
-								/*
-								var decoder:Base64Decoder = new Base64Decoder();
-								decoder.decode( value );
-								_imageBytes = decoder.flush();
-								*/
-
 								_imageBytes = Base64.decodeToByteArrayB( value );
-								dispatchEvent( new VCardEvent( VCardEvent.AVATAR_LOADED,
-															   this, true, false ) );
+								dispatchEvent( new VCardEvent( VCardEvent.AVATAR_LOADED, this, true, false ) );
 							}
 						}
 						break;
@@ -599,14 +594,14 @@

 					case "AGE":
 						break;
-
+
 					//there is some ambiguity surrounding how vCard versions are handled
 					//so we need to check it here as well as looking for the attribute
 					//as above.  SEE:  http://xmpp.org/extensions/xep-0054.html#impl
 					case "VERSION":
 						version = Number(child.text());
 						break;
-
+
 					default:
 						trace( "handleVCard. unhandled case child.name(): " + child.name() );
 						break;
@@ -620,9 +615,8 @@
 		/**
 		 *
 		 * @param connection
-		 * @param user
-		 */
-		public function saveVCard( connection:XMPPConnection, user:RosterItemVO ):void
+		 */
+		public function saveVCard( connection:XMPPConnection ):void
 		{
 			var id:String = XMPPStanza.generateID( "save_vcard_" );
 			var iq:IQ = new IQ( null, IQ.TYPE_SET, id, _vCardSent );
@@ -792,7 +786,6 @@

 				vcardExtNode.appendChild( homeAddressNode );
 			}
-

 			var phoneNode:XML = <TEL/>;
 			phoneNode.setChildren( <WORK/> );
@@ -830,7 +823,7 @@
 			}

 			phoneNode.setChildren( <HOME/> );
-
+
 			if ( homeCellNumber )
 			{
 				var homeCellNode:XML = phoneNode.copy();
@@ -862,7 +855,7 @@
 				homeVoiceNode.NUMBER = homeVoiceNumber;
 				vcardExtNode.appendChild( homeVoiceNode );
 			}
-
+
 			if ( avatar != null && _avatarType != null)
 			{
 				var avatarNode:XML = <PHOTO/>
@@ -876,7 +869,7 @@
 				{
 					throw new Error("VCard:saveVCard Error encoding bytes " + error.getStackTrace());
 				}
-
+
 				try
 				{
 					var binaryNode:XML = <BINVAL/>;
@@ -891,10 +884,10 @@
 				var typeNode:XML = <TYPE/>;
 				typeNode.appendChild(_avatarType);
 				avatarNode.appendChild(typeNode);
-
+
 				vcardExtNode.appendChild( avatarNode );
 			}
-
+
 			var xmlDoc:XMLDocument = new XMLDocument(vcardExtNode.toString());
 			vcardExt.setNode(xmlDoc.firstChild);
 			//vcardExt.node = vcardExtNode;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11664
Author:   smgilson@adobe.com
Date:     2009-11-11T19:42:00.734447Z

Log Message:
-----------
Update ASDoc comments on new MXItemRenderer classes, and fix a broken HTML tag in Range.as

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/treeClasses/MXTreeItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Range.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Range.as
@@ -398,7 +398,7 @@
      *  limits.

      *
      *
The valid values for a range are defined by the sum of the minimum property
-     *  with multiples of the interval and also defined to be less than or equal to the
+     *  with multiples of the interval and also defined to be less than or equal to the
      *  maximum property.
      *
      *  The maximum need not be a multiple of snapInterval.


Transferred from the Adobe Open Source Subversion Repository

Revision: 8483
Author:   smgilson@adobe.com
Date:     2009-07-09T17:52:48.367800Z

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

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

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

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

--- frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
+++ frameworks/projects/spark/src/spark/effects/AnimateTransitionShader.as
@@ -88,7 +88,7 @@
  *  and adds the following tag attributes:

  *
  *

- *  <mx:AnimateTransitionShader
+ *  <s:AnimateTransitionShader
  *    Properties
  *    id="ID"
  *    bitmapFrom="no default"


 - fixed
 	- Slider
 		- mouse down on track sets now correct position

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

--- src/reprise/controls/Slider.as
+++ src/reprise/controls/Slider.as
@@ -360,11 +360,11 @@
 		{
 			if(m_direction == DIRECTION_HORIZONTAL)
 			{
-				setValue(positionToValue(mouseX - m_thumb.width / 2));
-			}
-			else
-			{
-				setValue(positionToValue(mouseY - m_thumb.height / 2));
+				setValue(positionToValue(m_track.mouseX - m_thumb.width / 2));
+			}
+			else
+			{
+				setValue(positionToValue(m_track.mouseY - m_thumb.height / 2));
 			}
 			dispatchEvent(new Event(Event.CHANGE));
 		}


+ 增加了加速度字段

+ 增加了加速度字段

--- age/src/age/data/ObjectInfo.as
+++ age/src/age/data/ObjectInfo.as
@@ -98,6 +98,13 @@
 		[Native]
 		[Export]
 		public var velocity:Vector3D = new Vector3D();
+
+		/**
+		 * acceleration
+		 */
+		[Native]
+		[Export]
+		public var acceleration:Vector3D = new Vector3D();

 		/**
 		 * 质量，数值越大，掉落速度越快<br>


Transferred from the Adobe Open Source Subversion Repository

Revision: 23102
Author:   aharui@adobe.com
Date:     2011-10-24T17:53:37.759919Z

Log Message:
-----------
Fix ModuleManager Bug

Notes: None
Doc notes: None
Bugs: SDK-30326
Reviewer: Darrell
Tests run: Checkintests, cyclone full run
Is noteworthy for integration: None

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/modules/ModuleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mx/src/mx/modules/ModuleLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/modules/ModuleLoader.as</path>

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

--- frameworks/projects/mx/src/mx/modules/ModuleLoader.as
+++ frameworks/projects/mx/src/mx/modules/ModuleLoader.as
@@ -14,7 +14,9 @@

 import flash.display.DisplayObject;
 import flash.display.DisplayObjectContainer;
+import flash.events.Event;
 import flash.system.ApplicationDomain;
+import flash.system.SecurityDomain;
 import flash.utils.ByteArray;
 import mx.containers.VBox;
 import mx.core.FlexVersion;
@@ -148,6 +150,22 @@
  *  only a single copy of the module SWF file is transferred over the network by using the
  *  ModuleManager singleton.

  *
+ *

+ *  <mx:ModuleLoader
+ *    Properties
+ *    url="No default"
+ *    trustContent="false|true"
+ *
+ *    Events
+ *    error="No default"
+ *    loading="No default"
+ *    progress="No default"
+ *    ready="No default"
+ *    setup="No default"
+ *    unload="No default"
+ *  />
+ *

+ *
  *  @see mx.modules.ModuleManager
  *  @see mx.controls.SWFLoader
  *
@@ -236,6 +254,66 @@
      */
     public var child:DisplayObject;

+    //----------------------------------
+    //  trustContent
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the trustContent property.
+     */
+    private var _trustContent:Boolean = false;
+
+    [Bindable("trustContentChanged")]
+    [Inspectable(defaultValue="false")]
+
+    /**
+     *  If true, the content is loaded
+     *  into your security domain.
+     *  This means that the load fails if the content is in another domain
+     *  and that domain does not have a crossdomain.xml file allowing your
+     *  domain to access it.
+     *  This property only has an affect on the next load,
+     *  it will not start a new load on already loaded content.
+     *
+     *
The default value is false, which means load
+     *  any content without failing, but you cannot access the content.
+     *  Most importantly, the loaded content cannot
+     *  access your objects and code, which is the safest scenario.
+     *  Do not set this property to true unless you are absolutely sure of the safety
+     *  of the loaded content

+     *
+     *  @default false
+     *  @see flash.system.SecurityDomain
+     *  @see flash.system.ApplicationDomain
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion Flex 4.5.1
+     */
+    public function get trustContent():Boolean
+    {
+        return _trustContent;
+    }
+
+    /**
+     *  @private
+     */
+    public function set trustContent(value:Boolean):void
+    {
+        if (_trustContent != value)
+        {
+            _trustContent = value;
+
+            invalidateProperties();
+            invalidateSize();
+            invalidateDisplayList();
+
+            dispatchEvent(new Event("trustContentChanged"));
+        }
+    }
+
     //----------------------------------
     //  url
     //----------------------------------
@@ -395,7 +473,10 @@
             tempApplicationDomain = new ApplicationDomain(currentDomain);
         }

-        module.load(tempApplicationDomain, null, bytes, moduleFactory);
+        module.load(tempApplicationDomain,
+                    trustContent ? SecurityDomain.currentDomain : null,
+                    bytes,
+                    moduleFactory);
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 11970
Author:   gosmith@adobe.com
Date:     2009-11-19T02:10:30.823857Z

Log Message:
-----------
Improved FTETextField's placement of TextLines.

When composing TextLines for the 'text' property, and when computing the TextLineMetrics returned by getLineMetrics(), we now calculate the ascent slightly differently, and round the leading.

When composing TextLines for the 'htmlText' property, we now use a new TLF LeadingModel called APPROXIMATE_TEXT_FIELD.

With the combination of these two changes, we can now get the exact same line placement for multiple lines of Arial 12 (Flex's default font) on Windows for (1) text in TextField, (2) text in FTETextField, (3) htmlText in TextField, and (4) htmlText in FTETextField.

For other fonts and sizes, there may be small differences between TextField and FTETextField, because FTE does not have access to TextField's metrics; we're using a hueristic that TextField's ascent is aproxmiately FTE's ascent plus FTE's descent. But for any font, multiple lines of single-format 'htmlText' should now be spaced the same as multiple lines of 'text'.

QE notes: Baseline bitmaps involving FTETextField may need to be regenerated.
Doc notes: None
Bugs: None
Reviewer: Evtim
Tests run: ant checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as

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

--- frameworks/projects/spark/src/mx/core/FTETextField.as
+++ frameworks/projects/spark/src/mx/core/FTETextField.as
@@ -2158,9 +2158,19 @@
         // x is relative to textLine.x.
         var x:Number = Math.round(textLine.localToGlobal(new Point(0, 0)).x);
         var width:Number = Math.round(textLine.textWidth);
-		var ascent:Number = Math.round(textLine.ascent + textLine.descent)
+
+		// TextField computes ascent and descent differently than FTE does.
+		// Adding FTE's ascent and descent produces
+		// a reasonable approximation of TextField's ascent.
+		// TextField's ascent, descent, and leading are always rounded.
+		// Rounding FTE's ascent and descent separately, then adding,
+		// produces a "TextField ascent" of 12 + 3 or 15 for Arial 12
+		// (Flex's default font) on Windows, exactly matching a real
+		// TextField's ascent in this most-common case.
+		var ascent:Number = Math.round(textLine.ascent) + Math.round(textLine.descent)
 		var descent:Number = Math.round(textLine.descent);
-		var leading:Number = Number(_defaultTextFormat.leading);
+		var leading:Number = Math.round(Number(_defaultTextFormat.leading));
+
 		var height:Number = ascent + descent + leading;

 		return new TextLineMetrics(x, width, height, ascent, descent, leading);
@@ -2621,9 +2631,19 @@
 		var innerHeight:Number =
 			compositionHeight - PADDING_TOP - PADDING_BOTTOM;

+		// FTE's emBox's top gives the ascent and its bottom gives the descent.
+		// TextField computes ascent and descent differently than FTE does.
+		// Adding FTE's ascent and descent produces
+		// a reasonable approximation of TextField's ascent.
+		// TextField's ascent, descent, and leading are always rounded.
+		// Rounding FTE's ascent and descent separately, then adding,
+		// produces a "TextField ascent" of 12 + 3 or 15 for Arial 12
+		// (Flex's default font) on Windows, exactly matching a real
+		// TextField's ascent in this most-common case.
 		var emBox:Rectangle = elementFormat.getFontMetrics().emBox;
-		var ascent:int = Math.round(emBox.height);
+		var ascent:int = Math.round(-emBox.top) + Math.round(emBox.bottom);
 		var descent:int = Math.round(emBox.bottom);
+		var leading:Number = Math.round(Number(_defaultTextFormat.leading));

 		// Break the text into paragraphs at CR characters.
 		// (Each LF character has already been turned into a CR.)
@@ -2649,7 +2669,7 @@

 			// TextField puts the same leading between paragraphs
 			// as between lines in a paragraph.
-			paragraphY += _defaultTextFormat.leading;
+			paragraphY += leading;

 			i = j + 1;
 		}
@@ -3285,7 +3305,7 @@

 	public function get leadingModel():*
 	{
-		return LeadingModel.ASCENT_DESCENT_UP;
+		return LeadingModel.APPROXIMATE_TEXT_FIELD;
 	}

 	public function get ligatureLevel():*
@@ -3302,7 +3322,7 @@

 	public function get lineHeight():*
 	{
-		return textField._defaultTextFormat.leading + 2; // FIXME (gosmith)
+		return textField._defaultTextFormat.leading;
 	}

 	public function get lineThrough():*


Transferred from the Adobe Open Source Subversion Repository

Revision: 10955
Author:   jszeto@adobe.com
Date:     2009-10-09T19:34:12.315199Z

Log Message:
-----------
ComboBox initial checkin

The ComboBox component is similar to a DropDownList but has a TextInput instead of a Label. A user can type into the TextInput and the dropDown will scroll to and highlight the closest match.

Users are allowed to type in an item not found in the dataProvider. With this behavior, a ComboBox acts as a list of suggested values, while a DropDownList acts as a list of possible values.

The full spec is located here:
http://opensource.adobe.com/wiki/display/flexsdk/Spark+ComboBox

This checkin includes the following:
- All public APIs implemented
- All styles implemented (except for cornerRadius)
- Basic keyboard and mouse interaction working
- Spark and Wireframe skins implemented
- Added custom selectedItem support to ListBase

What is missing:
- The keyboard and mouse interactions are partially implemented.
- The TextInput caret and selection behaviors are not implemented
- The changing event is not cancellable if setting a custom selected item
- Need to refactor DropDownList into DropDownList and DropDownListBase

QE notes: None
Doc notes: None
Bugs: None
Reviewer: Glenn
Tests run: List, DropDownList
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ComboBoxButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/WireframeClasses.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/ComboBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ComboBoxTextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ComboBoxButtonSkin.mxml</path>

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

--- frameworks/projects/wireframe/src/WireframeClasses.as
+++ frameworks/projects/wireframe/src/WireframeClasses.as
@@ -31,6 +31,8 @@
 	import spark.skins.wireframe.ButtonBarSkin; ButtonBarSkin;
 	import spark.skins.wireframe.ButtonSkin; ButtonSkin;
 	import spark.skins.wireframe.CheckBoxSkin; CheckBoxSkin;
+    import spark.skins.wireframe.ComboBoxButtonSkin; ComboBoxButtonSkin;
+    import spark.skins.wireframe.ComboBoxSkin; ComboBoxSkin;
 	import spark.skins.wireframe.DefaultButtonSkin; DefaultButtonSkin;
 	import spark.skins.wireframe.DropDownListButtonSkin; DropDownListButtonSkin;
 	import spark.skins.wireframe.DropDownListSkin; DropDownListSkin;


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/framework/src/mx/core/IStateClient2.as
+++ frameworks/projects/framework/src/mx/core/IStateClient2.as
@@ -0,0 +1,80 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.core
+{
+
+import flash.events.IEventDispatcher;
+
+/**
+ *  The IStateClient2 interface defines the interface that
+ *  components must implement to support Flex 4 view state
+ *  semantics.
+ */
+public interface IStateClient2 extends IEventDispatcher
+{
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+
+    //----------------------------------
+    //  currentState
+    //----------------------------------
+
+    /**
+     *  The current view state.
+     */
+    function get currentState():String;
+
+    /**
+     *  @private
+     */
+    function set currentState(value:String):void;
+
+
+    //----------------------------------
+    //  states
+    //----------------------------------
+
+    [ArrayElementType("mx.states.State")]
+
+    /**
+     *  The set of view state objects.
+     */
+    function get states():Array;
+
+    /**
+     *  @private
+     */
+    function set states(value:Array):void;
+
+
+    //----------------------------------
+    //  transitions
+    //----------------------------------
+
+    [ArrayElementType("mx.states.Transition")]
+
+    /**
+     *  The set of view state transitions.
+     */
+    function get transitions():Array;
+
+    /**
+     *  @private
+     */
+    function set transitions(value:Array):void;
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 20005
Author:   cframpto@adobe.com
Date:     2011-01-28T19:36:52.199019Z

Log Message:
-----------
Fix up the text style metadata.  UITextFieldGridItemRenderer is based on TextField so it supports the old mx text styles not the Spark FTE text styles.  Remove verticalAlign style from DefaultGridItemRenderer since it is not currently supported.

QE notes: test setting some styles in UITextFieldGridItemRenderer
Doc notes:
Bugs: SDK-29192
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

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

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -208,7 +208,6 @@
  */
 [Style(name="symbolColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]

-include "../styles/metadata/BasicNonInheritingTextStyles.as"
 include "../styles/metadata/BasicInheritingTextStyles.as"

 /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 19770
Author:   hmuller@adobe.com
Date:     2011-01-14T22:49:22.906463Z

Log Message:
-----------
DataGrid/focusOwner changes for accessibility and a correction for the control-A fix that should have been included in SVN 19755.

Cancel control-A events after they've been handled.

Added DataGrid columnsLength and dataProviderLength properties for test automation.

QE notes:
Doc notes:
Bugs: SDK-29023
Reviewer: Carol
Tests run: checkin, mustella
Is noteworthy for integration: yes

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

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

--- frameworks/projects/spark/src/spark/components/DataGrid.as
+++ frameworks/projects/spark/src/spark/components/DataGrid.as
@@ -1124,8 +1124,6 @@
             dispatchEvent(new FlexEvent(type));
     }

-    // TBD(hmuller): baselinePosition override
-
     //----------------------------------
     //  columns (delegates to grid.columns)
     //----------------------------------
@@ -1169,15 +1167,6 @@
     /**
      *  @private
      */
-    private function getColumnsLength():uint
-    {
-        const columns:IList = columns;
-        return (columns) ? columns.length : 0;
-    }
-
-    /**
-     *  @private
-     */
     private function getColumnAt(columnIndex:int):GridColumn
     {
         const grid:Grid = grid;
@@ -1189,6 +1178,25 @@
     }

     //----------------------------------
+    //  columnsLength
+    //----------------------------------
+
+    /**
+     *  Returns the value of columns.length if the columns IList
+     *  was specified, otherwise 0.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5*
+     */
+    public function get columnsLength():int
+    {
+        const columns:IList = columns;
+        return (columns) ? columns.length : 0;
+    }
+
+    //----------------------------------
     //  dataProvider (delegates to grid.dataProvider)
     //----------------------------------

@@ -1218,14 +1226,24 @@
             dispatchChangeEvent("dataProviderChanged");
     }

-    /**
-     *  @private
-     */
-    private function getDataProviderLength():uint
+    //----------------------------------
+    //  dataProviderLength
+    //----------------------------------
+
+    /**
+     *  Returns the value of dataProvider.length if the dataProvider IList
+     *  was specified, otherwise 0.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
+    public function get dataProviderLength():int
     {
         const dataProvider:IList = dataProvider;
         return (dataProvider) ? dataProvider.length : 0;
-    }
+    }

     //----------------------------------
     //  dataTipField (delegates to grid.dataTipField)
@@ -2046,10 +2064,18 @@
      *  accessibilityImplementation, rather than the DataGrid's, so that the MSAA
      *  representation of descendant components will not be "obscured" by DataGridAccImpl.
      *
-     *  @see #createChidlren(), #setFocus(), #isOurFocus().
+     *  @see #createChildren(), #setFocus(), #isOurFocus().
      */
     mx_internal var focusOwner:UIComponent;

+    /**
+     *  @private
+     *  The accessibility implementation depends on the focusOwner's bounds, as in
+     *  DisplayObject.getBounds(), which is defined by the bounds of what has been drawn,
+     *  not the focusOwner's width and height properties.
+     */
+    private var focusOwnerWidth:Number = 1;
+    private var focusOwnerHeight:Number = 1;

     /**
      *  @private
@@ -2067,14 +2093,12 @@
         focusOwner = new UIComponent();
         const g:Graphics = focusOwner.graphics;
         g.clear();
-        g.beginFill(0x000000, 0.0);
-        g.drawRect(0, 0, 1, 1);
-        g.endFill();
+        g.lineStyle(0, 0x000000, 0);
+        g.drawRect(0, 0, focusOwnerWidth, focusOwnerHeight);
         $addChild(focusOwner);
         focusOwner.tabEnabled = true;
         focusOwner.$visible = true;
     }
-

     /**
      *  @private
@@ -2083,6 +2107,26 @@
     {
         if (DataGrid.createAccessibilityImplementation != null)
             DataGrid.createAccessibilityImplementation(this);
+    }
+
+    /**
+     *  @private
+     *  Override to set proper width and height on focusOwner object that
+     *  the DataGridAccImpl uses to compute the location of the DataGrid.
+     */
+    override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
+    {
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+        if (focusOwner && ((focusOwnerWidth != unscaledWidth) || (focusOwnerHeight != unscaledHeight)))
+        {
+            focusOwnerWidth = unscaledWidth;
+            focusOwnerHeight = unscaledHeight;
+            const g:Graphics = focusOwner.graphics;
+            g.clear();
+            g.lineStyle(0, 0x000000, 0);
+            g.drawRect(0, 0, focusOwnerWidth, focusOwnerHeight);
+        }
     }

     /**
@@ -2165,7 +2209,7 @@
     /**
      *  @private
      *  Used to prevent keyboard events that have been redispatched to the Scroller from being
-     *  redispatched a second time when the bubble back up.
+     *  redispatched a second time when they bubble back up.
      */
     private var scrollerEvent:KeyboardEvent = null;

@@ -2193,6 +2237,7 @@
         if (event.keyCode == Keyboard.A && event.ctrlKey)
         {
             selectAllFromKeyboard();
+            event.preventDefault();
             return;
         }

@@ -2201,10 +2246,9 @@

         if (selectionMode == GridSelectionMode.NONE ||
             grid.caretRowIndex < 0 ||
-            grid.caretRowIndex >= getDataProviderLength() ||
+            grid.caretRowIndex >= dataProviderLength ||
             (isCellSelectionMode() &&
-                (grid.caretColumnIndex < 0 ||
-                    grid.caretColumnIndex >= getColumnsLength())))
+                (grid.caretColumnIndex < 0 || grid.caretColumnIndex >= columnsLength)))
         {
             // We're not going to handle this event, so give the scroller a chance.
             if (scroller && (scrollerEvent != event))
@@ -3958,8 +4002,8 @@

         const inRows:Boolean = isRowSelectionMode();

-        const rowCount:int = getDataProviderLength();
-        const columnCount:int = getColumnsLength();
+        const rowCount:int = dataProviderLength;
+        const columnCount:int = columnsLength;
         var visibleRows:Vector.<int>;
         var caretRowBounds:Rectangle;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3148
Author:   gosmith@adobe.com
Date:     2008-09-08T22:01:15.712225Z

Log Message:
-----------
You can now use CSS styles to set the default text format for TextView. It no longer has any formatting properties. It supports the entire set of Gumbo text format styles.

SkinnableComponent and Group now also support all these styles. However, skins such as ButtonSkin, TextInputSkin, and TextAreaSkin continue for now to specify instance styles on their TextBox, TextGraphic, and TextView, in order to give them a Gumbo look rather than a Halo look. So if you try setting, for example, the fontSize on the Application, it doesn't yet affect the text format of a Button, TextInput, TextArea, etc. unless you remove the instance style in the skin.

Reviewer: Glenn
Bugs: -
QA: Lots of new stuff to test!
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/SkinnableComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/graphicsClasses/TextGraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -13,7 +13,6 @@
 {

 import flash.display.DisplayObjectContainer;
-import flash.display.Graphics;
 import flash.geom.Rectangle;

 import flex.graphics.graphicsClasses.TextFlowComposer;
@@ -238,6 +237,7 @@

 	/**
 	 *  @private
+     *  Keep this method in sync with the same method in TextView.
 	 */
 	private function createTextFlow():TextFlow
 	{


Transferred from the Adobe Open Source Subversion Repository

Revision: 7491
Author:   cframpto@adobe.com
Date:     2009-06-02T16:22:03.123279Z

Log Message:
-----------
Rename inputManager to textContainerManager and fix spelling mistake in [RichTextContent] comment.
Make RichEditableTextContainerManager private for docs.

QA Notes:
Doc Notes:
Bugs:
Reviewers: Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichText.as
+++ frameworks/projects/spark/src/spark/components/RichText.as
@@ -388,7 +388,7 @@
     /**
      *  @private
      *  This metadata tells the MXML compiler to disable some of its default
-     *  interpreation of the value specified for the 'content' property.
+     *  interpretation of the value specified for the 'content' property.
      *  Normally, for properties of type Object, it assumes that things
      *  looking like numbers are numbers and things looking like arrays
      *  are arrays. But <content>1</content> should generate code to set the


Transferred from the Adobe Open Source Subversion Repository

Revision: 4357
Author:   egreenfi@adobe.com
Date:     2008-12-18T23:52:27.017290Z

Log Message:
-----------
UIComponent now implements ILayoutElement directly

ILayoutElement was moved to mx.core.ILayoutElement, as it is now a core interface required by UIComponent.

Further phases to follow:
1) IVlisualElement to extend ILayoutElement, pending resolution of a compiler bug.
2) remove LayoutElementUIC, pending UIMovieclip implementing ILayoutElement
3) remove LayoutElementFactory, once all IVisualElements implement ILayoutElement directly.
4) remove ITransformable, moving transform properties onto IVisualElement.

Reviewer: Evtim
QA: yes.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/layout/layout_tester.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/MatrixUtil.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxHSlider.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/FxHScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IVisualElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/BasicLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxVScrollBar.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/LayoutElementUIComponentUtils.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/utils/MatrixUtil.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/ILayoutElement.as" copyfrom-rev="4249" action="A">/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/mx/layout/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/layout/LayoutElementUIC.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/BasicLayout.as
+++ frameworks/projects/spark/src/spark/layouts/BasicLayout.as
@@ -16,7 +16,7 @@
 import flash.geom.Rectangle;

 import mx.components.baseClasses.GroupBase;
-import mx.layout.ILayoutElement;
+import mx.core.ILayoutElement;
 import mx.layout.LayoutBase;

 /**


It's a bit counterintuitive that nothing in nenya/build.xml actually looks at all the ActionScript files... I keep forgetting.

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

--- src/as/com/threerings/flash/path/HermiteFunc.as
+++ src/as/com/threerings/flash/path/HermiteFunc.as
@@ -44,7 +44,7 @@
             return _p0;
         } else {
             var tt :Number = t*t;
-            var ttt :Number = t2 * t;
+            var ttt :Number = tt * t;

             return int(_p0 * (2*ttt - 3*tt + 1) +
                        _m0 * (ttt - 2*tt + t) +


fix comment for asdoc

fix comment for asdoc

--- src/com/google/analytics/core/DomainNameMode.as
+++ src/com/google/analytics/core/DomainNameMode.as
@@ -86,7 +86,7 @@
          * you would set the domain name as follows :
          * <pre class="prettyprint">
          * pageTracker.setDomainName( new Domain( DomainName.custom, ".example.com" ) ) ;
-         * </pre>
+         * </p>
          */
         public static const custom:DomainNameMode  = new DomainNameMode( 2, "custom" );


:bug: Fix incorrect indication of CGB support


Transferred from the Adobe Open Source Subversion Repository

Revision: 18231
Author:   rfrishbe@adobe.com
Date:     2010-10-19T23:46:20.180026Z

Log Message:
-----------
Changing ActionBarSkin, TextInputSkin, and ButtonBaseSkin for performance reasons so we don't call measureText() anymore (atleast in the 90% case--when the label is empty, we still might call measureText()).  We now rely on textWidth and textHeight.

For TextInput, the measured size algorithm now doesn't use maxChars * (measureText("W")).  Instead it uses maxChars * (fontSize-2).  The mesureText("W") was only an approximation and seemed to large in most cases.  Using fontSize is a much cheaper approximation and seems to work just as well.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as
@@ -105,23 +105,25 @@
     {
         super.measure();

-        // Use the size of "W" to determine measured size.
-        var textLineMetrics:TextLineMetrics = measureText("W");
+        // commit styles so we can get a valid textHeight
+        textDisplay.commitStyles();

         // Width is based on maxChars (if set), or hard-coded to 440
         if (hostComponent && hostComponent.maxChars)
         {
-            // Use the width of "W" and multiply by maxChars
-            measuredWidth = textLineMetrics.width *
-                hostComponent.maxChars + HORIZONTAL_PADDING * 2
-                + TEXT_WIDTH_PADDING;
+            // Grab the fontSize and subtract 2 as the pixel value for each character.
+            // This is just an approximation, but it appears to be a reasonable one
+            // for most input and most font.
+            var characterWidth:int = Math.max(1, (getStyle("fontSize") - 2));
+            measuredWidth =  (characterWidth * hostComponent.maxChars) +
+                (HORIZONTAL_PADDING * 2) + TEXT_WIDTH_PADDING;
         }
         else
         {
             measuredWidth = 440;
         }

-        measuredHeight = textLineMetrics.height + VERTICAL_PADDING * 2 + TEXT_HEIGHT_PADDING;
+        measuredHeight = textDisplay.textHeight + VERTICAL_PADDING * 2 + TEXT_HEIGHT_PADDING;
     }

     /**


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

--- frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
+++ frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.containers.utilityClasses
 {