Code clean

Code clean

--- collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
@@ -177,19 +177,7 @@
 						if ( ! skippedField(attr, index) ) {
 							field = attr.fields[index];
 							if ( applyToNonEmptyNodes || (field.value == null && field.symbol == null)) {
-								o = new UpdateRequestOperation();
-								o.method = UpdateRequestOperation$Method.UPDATE;
-								o.parentEntityId = node.parentId;
-								o.nodeName = node.name;
-								o.nodeId = node.id;
-								o.fieldIndex = index;
-								o.remarks = field.remarks;
-								o.symbol = symbol;
-								if ( FieldProxy.isReasonBlankSymbol(symbol) ) {
-									o.value = null;
-								} else {
-									o.value = field.value != null ? field.value.toString(): null;
-								}
+								o = createUpdateSymbolOperation(node, field, index, symbol);
 								updateRequest.addOperation(o);
 							}
 						}
@@ -197,23 +185,28 @@
 				} else {
 					field = attr.fields[fieldIdx];
 					if ( applyToNonEmptyNodes || (field.value == null && field.symbol == null)) {
-						o = new UpdateRequestOperation();
-						o.method = UpdateRequestOperation$Method.UPDATE;
-						o.parentEntityId = node.parentId;
-						o.nodeName = node.name;
-						o.nodeId = node.id;
-						o.fieldIndex = fieldIdx;
-						o.remarks = field.remarks;
-						o.symbol = symbol;
-						if ( FieldProxy.isReasonBlankSymbol(symbol) ) {
-							o.value = null;
-						} else {
-							o.value = field.value != null ? field.value.toString(): null;
-						}
+						o = createUpdateSymbolOperation(node, field, fieldIdx, symbol);
 						updateRequest.addOperation(o);
 					}
 				}
 			}
+		}
+
+		private static function createUpdateSymbolOperation(node:NodeProxy, field:FieldProxy, fieldIdx:int, symbol:FieldSymbol):UpdateRequestOperation {
+			var o:UpdateRequestOperation = new UpdateRequestOperation();
+			o.method = UpdateRequestOperation$Method.UPDATE;
+			o.parentEntityId = node.parentId;
+			o.nodeName = node.name;
+			o.nodeId = node.id;
+			o.fieldIndex = fieldIdx;
+			o.remarks = field.remarks;
+			o.symbol = symbol;
+			if ( FieldProxy.isReasonBlankSymbol(symbol) ) {
+				o.value = null;
+			} else {
+				o.value = field.value != null ? field.value.toString(): null;
+			}
+			return o;
 		}

 		private static function skippedField(attr:AttributeProxy, index:int):Boolean {
@@ -225,43 +218,43 @@
 			}
 		}

-		protected static function prepareApproveMissingRequests(updateRequest:UpdateRequest, nodeProxy:NodeProxy, fieldIdx:Number, applyToNonEmptyNodes:Boolean = true):void {
-			if( nodeProxy is EntityProxy ){
-				var entity:EntityProxy = nodeProxy as EntityProxy;
+		protected static function prepareApproveMissingRequests(updateRequest:UpdateRequest, node:NodeProxy, fieldIdx:Number, applyToNonEmptyNodes:Boolean = true):void {
+			if( node is EntityProxy ){
+				var entity:EntityProxy = node as EntityProxy;
 				var children:IList = entity.getChildren();
 				for each (var child:NodeProxy in children) {
 					prepareApproveMissingRequests(updateRequest, child, fieldIdx, applyToNonEmptyNodes);
 				}
 			} else {
-				var attr:AttributeProxy = AttributeProxy(nodeProxy);
+				var attr:AttributeProxy = AttributeProxy(node);
 				var o:UpdateRequestOperation;
 				var field:FieldProxy;
 				if(isNaN(fieldIdx) || fieldIdx < 0){
 					for(var index:int = 0; index < attr.fields.length; index ++) {
 						field = attr.fields[index];
 						if(applyToNonEmptyNodes || (field.value == null && (field.symbol == null || field.hasReasonBlankSpecified()))) {
-							o = new UpdateRequestOperation();
-							o.method = UpdateRequestOperation$Method.APPROVE_MISSING;
-							o.parentEntityId = nodeProxy.parentId;
-							o.nodeName = nodeProxy.name;
-							o.nodeId = nodeProxy.id;
-							o.fieldIndex = index;
+							o = createApproveMissingOperation(node, index);
 							updateRequest.addOperation(o);
 						}
 					}
 				} else {
 					field = attr.fields[fieldIdx];
 					if(applyToNonEmptyNodes || (field.value == null && (field.symbol == null || field.hasReasonBlankSpecified()))) {
-						o = new UpdateRequestOperation();
-						o.method = UpdateRequestOperation$Method.APPROVE_MISSING;
-						o.parentEntityId = nodeProxy.parentId;
-						o.nodeName = nodeProxy.name;
-						o.nodeId = nodeProxy.id;
-						o.fieldIndex = fieldIdx;
+						o = createApproveMissingOperation(node, fieldIdx);
 						updateRequest.addOperation(o);
 					}
 				}
 			}
+		}
+
+		private static function createApproveMissingOperation(node:NodeProxy, fieldIdx:int):UpdateRequestOperation {
+			var o:UpdateRequestOperation = new UpdateRequestOperation();
+			o.method = UpdateRequestOperation$Method.APPROVE_MISSING;
+			o.parentEntityId = node.parentId;
+			o.nodeName = node.name;
+			o.nodeId = node.id;
+			o.fieldIndex = fieldIdx;
+			return o;
 		}

 		protected static function confirmErrorHandler(event:NodeEvent):void {


FLEX-33823 fixed parsing of month strings in stringToDate

--- frameworks/projects/mx/src/mx/controls/DateField.as
+++ frameworks/projects/mx/src/mx/controls/DateField.as
@@ -475,10 +475,19 @@
 		if (valueString == null || inputFormat == null)
 			return null;

+		var monthNames:Array = ResourceManager.getInstance()
+			.getStringArray("SharedResources", "monthNames");
+
+		var noMonths:int = monthNames.length;
+		for (var i:int = 0; i < noMonths; i++) {
+			valueString = valueString.replace(monthNames[i], (i+1).toString());
+			valueString = valueString.replace(monthNames[i].substr(0,3), (i+1).toString());
+		}
+
 		length = valueString.length;

 		dateParts[part] = "";
-        for (var i:int = 0; i < length; i++)
+        for (i = 0; i < length; i++)
         {
 			dateChar = valueString.charAt(i);


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 5220
Author:   chaase@adobe.com
Date:     2009-03-10T15:55:06.496289Z

Log Message:
-----------
New Transform effects to handle correctly doing Move, Rotate, and Scale operations simultaneously. Also, added keyframe capabilities to new effects system (necessary for the transform effects, shouldn't affect operation of other effects). Fixed various issues with effects/transition infrastructure as necessary. Added transform utility functions to UIComponent, AdvancedLayoutFeatures, and GraphicElement.

QE Notes: This will break existing new effects tests due to changes in core Animation and AnimationEvent classes, QE is disabling them for now and will add them back in as changes are made.
Doc Notes: None
Bugs:
Reviewer: Ely (transform utilities) and Jason (the rest)
tests: checkintests, Mustella tests/Effects, tests/ListDataEffects

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/geom/TransformOffsets.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/CompositeEffect.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/KeyFrame.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</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/framework/src/mx/effects/effectClasses/PropertyChanges.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxAnimate3D.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/effectClasses</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale3D.as</path>
<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/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxAnimateColorInstance.as</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/effects/FxAnimate.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformScale.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotate3DInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxRotateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/baseClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/effectClasses/FxMoveInstance.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/effectClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/events/AnimationEvent.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate3D.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/MotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/AnimationProperty.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformMove3D.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransformRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/AdvancedLayoutFeatures.as</path>

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

--- frameworks/projects/framework/src/mx/effects/Effect.as
+++ frameworks/projects/framework/src/mx/effects/Effect.as
@@ -165,6 +165,9 @@
         // Go through and remove any before/after values that are the same.
         for (var i:int = 0; i < propChanges.length; i++)
         {
+            if(propChanges[i].stripUnchangedValues == false)
+                continue;
+
             for (var prop:Object in propChanges[i].start)
             {
                 if ((propChanges[i].start[prop] ==
@@ -1079,7 +1082,7 @@

         if (create)
         {
-            newInstance = IEffectInstance(new instanceClass(target))
+            newInstance = IEffectInstance(new instanceClass(target));

             initInstance(newInstance);

@@ -1452,7 +1455,12 @@
                 m = effectProps.length;
                 for (j = 0; j < m; j++)
                 {
-                    valueMap[effectProps[j]] = getValueFromTarget(target,effectProps[j]);
+                    // Don't clobber values already set
+                    if (valueMap[effectProps[j]] === undefined)
+                    {
+                        valueMap[effectProps[j]] =
+                            getValueFromTarget(target,effectProps[j]);
+                    }
                 }
             }
         }
@@ -1554,8 +1562,7 @@
                 m = effectProps.length;
                 for (j = 0; j < m; j++)
                 {
-                    if (effectProps[j] in propChanges[i].start &&
-                        effectProps[j] in target)
+                    if (effectProps[j] in propChanges[i].start)
                     {
                         applyValueToTarget(target, effectProps[j],
                                 propChanges[i].start[effectProps[j]],
@@ -1615,8 +1622,7 @@
                 m = effectProps.length;
                 for (j = 0; j < m; j++)
                 {
-                    if (effectProps[j] in propChanges[i].end &&
-                        effectProps[j] in target)
+                    if (effectProps[j] in propChanges[i].end)
                     {
                         applyValueToTarget(target, effectProps[j],
                                 propChanges[i].end[effectProps[j]],


url fixes

url fixes

--- HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingHLSIndexHandler.as
+++ HLSPlugin/src/org/denivip/osmf/net/httpstreaming/hls/HTTPStreamingHLSIndexHandler.as
@@ -110,7 +110,7 @@
 			for each(var hsi:HLSStreamInfo in _indexInfo.streams){
 				_streamNames.push(hsi.streamName);
 				_streamQualityRates.push(hsi.bitrate);
-				var url:String = _baseURL + hsi.streamName;
+				var url:String = (hsi.streamName.search(/(ftp|file|https?):\/\//) == 0) ? hsi.streamName : _baseURL + hsi.streamName;
 				_streamURLs.push(url);
 			}

@@ -173,7 +173,7 @@

 				if(lines[i].indexOf("#EXTINF:") == 0){
 					var duration:Number = parseFloat(lines[i].match(/([\d\.]+)/)[1]);
-					var url:String = rateItem.url.substr(0, rateItem.url.lastIndexOf('/')+1) + lines[i+1];
+					var url:String = (lines[i+1].search(/(ftp|file|https?):\/\//) == 0) ? lines[i+1] : rateItem.url.substr(0, rateItem.url.lastIndexOf('/')+1) + lines[i+1];
 					indexItem = new HTTPStreamingM3U8IndexItem(duration, url, discontinuity);
 					rateItem.addIndexItem(indexItem);
 					discontinuity = false;


#SUP-325 #comment continue to play the entry even if adaptv preroll fails

--- plugins/adaptvas3Plugin/src/adaptvas3PluginCode.as
+++ plugins/adaptvas3Plugin/src/adaptvas3PluginCode.as
@@ -6,6 +6,8 @@
 	import com.kaltura.kdpfl.plugin.component.AdaptvAS3Mediator;
 	import com.kaltura.kdpfl.plugin.component.AdaptvAS3Player;

+	import com.kaltura.kdpfl.model.type.NotificationType;
+
 	import fl.core.UIComponent;
 	import fl.managers.*;

@@ -22,6 +24,8 @@
 		private var _adaptvAS3Player : AdaptvAS3Player ;
 		private var _configValues:Array = new Array();
 		private var _context:Object;
+
+		private var _loadError:Boolean;
 		/**
 		 * Constructor
 		 *
@@ -73,6 +77,7 @@

 		private function onAdManagerLoadFailed (e : Event) : void
 		{
+			_loadError = true;
 			dispatchEvent( new KPluginEvent( KPluginEvent.KPLUGIN_INIT_FAILED) );
 		}

@@ -170,7 +175,11 @@

 		public function start () : void
 		{
-			_adaptvas3Mediator.forceStart();
+			if (_loadError) {
+				_adaptvAS3Player.facade.sendNotification( NotificationType.SEQUENCE_ITEM_PLAY_END );
+			} else {
+				_adaptvas3Mediator.forceStart();
+			}
 		}
 		public function get sourceType () : String
 		{


fixed bug with default parameter values in external interface functions

--- WeaveAPI/src/weave/api/WeaveAPI.as
+++ WeaveAPI/src/weave/api/WeaveAPI.as
@@ -187,14 +187,11 @@
 				var interfaces:Array = [IExternalSessionStateInterface]; // add more interfaces here if necessary
 				for each (var theInterface:Class in interfaces)
 				{
+					var instance:Object = getSingletonInstance(theInterface);
 					var classInfo:Object = describeTypeJSON(theInterface, DescribeType.INCLUDE_TRAITS | DescribeType.INCLUDE_METHODS | DescribeType.HIDE_NSURI_METHODS | DescribeType.USE_ITRAITS);
 					// add a callback for each external interface function
-					for each (var method:Object in classInfo.traits.methods)
-					{
-						var methodName:String = method.name;
-						var callback:Function = generateExternalInterfaceCallback(methodName, theInterface);
-						ExternalInterface.addCallback(methodName, callback);
-					}
+					for each (var methodInfo:Object in classInfo.traits.methods)
+						generateExternalInterfaceCallback(instance, methodInfo);
 				}
 				var prev:Boolean = ExternalInterface.marshallExceptions;
 				ExternalInterface.marshallExceptions = false;
@@ -222,18 +219,22 @@
 		}

 		/**
-		 * @private
-		 */
-		private static function generateExternalInterfaceCallback(methodName:String, theInterface:Class):Function
-		{
-			return function (...args):* {
-				var instance:Object = getSingletonInstance(theInterface);
-				var method:Function = instance[methodName] as Function;
-				// append necessary number of parameters in an attempt to avoid an exception
-				while (args.length < method.length)
-					args.push(undefined);
+		 * @private
+		 */
+		private static function generateExternalInterfaceCallback(instance:Object, methodInfo:Object):void
+		{
+			var method:Function = instance[methodInfo.name] as Function;
+			// find the number of required parameters
+			var paramCount:int = 0;
+			while (paramCount < method.length && !methodInfo.parameters[paramCount].optional)
+				paramCount++;
+			function callback(...args):*
+			{
+				if (args.length < paramCount)
+					args.length = paramCount;
 				return method.apply(null, args);
 			}
+			ExternalInterface.addCallback(methodInfo.name, callback);
 		}


minor coding style fixes in Geometry.initialize()

--- src/aerys/minko/scene/node/mesh/geometry/Geometry.as
+++ src/aerys/minko/scene/node/mesh/geometry/Geometry.as
@@ -171,7 +171,7 @@

 			var numVertexStreams	: int	= vertexStreams ? vertexStreams.length : 0;

-			_vertexStreams = new Vector.<IVertexStream>();
+			_vertexStreams = new <IVertexStream>[];
 			for (var i : int = 0; i < numVertexStreams; ++i)
 			{
 				var vstream : IVertexStream	= vertexStreams[i];


changed the size of the googleMap 'infoWindow' so that it our pop-up placemark forms would fit inside, expect more changes;

--- flexEditor/src/org/arisgames/editor/components/PlaceMarker.as
+++ flexEditor/src/org/arisgames/editor/components/PlaceMarker.as
@@ -60,8 +60,8 @@
 //                pme.addEventListener(AppConstants.DYNAMICEVENT_PLACEMARKREQUESTSDELETION, map.deletePlaceMarker);
                 iwo.customContent = pme;
                 iwo.drawDefaultFrame = true;
-                iwo.height = 300;
-                iwo.width = 375;
+                iwo.height = 375;
+                iwo.width = 362;

                 openInfoWindow(iwo);
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 9399
Author:   aharui@adobe.com
Date:     2009-08-19T20:39:10.836192Z

Log Message:
-----------
Check in prototypes of ControlBars in Panel and Application, Spark Containers in Halo Navigators, Halo ViewStack in Spark ButtonBar.  APIs should match spec but are subject to change from PARB.  Skins are subject to tweaking after XD review

QE Notes: The following tests will fail and need updating:
gumbo/containers/Panel/Properties/Panel_Properties_position Panel_Properties_rotate
apollo/spark/components/Window/properties/window_properties_titleIcon_tests titleIcon_test8

Doc Notes: None
Bugs: None
Reviewer: Darrell, Glenn, Ryan
API Change: No
Is noteworthy for integration: No
tests: checkintests mustella/gumbo/components/Application, gumbo/components/ButtonBar, gumbo/containers/Panel, apollo/gumbo/spark/Window, containers/ViewStack, containers/Accordion,

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/skins/spark/SparkChromeWindowedApplicationSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NavigatorChild.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/spark/src/spark/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.as</path>
<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/controls/NavBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatable.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/INavigatorContent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/PanelSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IDeferredContentOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/ApplicationSkin.mxml</path>

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

--- frameworks/projects/framework/src/mx/managers/FocusManager.as
+++ frameworks/projects/framework/src/mx/managers/FocusManager.as
@@ -838,11 +838,14 @@
         form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownCaptureHandler, true);
         form.addEventListener(KeyboardEvent.KEY_DOWN, defaultButtonKeyHandler);
         form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
-        // AIR Window events, but don't want to link in AIREvent
-        // use capture phase because these get sent by the main Window
-        // and we might be managing a popup in that window
-        sm.addEventListener("windowActivate", activateWindowHandler, true, 0, true);
-        sm.addEventListener("windowDeactivate", deactivateWindowHandler, true, 0, true);
+        if (sm)
+        {
+            // AIR Window events, but don't want to link in AIREvent
+            // use capture phase because these get sent by the main Window
+            // and we might be managing a popup in that window
+            sm.addEventListener("windowActivate", activateWindowHandler, true, 0, true);
+            sm.addEventListener("windowDeactivate", deactivateWindowHandler, true, 0, true);
+        }

         activated = true;
         dispatchEvent(new FlexEvent(FlexEvent.FLEX_WINDOW_ACTIVATE));


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19635
Author:   aharui@adobe.com
Date:     2011-01-07T00:25:18.039632Z

Log Message:
-----------
revert the layout changes from svn 18635.  Management feels that there isn't enough time to thoroughly test the changes.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/layoutClasses/PriorityQueue.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Application.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/SkinnableContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/controls/SWFLoader.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/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/BasicLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/IconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/core/SpriteVisualElement.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/IContainerInvalidating.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/DefaultItemRenderer.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ILayoutManagerContainerClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TabbedViewNavigatorApplicationSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/IStyleManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/LayoutManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

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

--- frameworks/projects/spark/src/spark/components/PopUpAnchor.as
+++ frameworks/projects/spark/src/spark/components/PopUpAnchor.as
@@ -21,12 +21,10 @@
 import flash.geom.Point;
 import flash.geom.Rectangle;

-import mx.core.FlexVersion;
 import mx.core.IFlexDisplayObject;
 import mx.core.IUIComponent;
 import mx.core.LayoutDirection;
 import mx.core.UIComponent;
-import mx.core.UIComponentGlobals;
 import mx.core.mx_internal;
 import mx.managers.PopUpManager;
 import mx.styles.ISimpleStyleClient;
@@ -196,8 +194,6 @@
     //  displayPopUp
     //----------------------------------

-    private var displayPopUpChanged:Boolean;
-
     private var _displayPopUp:Boolean = false;

@@ -218,12 +214,7 @@
             return;

         _displayPopUp = value;
-
-        displayPopUpChanged = true;
-        // request validation of display list so we
-        // know our size before putting up the popup
-        // and sizing it
-        invalidateDisplayList();
+        addOrRemovePopUp();
     }

     /**
@@ -327,9 +318,7 @@
      */
     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        super.updateDisplayList(unscaledWidth, unscaledHeight);
-        if (displayPopUpChanged)
-            addOrRemovePopUp();
+        super.updateDisplayList(unscaledWidth, unscaledHeight);
         applyPopUpTransform(unscaledWidth, unscaledHeight);
     }

@@ -501,20 +490,13 @@
             popUpIsDisplayed = true;
             if (popUp is UIComponent && !popUpSizeCaptured)
             {
-				if (FlexVersion.compatibilityVersion >= FlexVersion.VERSION_4_5)
-				{
-					UIComponentGlobals.layoutManager.validateClient(UIComponent(popUp), true);
-					popUpWidth = UIComponent(popUp).getExplicitOrMeasuredWidth();
-					popUpHeight = UIComponent(popUp).getExplicitOrMeasuredHeight();
-				}
-				else
-				{
-	                popUpWidth = UIComponent(popUp).explicitWidth;
-	                popUpHeight = UIComponent(popUp).explicitHeight;
-	                UIComponent(popUp).validateNow();
-				}
+                popUpWidth = UIComponent(popUp).explicitWidth;
+                popUpHeight = UIComponent(popUp).explicitHeight;
+                UIComponent(popUp).validateNow();
                 popUpSizeCaptured = true;
             }
+
+            applyPopUpTransform(width, height);
         }
         else if (DisplayObject(popUp).parent != null && displayPopUp == false)
         {
@@ -596,17 +578,14 @@
         if (popUp is UIComponent)
         {
             if (popUpWidthMatchesAnchorWidth)
-                UIComponent(popUp).width = popUpWidth = unscaledWidth;
-			else if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+                UIComponent(popUp).width = unscaledWidth;
+            else
                 UIComponent(popUp).explicitWidth = popUpWidth;

             if (popUpHeightMatchesAnchorHeight)
-                UIComponent(popUp).height = popUpHeight = unscaledHeight;
-			else if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_4_5)
+                UIComponent(popUp).height = unscaledHeight;
+            else
                 UIComponent(popUp).explicitHeight = popUpHeight;
-            // validate now because the popup is higher in the nest level than the
-            // PopUpAnchor
-            UIComponent(popUp).validateNow();
         }
         else
         {


Transferred from the Adobe Open Source Subversion Repository

Revision: 9211
Author:   hmuller@adobe.com
Date:     2009-08-10T21:50:20.402032Z

Log Message:
-----------
Corrected two alignment=JUSTIFY problems exposed by this bug:

- VerticalLayout/updateDisplayListVirtual() methods unconditionally
used LinearLayoutVector.minorSize for the contentWidth.  If
horizontalAlign=JUSTIFY then the contentWidth is less than or equal to
the "targetWidth", i.e. the target's width less the left/right
padding.  HorizontalLayout is similar.

- DataGroup/getVirtualElementAt() now initializes the new renderer's
width and height with setLayoutBoundsSize(), before calling validateNow().
If  VerticalLayout.horizontalAlign=JUSTIFY, the (renderer's) width is
the DataGroup's width less padding and height is NaN.   HorizontalLayout
is similar.

The signature for GroupBase/getVirtualElementAt() has changed, two optional
parameters were added:

  public function getVirtualElementAt(index:int, eltWidth:Number=NaN, eltHeight:Number=NaN):IVisualElement

QE Notes: API change should not affect tests.  Mustella datagroup, viewport, and layout tests pass.
Doc Notes: ASDoc revisions in all classes
Bugs: sdk-22017
Reviewer: Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/layouts/HorizontalLayout.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/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
+++ frameworks/projects/spark/src/spark/layouts/VerticalLayout.as
@@ -19,7 +19,6 @@
 import mx.events.PropertyChangeEvent;

 import spark.components.supportClasses.GroupBase;
-import spark.core.NavigationUnit;
 import spark.core.NavigationUnit;
 import spark.layouts.supportClasses.LayoutBase;
 import spark.layouts.supportClasses.LayoutElementHelper;
@@ -1075,27 +1074,26 @@

     /**
      *  @private
-     *
      *  Syncs the LinearLayoutVector llv with typicalLayoutElement and
      *  the target's numElements.  Calling this function accounts
      *  for the possibility that the typicalLayoutElement has changed, or
      *  something that its preferred size depends on has changed.
      */
-     private function updateLLV(layoutTarget:GroupBase):void
-     {
+    private function updateLLV(layoutTarget:GroupBase):void
+    {
         var typicalElt:ILayoutElement = typicalLayoutElement;
         if (typicalElt)
         {
             var typicalWidth:Number = typicalElt.getPreferredBoundsWidth();
             var typicalHeight:Number = typicalElt.getPreferredBoundsHeight();
             llv.minorSize = Math.max(llv.minorSize, typicalWidth);
-            llv.defaultMajorSize = typicalHeight;
+            llv.defaultMajorSize = typicalHeight;
         }
         if (layoutTarget)
             llv.length = layoutTarget.numElements;
         llv.gap = gap;
         llv.majorAxisOffset = paddingTop;
-     }
+    }

     /**
      *  @private
@@ -1476,8 +1474,11 @@
         var fixedRowHeight:Number = NaN;
         if (!variableRowHeight)
             fixedRowHeight = rowHeight;  // may query typicalLayoutElement, elt at index=0
-
-        var contentWidth:Number = llv.minorSize;
+
+        var justifyWidths:Boolean = horizontalAlign == HorizontalAlign.JUSTIFY;
+        var eltWidth:Number = (justifyWidths) ? targetWidth : NaN;
+        var eltHeight:Number = NaN;
+        var contentWidth:Number = (justifyWidths) ? Math.max(llv.minMinorSize, targetWidth) : llv.minorSize;
         var containerWidth:Number = Math.max(contentWidth, targetWidth);
         var y:Number = llv.start(startIndex);
         var index:int = startIndex;
@@ -1487,7 +1488,7 @@
         // current contentWidth; cache computed widths/heights in llv.
         for (; (y < maxVisibleY) && (index < eltCount); index++)
         {
-            var elt:ILayoutElement = layoutTarget.getVirtualElementAt(index);
+            var elt:ILayoutElement = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight);
             var w:Number = calculateElementWidth(elt, targetWidth, containerWidth); // can be NaN
             var h:Number = fixedRowHeight; // NaN for variable height rows
             elt.setLayoutBoundsSize(w, h);
@@ -1502,15 +1503,15 @@

         // Second pass: if neccessary, fix up x and width values based
         // on the updated contentWidth
-        if (llv.minorSize != contentWidth)
+        if (!justifyWidths && (llv.minorSize != contentWidth))
         {
             contentWidth = llv.minorSize;
             containerWidth = Math.max(contentWidth, targetWidth);
-            if ((horizontalAlign != HorizontalAlign.LEFT) && (horizontalAlign != HorizontalAlign.JUSTIFY))
+            if (horizontalAlign != HorizontalAlign.LEFT)
             {
                 for (index = startIndex; index <= endIndex; index++)
                 {
-                    elt = layoutTarget.getVirtualElementAt(index);
+                    elt = layoutTarget.getVirtualElementAt(index, eltWidth, eltHeight);
                     w = calculateElementWidth(elt, targetWidth, containerWidth);  // can be NaN
                     elt.setLayoutBoundsSize(w, elt.getLayoutBoundsHeight());
                     w = elt.getLayoutBoundsWidth();
@@ -1525,8 +1526,9 @@

         // Make sure that if the content spans partially over a pixel to the right/bottom,
         // the content size includes the whole pixel.
-        layoutTarget.setContentSize(Math.ceil(contentWidth + paddingLeft + paddingRight),
-                                    Math.ceil(llv.end(llv.length - 1) + paddingBottom));
+        var paddedContentWidth:Number = Math.ceil(contentWidth + paddingLeft + paddingRight);
+        var paddedContentHeight:Number = Math.ceil(llv.end(llv.length - 1) + paddingBottom);
+        layoutTarget.setContentSize(paddedContentWidth, paddedContentHeight);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5098
Author:   gauravj@adobe.com
Date:     2009-02-27T02:21:27.489350Z

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

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

Modified Paths:
--------------
151 paths were modified

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -28,6 +28,11 @@
  *  coordinate space, filled with bitmap data drawn from a source file.
  *
  *  @includeExample examples/BitmapGraphicExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 public class BitmapGraphic extends GraphicElement
 {
@@ -41,6 +46,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function BitmapGraphic()
     {
@@ -70,16 +80,31 @@
     //----------------------------------
     /**
      *  The default state.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected static const _NORMAL_UINT:uint = 0;

     /**
      *  Repeats the graphic.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected static const _REPEAT_UINT:uint = 1;

     /**
      *  Scales the graphic.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected static const _SCALE_UINT:uint = 2;

@@ -90,6 +115,11 @@
      *  @param value The String to convert.
      *
      *  @return The uint representation of the enum values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected static function resizeModeToUINT(value:String):uint
     {
@@ -108,6 +138,11 @@
      *  @param value The uint to convert.
      *
      *  @return The String representation of the enum values.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     protected static function resizeModeToString(value:uint):String
     {
@@ -141,6 +176,11 @@
      *  stretches to fill the region.
      *
      *  @default BitmapResizeMode.NORMAL
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get resizeMode():String
     {
@@ -172,6 +212,11 @@
      *  Set to false to end the fill at the edge of the region.
      *
      *  @default true
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get repeat():Boolean
     {
@@ -228,6 +273,11 @@
      *  @see flash.display.Bitmap
      *  @see flash.display.BitmapData
      *  @see mx.graphics.BitmapFill
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function get source():Object
     {
@@ -315,6 +365,11 @@
      *  @copy flash.display.GraphicsBitmapFill#smooth
      *
      *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     public function set smooth(value:Boolean):void
     {
@@ -341,6 +396,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function measure():void
     {
@@ -350,6 +410,11 @@

     /**
      *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
      */
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 3482
Author:   egeorgie@adobe.com
Date:     2008-10-03T23:22:55.653759Z

Log Message:
-----------
Add resizeMode property to BitmapGraphic. Options are "Normal", "Repeat", "Scale"

Reviewed by Ely

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/graphics/BitmapGraphic.as</path>

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -39,112 +39,186 @@
  */
 public class BitmapGraphic extends GraphicElement implements IDisplayObjectElement
 {
-    include "../core/Version.as";
-
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Constructor.
-     */
-    public function BitmapGraphic()
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function BitmapGraphic()
+	{
+		super();
+
+		_fill = new BitmapFill();
+	}
+
+	private var _fill:BitmapFill;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Properties
+	//
+	//--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  alwaysNeedsDisplayObject
+	//----------------------------------
+
+	private var _alwaysNeedsDisplayObject:Boolean = false;
+
+	/*
+	 *  Set this to true to force the Graphic Element to create an underlying Shape
+	 */
+	mx_internal function set alwaysNeedsDisplayObject(value:Boolean):void
+	{
+		if (value != _alwaysNeedsDisplayObject)
+		{
+			_alwaysNeedsDisplayObject = value;
+			notifyElementLayerChanged();
+		}
+	}
+
+	mx_internal function get alwaysNeedsDisplayObject():Boolean
+	{
+		return _alwaysNeedsDisplayObject;
+	}
+
+    //----------------------------------
+    //  resizeMode
+    //----------------------------------
+    protected static const _NORMAL_UINT:uint = 0;
+    protected static const _REPEAT_UINT:uint = 1;
+    protected static const _SCALE_UINT:uint = 2;
+
+    /**
+     *  Converts from the String to the uint
+     *  representation of the enum values.
+     */
+    protected static function resizeModeToUINT(value:String):uint
     {
-        super();
-
-        _fill = new BitmapFill();
-    }
-
-    private var _fill:BitmapFill;
-
-    //--------------------------------------------------------------------------
-    //
-    //  Properties
-    //
-    //--------------------------------------------------------------------------
-
-    //----------------------------------
-    //  alwaysNeedsDisplayObject
-    //----------------------------------
-
-    private var _alwaysNeedsDisplayObject:Boolean = false;
-
-    /*
-     *  Set this to true to force the Graphic Element to create an underlying Shape
-     */
-    mx_internal function set alwaysNeedsDisplayObject(value:Boolean):void
-    {
-        if (value != _alwaysNeedsDisplayObject)
+        switch(value)
         {
-            _alwaysNeedsDisplayObject = value;
-            notifyElementLayerChanged();
+            case BitmapResizeMode.REPEAT: return _REPEAT_UINT;
+            case BitmapResizeMode.SCALE: return _SCALE_UINT;
+            default: return _NORMAL_UINT;
         }
     }
-
-    mx_internal function get alwaysNeedsDisplayObject():Boolean
+
+    /**
+     *  Converts from the uint to the String
+     *  representation of the enum values.
+     */
+    protected static function resizeModeToString(value:uint):String
     {
-        return _alwaysNeedsDisplayObject;
+        switch(value)
+        {
+            case _REPEAT_UINT: return BitmapResizeMode.REPEAT;
+            case _SCALE_UINT: return BitmapResizeMode.SCALE;
+            default: return BitmapResizeMode.NORMAL;
+        }
     }
-
-    //----------------------------------
-    //  repeat
-    //----------------------------------

     /**
      *  @private
      */
-    protected var _repeat:Boolean = true;
+    protected var _resizeMode:uint = _REPEAT_UINT;

     [Bindable("propertyChange")]
     [Inspectable(category="General")]
-
-    /**
-     *  Whether the bitmap is repeated to fill the area. Set to true to cause
-     *  the fill to tile outward to the edges of the filled region.
-     *  Set to false to end the fill at the edge of the region.
+
+    /**
+     *  The resizeMode determines how the bitmap fills in the dimensions.
+     *
+     *  When set to BitmapResizeMode.NORMAL, the bitmap will
+     *  end at the edge of the region.
+     *
+     *  When set to BitmapResizeMode.REPEAT, the bitmap will
+     *  be repeated to fill the region.
      *
-     *  @default true
-     */
-    public function get repeat():Boolean
+     *  When set to BitmapResizeMode.SCALE, the bitmap will
+     *  stretch to fill the region.
+     *
+     *  @default BitmapResizeMode.NORMAL
+     */
+    public function get resizeMode():String
     {
-        return _repeat;
+        return resizeModeToString(_resizeMode);
     }

-    /**
-     *  @private
-     */
-    public function set repeat(value:Boolean):void
+    public function set resizeMode(mode:String):void
     {
-        var oldValue:Boolean = _repeat;
-
+        var value:uint = resizeModeToUINT(mode);
+        var oldValue:uint = _resizeMode;
+        var oldRepeat:Boolean = repeat;
         if (value != oldValue)
         {
-            _repeat = value;
+            _resizeMode = value;
             invalidateDisplayList();
-            //dispatchPropertyChangeEvent("repeat", oldValue, value);
+            dispatchPropertyChangeEvent("resizeMode", oldValue, value);
         }
+        if (repeat != oldRepeat)
+        {
+            dispatchPropertyChangeEvent("repeat", oldValue, repeat);
+        }
     }

-    //----------------------------------
-    //  source
-    //----------------------------------
-
-    [Bindable("propertyChange")]
-    [Inspectable(category="General")]
-
-    /**
-     *  The source used for the bitmap fill. The fill can render from various graphical
-     *  sources, including the following:
-     *

-     *
A Bitmap or BitmapData instance.

-     *
A class representing a subclass of DisplayObject. The BitmapFill instantiates
-     *       the class and creates a bitmap rendering of it.

-     *
An instance of a DisplayObject. The BitmapFill copies it into a Bitmap for filling.

-     *
The name of a subclass of DisplayObject. The BitmapFill loads the class, instantiates it,
-     *       and creates a bitmap rendering of it.

-     *

+	//----------------------------------
+	//  repeat
+	//----------------------------------
+
+	[Bindable("propertyChange")]
+	[Inspectable(category="General")]
+
+	/**
+	 *  Whether the bitmap is repeated to fill the area. Set to true to cause
+	 *  the fill to tile outward to the edges of the filled region.
+	 *  Set to false to end the fill at the edge of the region.
+	 *
+	 *  @default true
+	 */
+	public function get repeat():Boolean
+	{
+		return _resizeMode == _REPEAT_UINT;
+	}
+
+    /**
+     *  @private
+     */
+	public function set repeat(value:Boolean):void
+	{
+		var oldValue:Boolean = repeat;
+
+		if (value != oldValue)
+		{
+		    resizeMode = value ? BitmapResizeMode.REPEAT : BitmapResizeMode.NORMAL;
+			invalidateDisplayList();
+			dispatchPropertyChangeEvent("repeat", oldValue, value);
+		}
+	}
+
+	//----------------------------------
+	//  source
+	//----------------------------------
+
+	[Bindable("propertyChange")]
+	[Inspectable(category="General")]
+
+	/**
+	 *  The source used for the bitmap fill. The fill can render from various graphical
+	 *  sources, including the following:
+	 *

+	 *
A Bitmap or BitmapData instance.

+	 *
A class representing a subclass of DisplayObject. The BitmapFill instantiates
+	 *       the class and creates a bitmap rendering of it.

+	 *
An instance of a DisplayObject. The BitmapFill copies it into a Bitmap for filling.

+	 *
The name of a subclass of DisplayObject. The BitmapFill loads the class, instantiates it,
+	 *       and creates a bitmap rendering of it.

+	 *

      *
      *
If you use an image file for the source, it can be of type PNG, GIF, or JPG.

      *
@@ -160,150 +234,173 @@
      *  @see flash.display.Bitmap
      *  @see flash.display.BitmapData
      *  @see mx.graphics.BitmapFill
-     */
-    public function get source():Object
-    {
-        return _fill.source;
-    }
-
+	 */
+	public function get source():Object
+	{
+		return _fill.source;
+	}
+
     /**
      *  @private
      */
-    public function set source(value:Object):void
-    {
-        var oldValue:Object = _fill.source;
-
-        if (value != oldValue)
-        {
-            var bitmapData:BitmapData;
-            var tmpSprite:DisplayObject;
-
-            // This code stolen from BitmapFill. The only change is to make the BitmapData transparent.
-            if (value is Class)
-            {
-                var cls:Class = Class(value);
-                tmpSprite = new cls();
-            }
-            else if (value is BitmapData)
-            {
-                bitmapData = value as BitmapData;
-            }
-            else if (value is Bitmap)
-            {
-                bitmapData = value.bitmapData;
-            }
-            else if (value is DisplayObject)
-            {
-                tmpSprite = value as DisplayObject;
-            }
-            else if (value is String)
-            {
-                var tmpClass:Class = Class(getDefinitionByName(String(value)));
-                tmpSprite = new tmpClass();
-            }
-            else
-            {
-                return;
-            }
-
-            if (!bitmapData && tmpSprite)
-            {
-                bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
-                bitmapData.draw(tmpSprite, new Matrix());
-            }
-
-            _fill.source = bitmapData;
-            dispatchPropertyChangeEvent("source", oldValue, value);
-            invalidateSize();
-            invalidateDisplayList();
-        }
-    }
-
-    //----------------------------------
-    //  smooth
-    //----------------------------------
-
-    private var _smooth:Boolean = false;
-
-    [Inspectable(category="General")]
-
-    /**
+	public function set source(value:Object):void
+	{
+		var oldValue:Object = _fill.source;
+
+		if (value != oldValue)
+		{
+			var bitmapData:BitmapData;
+			var tmpSprite:DisplayObject;
+
+			// This code stolen from BitmapFill. The only change is to make the BitmapData transparent.
+			if (value is Class)
+			{
+				var cls:Class = Class(value);
+				tmpSprite = new cls();
+			}
+			else if (value is BitmapData)
+			{
+				bitmapData = value as BitmapData;
+			}
+			else if (value is Bitmap)
+			{
+				bitmapData = value.bitmapData;
+			}
+			else if (value is DisplayObject)
+			{
+				tmpSprite = value as DisplayObject;
+			}
+			else if (value is String)
+			{
+				var tmpClass:Class = Class(getDefinitionByName(String(value)));
+				tmpSprite = new tmpClass();
+			}
+			else
+			{
+				return;
+			}
+
+			if (!bitmapData && tmpSprite)
+			{
+				bitmapData = new BitmapData(tmpSprite.width, tmpSprite.height, true, 0);
+				bitmapData.draw(tmpSprite, new Matrix());
+			}
+
+			_fill.source = bitmapData;
+			dispatchPropertyChangeEvent("source", oldValue, value);
+			invalidateSize();
+			invalidateDisplayList();
+		}
+	}
+
+	//----------------------------------
+	//  smooth
+	//----------------------------------
+
+	private var _smooth:Boolean = false;
+
+	[Inspectable(category="General")]
+
+	/**
      *  @copy flash.display.GraphicsBitmapFill#smooth
-     *
-     *  @default false
-     */
-    public function set smooth(value:Boolean):void
-    {
-        if (value != _smooth)
-        {
-            _smooth = value;
-            invalidateDisplayList();
-        }
-    }
-
+	 *
+	 *  @default false
+	 */
+	public function set smooth(value:Boolean):void
+	{
+		if (value != _smooth)
+		{
+			_smooth = value;
+			invalidateDisplayList();
+		}
+	}
+
     /**
      *  @private
      */
-    public function get smooth():Boolean
-    {
-        return _smooth;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  IGraphicElement Implementation
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @inheritDoc
-     */
+	public function get  smooth():Boolean
+	{
+		return _smooth;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IGraphicElement Implementation
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @inheritDoc
+	 */
     override protected function measure():void
     {
         measuredWidth = source ? source.width : 0;
         measuredHeight = source ? source.height : 0;
     }
-
-    /**
-     *  @inheritDoc
-     */
+
+	/**
+	 *  @inheritDoc
+	 */
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
-    {
-        /* if (!displayObject || !(displayObject is Sprite))
-            return; */
+	{
+	    /* if (!displayObject || !(displayObject is Sprite))
+	        return; */

         if (displayObject is Sprite)
             Sprite(displayObject).graphics.clear();
         else if (displayObject is Shape)
             Shape(displayObject).graphics.clear();

-        var g:Graphics = Sprite(drawnDisplayObject).graphics;
-
-        g.lineStyle();
-        _fill.offsetX = drawX;
-        _fill.offsetY = drawY;
-        _fill.repeat = repeat;
-        _fill.smooth = smooth;
-        var w:Number = unscaledWidth;
-        var h:Number = unscaledHeight;
-
-        if (!repeat && source)
+	    var g:Graphics = Sprite(drawnDisplayObject).graphics;
+
+		g.lineStyle();
+		_fill.offsetX = drawX;
+		_fill.offsetY = drawY;
+		_fill.smooth = smooth;
+		_fill.repeat = false;
+		_fill.scaleX = 1;
+		_fill.scaleY = 1;
+		var fillWidth:Number;
+		var fillHeight:Number;
+
+        switch(_resizeMode)
         {
-            w = Math.min(w, source.width);
-            h = Math.min(h, source.height);
+            case _NORMAL_UINT:
+                fillWidth = Math.min(unscaledWidth, source.width);
+                fillHeight = Math.min(unscaledHeight, source.height);
+            break;
+
+            case _REPEAT_UINT:
+                if (source)
+                {
+                    _fill.repeat = true;
+                    fillWidth = unscaledWidth;
+                    fillHeight = unscaledHeight;
+                }
+            break;
+
+            case _SCALE_UINT:
+                if (source)
+                {
+                    _fill.scaleX = unscaledWidth / source.width;
+                    _fill.scaleY = unscaledHeight / source.height;
+                    fillWidth = source.width;
+                    fillHeight = source.height;
+                }
+            break;
         }
-
-        _fill.begin(g, new Rectangle(w, h));
-        g.drawRect(drawX, drawY, w, h);
-        _fill.end(g);
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  IAssignableDisplayObject Implementation
-    //
-    //--------------------------------------------------------------------------
+
+	    _fill.begin(g, new Rectangle(fillWidth, fillHeight));
+		g.drawRect(drawX, drawY, unscaledWidth, unscaledHeight);
+		_fill.end(g);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  IAssignableDisplayObject Implementation
+	//
+	//--------------------------------------------------------------------------

 }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

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

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

--- frameworks/projects/spark/src/spark/primitives/BitmapImage.as
+++ frameworks/projects/spark/src/spark/primitives/BitmapImage.as
@@ -242,13 +242,13 @@
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
 	{
-	    if (!displayObject || !(displayObject is Sprite))
-	        return;
-	    var g:Graphics = Sprite(displayObject).graphics;
+	    /* if (!displayObject || !(displayObject is Sprite))
+	        return; */
+	    var g:Graphics = Sprite(drawnDisplayObject).graphics;

 	    // TODO EGeorgie: clearing the graphics needs to be shared when
 	    // the display objects are shared.
-	    g.clear();
+	    //g.clear();

 		g.lineStyle(0,0,0);
 		_fill.offsetX = 0;
@@ -265,7 +265,7 @@
 		}

 		_fill.begin(g, new Rectangle(w, h));
-		g.drawRect(0, 0, w, h);
+		g.drawRect(drawX, drawY, w, h);
 		_fill.end(g);
 	}


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6848
Author:   jimurphy@adobe.com
Date:     2009-05-12T18:08:01.935683Z

Log Message:
-----------
apply 3.x change 6262 to trunk.  The original merge did not happen correctly. This change will also be merged down to beta1.

Revision: 6262 [ http://p01weblab02.macromedia.com/viewvc/opensource?view=rev&revision=6262 ]
Author:   rfrishbe@adobe.com
Date:     2009-04-24 15:22:01 -0700 (Fri, 24 Apr 2009)

Log Message:
-----------
Moving a fix for SDK-18864 from trunk in to 3.x.

QE Notes: -
Doc Notes: -
Bugs: SDK-18864
Reviewer: -
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as

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

--- frameworks/projects/mx/src/mx/core/Container.as
+++ frameworks/projects/mx/src/mx/core/Container.as
@@ -2341,10 +2341,34 @@
         }
     }

+	/**
+     *  @private
+     *  We're doing special behavior on addEventListener to make sure that
+     *  we successfully capture mouse events, even when there's no background.
+     *  However, this means adding an event listener changes the behavior
+     *  a little, and this can be troublesome for overlapping components
+     *  that now don't get any mouse events.  This is acceptable normally;
+     *  however, automation adds certain events to the Container, and
+     *  it'd be better if automation support didn't modify the behavior of
+     *  the component.  For this reason, especially, we have an mx_internal
+     *  $addEventListener to add event listeners without affecting the behavior
+     *  of the component.
+     */
+    mx_internal function $addEventListener(
+                            type:String, listener:Function,
+                            useCapture:Boolean = false,
+                            priority:int = 0,
+                            useWeakReference:Boolean = false):void
+    {
+        super.addEventListener(type, listener, useCapture,
+                               priority, useWeakReference);
+    }
+
     /**
      *  @private
      *  Remove the mouse shield if we no longer listen to any mouse events
      */
+
     override public function removeEventListener(
                                     type:String, listener:Function,
                                     useCapture:Boolean = false):void
@@ -2369,6 +2393,26 @@
                 setStyle("mouseShieldChildren", false);
             }
         }
+    }
+
+	 /**
+     *  @private
+     *  We're doing special behavior on removeEventListener to make sure that
+     *  we successfully capture mouse events, even when there's no background.
+     *  However, this means removing an event listener changes the behavior
+     *  a little, and this can be troublesome for overlapping components
+     *  that now don't get any mouse events.  This is acceptable normally;
+     *  however, automation adds certain events to the Container, and
+     *  it'd be better if automation support didn't modify the behavior of
+     *  the component.  For this reason, especially, we have an mx_internal
+     *  $removeEventListener to remove event listeners without affecting the behavior
+     *  of the component.
+     */
+    mx_internal function $removeEventListener(
+                              type:String, listener:Function,
+                              useCapture:Boolean = false):void
+    {
+        super.removeEventListener(type, listener, useCapture);
     }

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


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

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

 package mx.automation.delegates.controls
 {


--- src/org/igniterealtime/xiff/core/XMPPConnection.as
+++ src/org/igniterealtime/xiff/core/XMPPConnection.as
@@ -1,20 +1,20 @@
 /*
  * Copyright (C) 2003-2009 Igniterealtime Community Contributors
- *
+ *
  *     Daniel Henninger
  *     Derrick Grigg <dgrigg@rogers.com>
  *     Juga Paazmaya <olavic@gmail.com>
  *     Nick Velloff <nick.velloff@gmail.com>
  *     Sean Treadway <seant@oncotype.dk>
  *     Sean Voisen <sean@voisen.org>
- *
- *
+ *
+ *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
- *
+ *
  *     http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -784,7 +784,7 @@
 		{
 			// TODO: Build a proper extension which takes care XML building.
 			var ask:XML = <compress xmlns="http://jabber.org/protocol/compress"><method>zlib</method></compress>;
-			sendXML(ask); // XML
+			sendXML(ask); // XML
 		}

 		/**
@@ -818,7 +818,7 @@
 		{
 			var iq:IQ = new IQ();
 			// Populate the IQ with the incoming data
-			if ( !iq.deserialize( node ) )
+			if ( !iq.deserialize( node ) )
 			{
 				throw new SerializationException();
 			}
@@ -1106,6 +1106,8 @@
 		 */
 		protected function sendXML( someData:* ):void
 		{
+			someData = someData is XML ? XML( someData ).toXMLString() : someData;
+
 			var bytedata:ByteArray = new ByteArray();
 			bytedata.writeUTFBytes(someData);

@@ -1155,6 +1157,7 @@
 				}
 				else
 				{
+					// ? dispatchError( "not-authorized", "Not Authorized", "auth", 401 );
 					dispatchError("Authentication Error", "", "", 401);
 					disconnect();
 				}


Bug 650835 addendum: modify test to finish sooner on slow machines so that test does not time out when running in ATS (r=cpeyer)

--- test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
+++ test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
@@ -57,15 +57,32 @@
     }
 }

+var i_loops = 1000;
+var j_loops = 2500;
+
+// Need to reduce the number of loops on slow machines so test does
+// not time out in the player
+var start = new Date();
+var a = []
+for (var i=0; i<25000; i++)
+    a[0] = 3.14159 + i*i;
+var loop_time = new Date() - start;
+trace("loop_time: "+loop_time);
+if (loop_time > 14) {
+    i_loops = 900;
+    j_loops = 1000;
+}
+
+
 var fractions = [Number.MIN_VALUE, 0, -0, 0.2499999, 0.25, 0.5, 0.75, 1.0];
 for each(var f in fractions) {
     trace("starting pauseForGCIfCollectionImminent test @ " + f);

     var hits = 0;
     var a = [];
-    for (var i = 0; i < 1000; i++) {
-        for (var j = 0; j < 500; j++)
-        a[0] = 3.14159 + i * j; // compute a Number and store it in a * location to box it
+    for (var i = 0; i < i_loops; i++) {
+        for (var j = 0; j < j_loops; j++)
+            a[0] = 3.14159 + i * j; // compute a Number and store it in a * location to box it
         var before = System.totalMemory - System.freeMemory;
         System.pauseForGCIfCollectionImminent(f);
         var after = System.totalMemory - System.freeMemory;
@@ -80,6 +97,8 @@
                 true,
                 ((hits > 0) == (f < 1.0)));
 }
+
+trace("Finished loop portion")

 // Error cases
 if (playerType == 'AVMPlus') {
@@ -103,4 +122,5 @@
                 expected_error, error);
 }

+trace("Total Runtime: "+(new Date() - start))
 test();


Fix bug when pressing edge buttons that wrapped around and toggled buttons on the other side.


Added test code to draw lines between points, commented out.

--- WeaveUI/src/weave/visualization/plotters/CircleGlyphPlotter.as
+++ WeaveUI/src/weave/visualization/plotters/CircleGlyphPlotter.as
@@ -19,6 +19,7 @@

 package weave.visualization.plotters
 {
+	import flash.display.BitmapData;
 	import flash.display.Graphics;
 	import flash.display.Shape;
 	import flash.geom.Point;
@@ -74,14 +75,22 @@
 		 */
 		public const fillStyle:DynamicFillStyle = newLinkableChild(this, DynamicFillStyle);

+		override public function drawPlot(recordKeys:Array, dataBounds:IBounds2D, screenBounds:IBounds2D, destination:BitmapData):void
+		{
+			tempPoint.x = NaN;
+			tempPoint.y = NaN;
+			super.drawPlot(recordKeys, dataBounds, screenBounds, destination);
+		}
+
 		/**
 		 * This function may be defined by a class that extends AbstractPlotter to use the basic template code in AbstractPlotter.drawPlot().
 		 */
 		override protected function addRecordGraphicsToTempShape(recordKey:IQualifiedKey, dataBounds:IBounds2D, screenBounds:IBounds2D, tempShape:Shape):void
-		{
+		{
+//			var hasPrevPoint:Boolean = (isFinite(tempPoint.x) && isFinite(tempPoint.y));
 			var graphics:Graphics = tempShape.graphics;

-			// project data coordinates to screen coordinates and draw graphics
+			// project data coordinates to screen coordinates and draw graphics
 			var radius:Number = ColumnUtils.getNorm(screenRadius, recordKey);

 			tempPoint.x = getCoordFromRecordKey(recordKey, true);
@@ -89,30 +98,34 @@

 			dataBounds.projectPointTo(tempPoint, screenBounds);

-			lineStyle.beginLineStyle(recordKey, graphics);
-			fillStyle.beginFillStyle(recordKey, graphics);
-			if (enabledSizeBy.value == true)
-			{
+			lineStyle.beginLineStyle(recordKey, graphics);
+			fillStyle.beginFillStyle(recordKey, graphics);
+			if (enabledSizeBy.value == true)
+			{
 				radius = minScreenRadius.value + (radius *(maxScreenRadius.value - minScreenRadius.value));
 			}
-			else
-			{
-				radius = defaultScreenRadius.value;
-			}
-			if (screenRadius.internalColumn != null && isNaN(radius)) // missing screenRadius value
-			{
-				radius = defaultScreenRadius.value;
+			else
+			{
+				radius = defaultScreenRadius.value;
+			}
+//			if (hasPrevPoint)
+//				graphics.lineTo(tempPoint.x, tempPoint.y);
+			if (screenRadius.internalColumn != null && isNaN(radius)) // missing screenRadius value
+			{
+				radius = defaultScreenRadius.value;
 				//draw a square for missing values
-				graphics.drawRect(tempPoint.x - radius, tempPoint.y - radius, radius * 2, radius * 2);
-			}
-			else if(isNaN(radius)) // no screenRadius column
-			{
-				graphics.drawCircle(tempPoint.x, tempPoint.y, defaultScreenRadius.value );
-			}
-			else {
-				graphics.drawCircle(tempPoint.x, tempPoint.y, radius);
-			}
-			graphics.endFill();
+				graphics.drawRect(tempPoint.x - radius, tempPoint.y - radius, radius * 2, radius * 2);
+			}
+			else if(isNaN(radius)) // no screenRadius column
+			{
+				graphics.drawCircle(tempPoint.x, tempPoint.y, defaultScreenRadius.value );
+			}
+			else
+			{
+				graphics.drawCircle(tempPoint.x, tempPoint.y, radius);
+			}
+			graphics.endFill();
+//			graphics.moveTo(tempPoint.x, tempPoint.y);
 		}
 		private static const tempPoint:Point = new Point(); // reusable object
 	}


remove Protocols and URl reference

remove Protocols and URl reference

--- src/com/google/analytics/v4/Tracker.as
+++ src/com/google/analytics/v4/Tracker.as
@@ -37,9 +37,11 @@
     import com.google.analytics.ecommerce.Transaction;
     import com.google.analytics.external.AdSenseGlobals;
     import com.google.analytics.utils.Environment;
-    import com.google.analytics.utils.Protocols;
-    import com.google.analytics.utils.URL;
     import com.google.analytics.utils.Variables;
+    import com.google.analytics.utils.getDomainFromHost;
+    import com.google.analytics.utils.getSubDomainFromHost;
+
+    import core.uri;

     import flash.net.URLRequest;
     import flash.net.navigateToURL;
@@ -443,23 +445,19 @@
          */
         private function _doTracking():Boolean
         {
-            if( (_info.protocol != Protocols.file) &&
-                (_info.protocol != Protocols.none) &&
+
+            if( (_info.protocol != "file") &&
+                (_info.protocol != "") &&
                 _isNotGoogleSearch() )
-                {
-                    return true;
-                }
+            {
+                return true;
+            }

             if( _config.allowLocalTracking )
             {
                 return true;
             }

-            /* TODO:
-               add logic for AIR and other running local exe
-               by default a SWF running ina projector or in AIR
-               will have a file:// protocol
-            */
             return false;
         }

@@ -490,6 +488,7 @@
          */
         private function _formatReferrer():String
         {
+
             var referrer:String = _info.referrer;

             //if there is no referrer
@@ -501,28 +500,36 @@
             else
             {
                 var domainName:String = _info.domainName;
-                var ref:URL = new URL( referrer );
-                var dom:URL = new URL( "http://" + domainName );
-
-                if( ref.hostName == domainName )
+                //var ref:URL = new URL( referrer );
+                //var dom:URL = new URL( "http://" + domainName );
+                var ref:uri = new uri( referrer );
+                var dom:uri = new uri( "http://" + domainName );
+
+                if( ref.host == domainName )
                 {
                     return "-";
                 }

+                var ref_d:String = getDomainFromHost( ref.host );
+                var ref_s:String = getSubDomainFromHost( ref.host );
+                var dom_d:String = getDomainFromHost( dom.host );
+                var dom_s:String = getSubDomainFromHost( dom.host );
+
                 /* If referrer is in the sub-domain of document,
                    then formatted referrer is set to "0".
                 */
-                if( dom.domain == ref.domain )
+                if( dom_d == ref_d )
                 {
                     //no self-referral
-                    if( dom.subDomain != ref.subDomain )
+                    if( dom_s != ref_s )
                     {
                         referrer = "0";
                     }
                 }

                 //no referrer if referrer is enclosed in square-brackets
-                if( (referrer.charAt(0) == "[") && (referrer.charAt(referrer.length-1)) )
+                if( (referrer.charAt(0) == "[") &&
+                    (referrer.charAt(referrer.length-1) == "]") )
                 {
                     referrer = "-";
                 }


Test commit rights, added a space in a comment.

--- src/flexlib/containers/AdvancedForm.as
+++ src/flexlib/containers/AdvancedForm.as
@@ -21,7 +21,7 @@
 SOFTWARE.
 */
 /*
-	Class that provides Reset and Undo/Redo functionality for a Form
+	Class t hat provides Reset and Undo/Redo functionality for a Form
 */
 package flexlib.containers
 {


fixed bug where hierarchy wouldn't update properly if multiple concurrent requests were made.

--- WeaveData/src/weave/data/DataSources/WeaveDataSource.as
+++ WeaveData/src/weave/data/DataSources/WeaveDataSource.as
@@ -458,6 +458,10 @@
 			var entityIds:Array = hierarcyNode_entityIds[1] as Array; // ordered list of ids
 			var orderLookup:Object = createLookup(entityIds);

+			hierarchyNode = _attributeHierarchy.getNodeFromPath(_attributeHierarchy.getPathFromNode(hierarchyNode));
+			if (!hierarchyNode)
+				return;
+
 			try
 			{
 				var entities:Array = event.result as Array;


updated getColumnByName function in CSVDataSource

--- WeaveData/src/weave/data/DataSources/CSVDataSource.as
+++ WeaveData/src/weave/data/DataSources/CSVDataSource.as
@@ -89,8 +89,12 @@
 		 */
 		public function getColumnByName(csvColumnName:String):IAttributeColumn
 		{
+			var sourceOwner:ILinkableHashMap = getLinkableOwner(this) as ILinkableHashMap;
+			if (!sourceOwner)
+				return null;
 			_reusableReference.hierarchyPath.value = <attribute title={csvColumnName} csvColumn={ csvColumnName }/>;
-			return getAttributeColumn(_reusableReference);
+			_reusableReference.dataSourceName.value = sourceOwner.getName(this);
+			return WeaveAPI.AttributeColumnCache.getColumn(_reusableReference);
 		}

 		// used by getColumnByName


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

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

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

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

 package mx.olap
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6265
Author:   gosmith@adobe.com
Date:     2009-04-24T22:52:56.350830Z

Log Message:
-----------
To make RichText more lightweight, it now uses the same technique as RichEditableText2 for its TLF hostFormat. In particular, it uses an object which is not actually a TextLayoutFormat, but instead simply implements ITextLayoutFormat by pulling the format properties directly from the component's CSS styles using getStyle(). This object is now implemented in a new CSSTextLayoutFormat class. It is smaller because it has only one var (for the object to call getStyle() on) rather than a var for every format property.

Also, the code in SimpleText, RichText, and RichEditableText2 for handling embedded fonts is now more uniform; all three classes use an identical getEmbeddedFontContext() method, which can eventually be factored into a base class or utility class after we determine the constellation of text classes that we'll ship with. I also made this code more efficient by using only a static instance of EmbeddedFont and TextFormat.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/core/CSSTextLayoutFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.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/framework/src/mx/core/EmbeddedFont.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/framework/src/mx/core/FlexModuleFactory.as
+++ frameworks/projects/framework/src/mx/core/FlexModuleFactory.as
@@ -37,7 +37,8 @@
 /**
  *  @private
  */
-public class FlexModuleFactory extends MovieClip implements IFlexModuleFactory, ITextLineCreator
+public class FlexModuleFactory extends MovieClip
+	implements IFlexModuleFactory, ITextLineCreator
 {
 	include "../core/Version.as";

@@ -207,25 +208,9 @@

 	//--------------------------------------------------------------------------
 	//
-	//  Methods
-	//
-	//--------------------------------------------------------------------------
-
-  	/**
-	 *  Implementation of ITextLineCreator.createTextLine
-   	 */
-    public function createTextLine(textBlock:TextBlock, previousLine:TextLine=null, width:Number=1000000, lineOffset:Number=0.0, fitSomething:Boolean=false):TextLine
-    {
-	    return textBlock.createTextLine(previousLine, width, lineOffset, fitSomething);
-    }
-
-  	/**
-	 *  Implementation of ITextLineCreator.recreateTextLine
-   	 */
-    public function recreateTextLine(textBlock:TextBlock, textLine:TextLine, previousLine:TextLine=null, width:Number=1000000, lineOffset:Number=0.0, fitSomething:Boolean=false):TextLine
-    {
-	    return textBlock["recreateTextLine"] ? textBlock["recreateTextLine"](textLine, previousLine, width, lineOffset, fitSomething) : null;
-    }
+	//  Methods: IFlexModuleFactory
+	//
+	//--------------------------------------------------------------------------

   	/**
    	 *  @private
@@ -255,6 +240,60 @@
     {
         return {};
     }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods: ITextLineCreator
+	//
+	//--------------------------------------------------------------------------
+
+    /**
+	 *  Calls createTextLine() on the specified TextBlock
+	 *  with the specified parameters.
+	 *  In order for a TextLine to use an embedded font,
+	 *  it must be created in the SWF where the font is.
+	 *  This factory method makes that possible.
+   	 */
+    public function createTextLine(textBlock:TextBlock,
+    							   previousLine:TextLine = null,
+    							   width:Number = 1000000,
+    							   lineOffset:Number = 0.0,
+    							   fitSomething:Boolean = false):TextLine
+    {
+	    return textBlock.createTextLine(previousLine, width,
+	    								lineOffset, fitSomething);
+    }
+
+    /**
+	 *  Calls recreateTextLine() on the specified TextBlock
+	 *  with the specified parameters.
+	 *  In order for a TextLine to use an embedded font,
+	 *  it must be recreated in the SWF where the font is.
+	 *  This factory method makes that possible.
+   	 */
+    public function recreateTextLine(textBlock:TextBlock,
+    								 textLine:TextLine,
+    								 previousLine:TextLine = null,
+    								 width:Number = 1000000,
+    								 lineOffset:Number = 0.0,
+    								 fitSomething:Boolean = false):TextLine
+    {
+	    // The recreateTextLine() method was added to TextBlock
+	    // in Player 10.1, so it must be looked up by name
+	    // since we are compiling for Player 10.0.
+	    var recreateTextLine:Function = textBlock["recreateTextLine"];
+	    if (recreateTextLine == null)
+	    	return null;
+
+	    return recreateTextLine(textLine, previousLine, width,
+	    	   					lineOffset, fitSomething);
+    }
+
+	//--------------------------------------------------------------------------
+	//
+	//  Methods
+	//
+	//--------------------------------------------------------------------------

    /**
     *  @inheritDoc