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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/ComboBoxAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/ComboBoxAutomationImpl.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: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/delegates/controls/DataGridAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/controls/DataGridAutomationImpl.as
@@ -0,0 +1,682 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+	import flash.display.DisplayObject;
+	import flash.display.InteractiveObject;
+	import flash.events.Event;
+	import flash.events.KeyboardEvent;
+	import flash.events.MouseEvent;
+
+	import mx.automation.Automation;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+	import mx.automation.IAutomationObjectHelper;
+	import mx.automation.events.AutomationDragEvent;
+	import mx.automation.events.ListItemSelectEvent;
+	import mx.automation.tabularData.DataGridTabularData;
+	import mx.controls.DataGrid;
+	import mx.controls.dataGridClasses.DataGridHeader;
+	import mx.controls.listClasses.IListItemRenderer;
+	import mx.controls.listClasses.ListBaseContentHolder;
+	import mx.core.IFlexDisplayObject;
+	import mx.core.mx_internal;
+	import mx.events.DataGridEvent;
+	import mx.events.DragEvent;
+	import mx.events.IndexChangedEvent;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  DataGrid control.
+	 *
+	 *  @see mx.controls.DataGrid
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public class DataGridAutomationImpl extends ListBaseAutomationImpl
+	{
+		include "../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(DataGrid, DataGridAutomationImpl);
+		}
+
+		/**
+		 *  Constructor.
+		 * @param obj DataGrid object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public function DataGridAutomationImpl(obj:DataGrid)
+		{
+			super(obj);
+
+
+			obj.addEventListener(IndexChangedEvent.HEADER_SHIFT, headerShiftHandler, false, 0, true);
+			obj.addEventListener(DataGridEvent.HEADER_RELEASE, headerReleaseHandler, false, 0, true);
+			obj.addEventListener(DataGridEvent.COLUMN_STRETCH, columnStretchHandler, false, 0, true);
+		}
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get grid():DataGrid
+		{
+			return uiComponent as DataGrid;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildAt(index:int):IAutomationObject
+		{
+			var listItems:Array = getCompleteRenderersArray();
+			//var listItems:Array = grid.rendererArray; .. changed as above to take care of the
+			// locked row and locked column changed handling of DG
+
+			var numCols:int = listItems[0].length;
+			var row:uint = uint(numCols == 0 ? 0 : index / numCols);
+			var col:uint = uint(numCols == 0 ? index : index % numCols);
+			var item:IListItemRenderer = listItems[row][col];
+
+			if (grid.itemEditorInstance &&
+				grid.editedItemPosition &&
+				item == grid.editedItemRenderer)
+			{
+				return grid.itemEditorInstance as IAutomationObject;
+			}
+
+			return  item as IAutomationObject;
+		}
+
+		/**
+		 * @private
+		 */
+		override public function getAutomationChildren():Array
+		{
+			var childrenList:Array = new Array();
+			var listItems:Array = getCompleteRenderersArray();
+
+			// we get this as the 2 dim array of row and columns
+			// we need to make this as single element array
+			//while (!listItems[row][col]
+			var rowcount:int  = listItems?listItems.length:0;
+			if (rowcount != 0)
+			{
+				var coulumcount:int = 0;
+				if ((listItems[0]) is Array)
+					coulumcount = (listItems[0] as Array).length;
+
+				for (var i:int = 0; i < rowcount ; i++)
+				{
+					for (var j:int = 0; j < coulumcount ; j++)
+					{
+						var item:IListItemRenderer = listItems[i][j];
+						if (item)
+						{
+							if (grid.itemEditorInstance &&
+								grid.editedItemPosition &&
+								item == grid.editedItemRenderer)
+
+								childrenList.push(grid.itemEditorInstance as IAutomationObject);
+							else
+								childrenList.push(item as IAutomationObject);
+						}
+					}
+				}
+			}
+			return  childrenList;
+		}
+
+
+		/**
+		 * @private
+		 */
+		override public function getItemAutomationIndex(delegate:IAutomationObject):String
+		{
+			var item:IListItemRenderer = delegate as IListItemRenderer;
+			if (item == grid.itemEditorInstance && grid.editedItemPosition)
+				item = grid.editedItemRenderer;
+			var row:int = grid.itemRendererToIndex(item);
+			return (row < 0
+				? getItemAutomationName(delegate)	:
+					(grid.gridColumnMap[item.name]?
+						(grid.gridColumnMap[item.name].dataField + ":" + row):
+							getItemAutomationName(delegate)));
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function getItemAutomationValue(item:IAutomationObject):String
+		{
+			return getItemAutomationNameOrValueHelper(item, false);
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function getItemAutomationName(item:IAutomationObject):String
+		{
+			return getItemAutomationNameOrValueHelper(item, true);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function getItemAutomationNameOrValueHelper(delegate:IAutomationObject,
+															useName:Boolean):String
+		{
+			var result:Array = [];
+			var item:IListItemRenderer = delegate as IListItemRenderer;
+
+			if (item == grid.itemEditorInstance)
+				item = grid.editedItemRenderer;
+
+			var row:int = grid.itemRendererToIndex(item);
+			var isHeader:Boolean = false;
+
+			if (row == int.MIN_VALUE)
+			{
+				// return null;  -- this is commented after the header related
+				// changes in DG.
+
+				// now for the headers also , it cmes as min_value
+				// so we cannot make out header or invalid renderer
+				isHeader = grid.headerVisible;
+			}
+
+
+			row = row < grid.lockedRowCount ?
+				row :
+				row - grid.verticalScrollPosition;
+
+			if (row >= 0)
+			{
+				if (grid.headerVisible)
+					++row;
+			}
+			else if (isHeader)
+				row = 0;
+
+
+			var listItems:Array = getCompleteRenderersArray();
+			//var listItems:Array = grid.rendererArray; .. changed as above to take care of the
+			// locked row and locked column changed handling of DG
+
+			// this varaible is added, since we are proceeding
+			// even if the itemRendererToIndex is returning  int.MIN_VALUE
+			// we are assuming that the user clicked the header in this case
+			// But we need to find whether this is valid
+			// this is found by checking whether we get the clicked item
+			// in one of the column header renderer
+			var validItemRendererFound:Boolean = false;
+
+			for (var col:int = 0; col < listItems[row].length; col++)
+			{
+				var i:IListItemRenderer = listItems[row][col];
+				if(i == grid.editedItemRenderer)
+					i = grid.itemEditorInstance;
+				var itemDelegate:IAutomationObject = i as IAutomationObject;
+				var s:String = (useName
+					? itemDelegate.automationName
+					: itemDelegate.automationValue.join(" | "));
+				if ( i == item )
+				{
+					// we got a valid item renderer
+					s= "*" + s + "*";
+					validItemRendererFound= true;
+				}
+				result.push(s);
+			}
+
+			if(isHeader && (validItemRendererFound==false))
+			{
+				// we got the itemRendererToIndex(item) as int.MIN_VALUE
+				// so we considered it as a header row
+				// but no element on the header row match with the
+				// current item renderer. Hence returning null
+				return null;
+			}
+			return (isHeader
+				? "[" + result.join("] | [") + "]"
+				: result.join(" | "));
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function replayAutomatableEvent(interaction:Event):Boolean
+		{
+			var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+			var mouseEvent:MouseEvent;
+			switch (interaction.type)
+			{
+				case "headerShift":
+				{
+					var icEvent:IndexChangedEvent = IndexChangedEvent(interaction);
+					grid.shiftColumns(icEvent.oldIndex, icEvent.newIndex);
+					return true;
+				}
+
+				case DataGridEvent.HEADER_RELEASE:
+				{
+					var listItems:Array = getCompleteRenderersArray();
+					//var listItems:Array = grid.rendererArray; .. changed as above to take care of the
+					// locked row and locked column changed handling of DG
+
+					var c:IListItemRenderer = listItems[0][DataGridEvent(interaction).columnIndex];
+					return help.replayClick(c);
+				}
+
+				case DataGridEvent.COLUMN_STRETCH:
+				{
+					var s:IFlexDisplayObject = DataGridHeader((grid .dataGridHeader)). getSeparators()[DataGridEvent(interaction).columnIndex];
+
+					s.dispatchEvent(new MouseEvent(MouseEvent.MOUSE_DOWN));
+					// localX needs to be passed in the constructor
+					// to get stageX value computed.
+					mouseEvent = new MouseEvent(MouseEvent.MOUSE_UP,
+						true, // bubble
+						false, // cancellable
+						DataGridEvent(interaction).localX,
+						20, // dummy value
+						uiComponent as InteractiveObject );
+					return help.replayMouseEvent(uiComponent, mouseEvent);
+
+
+				}
+
+				case DataGridEvent.ITEM_EDIT_BEGIN:
+				{
+					var de:DataGridEvent = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING);
+					var input:DataGridEvent = interaction as DataGridEvent;
+					de.itemRenderer = input.itemRenderer;
+					de.rowIndex = input.rowIndex;
+					de.columnIndex = input.columnIndex;
+					uiComponent.dispatchEvent(de);
+				}
+
+				case ListItemSelectEvent.DESELECT:
+				case ListItemSelectEvent.MULTI_SELECT:
+				case ListItemSelectEvent.SELECT:
+				default:
+				{
+					return super.replayAutomatableEvent(interaction);
+				}
+			}
+		}
+
+		/**
+		 *  A matrix of the automationValues of each item in the grid. The return value
+		 *  is an array of rows, each of which is an array of item renderers (row-major).
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		override public function get automationTabularData():Object
+		{
+			return  new DataGridTabularData(grid);
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function keyDownHandler(event:KeyboardEvent):void
+		{
+			if (grid.itemEditorInstance || event.target != event.currentTarget)
+				return;
+
+			super.keyDownHandler(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function columnStretchHandler(event:DataGridEvent):void
+		{
+			recordAutomatableEvent(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function headerReleaseHandler(event:DataGridEvent):void
+		{
+			recordAutomatableEvent(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function headerShiftHandler(event:IndexChangedEvent):void
+		{
+			if (event.triggerEvent)
+				recordAutomatableEvent(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		private function itemEditHandler(event:DataGridEvent):void
+		{
+			recordAutomatableEvent(event, true);
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function dragDropHandler(event:DragEvent):void
+		{
+			if(dragScrollEvent)
+			{
+				recordAutomatableEvent(dragScrollEvent);
+				dragScrollEvent=null;
+			}
+
+			var am:IAutomationManager = Automation.automationManager;
+			var index:int = grid.calculateDropIndex(event);
+			var drag:AutomationDragEvent = new AutomationDragEvent(event.type);
+			drag.action = event.action;
+
+			if (grid.dataProvider && index != grid.dataProvider.length)
+			{
+				//increment the index if headers are being shown
+				if(grid.headerVisible)
+					++index;
+
+				if (index >= grid.lockedRowCount)
+					index -= grid.verticalScrollPosition;
+
+				var completeListitems:Array = getCompleteRenderersArray();
+
+				//var rc:Number = grid.rendererArray.length;
+				var rc:Number = completeListitems.length;
+
+				if (index >= rc)
+					index = rc - 1;
+
+				if (index < 0)
+					index = 0;
+
+				//if(grid.rendererArray && grid.rendererArray[0] && grid.rendererArray[0].length)
+				//index = index * grid.rendererArray[0].length;
+
+				if(completeListitems && completeListitems[0] && completeListitems[0].length)
+					index = index * completeListitems[0].length;
+
+				drag.draggedItem = getAutomationChildAt(index);
+			}
+
+			preventDragDropRecording = false;
+			am.recordAutomatableEvent(uiAutomationObject, drag);
+			preventDragDropRecording = true;
+		}
+
+
+		/**
+		 *  @private
+		 */
+		override protected function mouseDownHandler(event:MouseEvent):void
+		{
+			//var listItems:Array = grid.rendererArray;
+			var listItems:Array = getCompleteRenderersArray();
+
+			var r:IListItemRenderer = grid.getItemRendererForMouseEvent(event);
+			var headerClick:Boolean = false;
+			// if headers are visible and clickable for sorting
+			if (grid.enabled && (grid.sortableColumns || grid.draggableColumns)
+				&& grid.headerVisible && listItems.length)
+			{
+
+				// find out if we clicked on a header
+				var n:int = listItems[0].length;
+				for (var i:int = 0; i < n; i++)
+				{
+					// if we did click on a header
+					if (r == listItems[0][i])
+						headerClick = true;
+				}
+			}
+
+			if(!headerClick)
+				super.mouseDownHandler(event);
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function getItemRendererForEvent(lise:ListItemSelectEvent):IListItemRenderer
+		{
+			var rowIndex:int = lise.itemIndex;
+			//This portion is commented out as now the rowHeaders are separated
+			/*
+			if(grid.headerVisible)
+			++rowIndex;
+			*/
+
+
+			rowIndex = rowIndex < grid.lockedRowCount ? rowIndex : rowIndex - grid.verticalScrollPosition;
+
+			return grid.indicesToItemRenderer(rowIndex, 0);
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function fillItemRendererIndex(item:IListItemRenderer, event:ListItemSelectEvent):void
+		{
+			//var listItems:Array = grid.rendererArray;
+			var listItems:Array = getCompleteRenderersArray();
+
+			var startRow:int = 0;
+			//This portion is commented out as now the rowHeaders are separated
+			/*
+			if(grid.headerVisible)
+			++startRow;
+			*/
+
+			var n:int = listItems.length;
+			for (var i:int = startRow; i < n; i++)
+			{
+				var n1:int = listItems[i].length;
+				for (var j:int = 0; j < n1; j++)
+				{
+					if (listItems[i][j] == item)
+					{
+						event.itemIndex = (i < grid.lockedRowCount ? i :
+							i + grid.verticalScrollPosition) - 1;
+					}
+				}
+			}
+		}
+
+
+		/**
+		 *  @private
+		 */
+		public function getCompleteRenderersArray():Array
+		{
+			// we have different areas in the dg.
+			// it has the following areas
+			// locked header				(A),	unlocked header				(B),
+			// lockedrowandcolumn contents	(C),	locked row contents			(D),
+			// locekd column contents 		(E),	unlokced columnrow contents	(F)
+
+			// note  renderArray (which is combination of
+			// hedaer items and list items = B+F).
+
+
+
+			// ..........get the Arrays............
+			var lockedHeaderList:Array = new Array(); // Array A
+			if(grid.dataGridLockedColumnHeader)
+				lockedHeaderList = DataGridHeader(grid.dataGridLockedColumnHeader).rendererArray;
+
+			var lockedRowAndColumnList:Array = new Array(); // Array C
+			if (grid.dataGridLockedColumnAndRows)
+				lockedRowAndColumnList= ListBaseContentHolder(grid.dataGridLockedColumnAndRows).listItems;
+
+			var lockedRowList:Array = new Array(); // Array D
+			if (grid.dataGridLockedRows)
+				lockedRowList=ListBaseContentHolder(grid.dataGridLockedRows).listItems;// ArrayD
+
+			var lockedColumnList:Array = new Array(); // Arrya E
+			if( grid.dataGridLockedColumns)
+				lockedColumnList = ListBaseContentHolder(grid.dataGridLockedColumns).listItems;
+
+			var unlockedRowColumnList:Array = grid.rendererArray; // Array B+F
+
+
+
+			//***************** now let us combine the arrays.********
+
+			var completeArray:Array = new Array();
+
+
+			// *********get the header elements**********
+			var headerArray:Array = new Array();
+			if (lockedHeaderList.length)
+				headerArray = lockedHeaderList;
+
+
+			if (unlockedRowColumnList.length)
+			{
+				if(headerArray.length)
+					headerArray=headerArray.concat(unlockedRowColumnList[0]);
+				else
+					headerArray = unlockedRowColumnList[0];
+			}
+
+
+			completeArray.push(headerArray);
+
+
+
+
+
+			//.... let us add elements from C+D
+			// number of rows corresponds to locked rowcount
+			var n:int = grid.lockedRowCount;
+			for (var i:int=0; i < n ; i++)
+			{
+				// C list we need to traverse for the locked column count
+				// and D we need to traverse for the unlocked columncount
+				var rowArray:Array = new Array();
+				if (i < lockedRowAndColumnList.length)
+					rowArray = lockedRowAndColumnList[i];
+
+				if (i < lockedRowList.length)
+				{
+					if (rowArray.length)
+						rowArray = rowArray.concat(lockedRowList[i]);
+					else
+						rowArray = lockedRowList[i];
+				}
+
+				completeArray.push(rowArray);
+
+			}
+
+
+			//.... let us add elements from E+F
+			// number of rows corresponds to unlocked rowcount
+			n = grid.rowCount- grid.lockedRowCount;
+			for ( i = 1; i < n+1 ; i++)
+			{
+				// C list we need to traverse for the locked column count
+				// and D we need to traverse for the unlocked columncount
+				rowArray = new Array();
+				if (i < lockedColumnList.length)
+					rowArray = lockedColumnList[i-1];
+
+				if (i < unlockedRowColumnList.length)
+				{
+					if(rowArray.length)
+						//unlockedRowColumnList contians the unlocked header arraya also
+						// hence +1 for the index
+						rowArray = rowArray.concat(unlockedRowColumnList[i]);
+					else
+						rowArray = unlockedRowColumnList[i];
+				}
+
+				completeArray.push(rowArray);
+
+			}
+
+
+
+			return completeArray;
+
+		}
+
+		/**
+		 *  @private
+		 */
+		override public function get numAutomationChildren():int
+		{
+			var listItems:Array = getCompleteRenderersArray();
+			if (listItems.length == 0)
+				return 0;
+
+			var result:int = listItems.length * listItems[0].length;
+			var row:uint = listItems.length - 1;
+			var col:uint = listItems[0].length - 1;
+			while (!listItems[row][col] && result > 0)
+			{
+				result--;
+				if (col != 0)
+					col--;
+				else if (row != 0)
+				{
+					row--;
+					col = listItems[0].length - 1;
+				}
+			}
+			return result;
+		}
+
+
+
+	}
+}


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

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

 package spark.components.supportClasses
 {


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

--- frameworks/projects/automation_dmv/src/mx/core/Version.as
+++ frameworks/projects/automation_dmv/src/mx/core/Version.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.
+//
+////////////////////////////////////////////////////////////////////////////////

 import mx.core.mx_internal;


Transferred from the Adobe Open Source Subversion Repository

Revision: 4957
Author:   jimurphy@adobe.com
Date:     2009-02-13T19:44:53.991275Z

Log Message:
-----------
Merge 3.x revisions 4848,4856,4886,4888,4898,4905,4912,4914-4916,4953 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLEncoder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/BrowserManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ToggleButtonBar.as
+++ frameworks/projects/mx/src/mx/controls/ToggleButtonBar.as
@@ -247,7 +247,7 @@
      *  @private.
      */
     override public function set selectedIndex(value:int):void
-    {
+    {
         if (value == selectedIndex)
             return;

@@ -353,7 +353,7 @@
             initializeSelectedButton = false;

             var index:int = _selectedIndex;
-            if (index == -2)
+            if (index == -2 )
             {
             	if (numChildren > 0)
                 	index = 0;
@@ -432,7 +432,8 @@

         // Set new index
         super.selectedIndex = index;
-
+        _selectedIndex = index;
+
         if (index > -1)
         {
             // Hilite the new selection


Transferred from the Adobe Open Source Subversion Repository

Revision: 2464
Author:   jimurphy@adobe.com
Date:     2008-07-14T19:50:33.449468Z

Log Message:
-----------
add flex 4 to trunk

Modified Paths:
--------------
134 paths were modified

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 4690
Author:   preilly@adobe.com
Date:     2009-01-27T21:12:47.869268Z

Log Message:
-----------
* Fixed an issue caused by revision 4330.  Due to leaving the backing
  variables and functions in the public namespace, they were showing
  up in FlexBuilder's code hinting and DataGrid's without specified
  columns.  Now they are "hidden" in the mx_internal namespace.

tests Passed: checkintests, mxunit databinding

Needs QA: YES

Needs DOC: NO

Bug fixes: SDK-18853, SDK-18604

API Change: NO

Reviewer: Pete F.

Code-level description of changes:

  frameworks/projects/framework/src/mx/binding/BindingManager.as

    Modified set() to no longer require a userNamespace arg.  The
    mx_internal namespace is now assumed.

  modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEvaluator.java

    Renamed makeAttrListPublic() to makeMxInternalAndRemoveOverride(DefinitionNode)
    and updated it to handle IdentifierNodes in the
    AttributeListNode's items.

    Added makeMxInternalAndRemoveOverride(IdentifierNode, Iterator) as
    a helper method for common code in
    makeMxInternalAndRemoveOverride(DefinitionNode).

  modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeClassInfo.java

    Modified AccessorInfo's constructor to create a more unique backingPrefix.

    Modified getQualifiedBackingPropertyName() to always use the
    mx_internal namespace.

  modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm

    Modified BindingManager.set() call to no longer pass in the userNamespace.

  modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEvaluator.java

    Modified evaluate(Context, ClassDefinitionNode) to add an import
    for mx_internal.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeClassInfo.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/binding/BindingManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/genext/GenerativeSecondPassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableFirstPassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/managed/ManagedProperty.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm</path>

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

--- frameworks/projects/framework/src/mx/binding/BindingManager.as
+++ frameworks/projects/framework/src/mx/binding/BindingManager.as
@@ -64,9 +64,6 @@
      *
      * @param owner The instance or Class that owns the property to be set.
      *
-     * @param userNamespace The namespace that the property is defined
-     *                      in.  Can be null.
-     *
      * @param propertyName The name of the original property.
      *
      * @param backingPropertyName The name of renamed backing property.
@@ -82,21 +79,14 @@
      *                        this is the generated static event
      *                        dispatcher.
      */
-    public static function set(owner:Object, userNamespace:Namespace,
-                               propertyName:String, backingPropertyName:String,
+    public static function set(owner:Object, propertyName:String,
+                               backingPropertyName:String,
                                oldValue:Object, newValue:Object,
                                eventDispatcher:IEventDispatcher):void
     {
         if (oldValue !== newValue)
         {
-            if (userNamespace)
-            {
-                owner.userNamespace::[backingPropertyName] = newValue;
-            }
-            else
-            {
-                owner[backingPropertyName] = newValue;
-            }
+            owner.mx_internal::[backingPropertyName] = newValue;

             eventDispatcher.dispatchEvent(PropertyChangeEvent.createUpdateEvent(owner, propertyName, oldValue, newValue));
         }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/framework/src/mx/logging/AbstractTarget.as
+++ frameworks/projects/framework/src/mx/logging/AbstractTarget.as
@@ -28,6 +28,11 @@
  *  It handles the validation of filter expressions and provides a default level
  *  property.
  *  No implementation of the logEvent() method is provided.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
  */
 public class AbstractTarget implements ILoggingTarget, IMXMLObject
 {
@@ -41,6 +46,11 @@

     /**
      *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function AbstractTarget()
     {
@@ -118,6 +128,11 @@
      *           Log.addTarget(traceLogger);
      *

      *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get filters():Array
     {
@@ -184,6 +199,11 @@
     /**
      *  @prviate
      *  Storage for the id property.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     private var _id:String;

@@ -193,6 +213,11 @@
       *  Provides access to the id of this target.
       *  The id is assigned at runtime by the mxml compiler if used as an mxml
       *  tag, or internally if used within a script block
+      *
+      *  @langversion 3.0
+      *  @playerversion Flash 9
+      *  @playerversion AIR 1.1
+      *  @productversion Flex 3
       */
      public function get id():String
      {
@@ -233,6 +258,11 @@
      *
LogEventLevel.ALL (0) intended to force a target to
      *      process all messages.

      *

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function get level():int
     {
@@ -261,6 +291,11 @@
      *  This allows this target to receive log events from the specified logger.
      *
      *  @param logger The ILogger that this target should listen to.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function addLogger(logger:ILogger):void
     {
@@ -275,6 +310,11 @@
      *  Stops this target from receiving events from the specified logger.
      *
      *  @param logger The ILogger that this target should ignore.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function removeLogger(logger:ILogger):void
     {
@@ -293,6 +333,11 @@
      *
      *  @param id Used by the document to refer to this object.
      *  If the object is a deep property on the document, id is null.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function initialized(document:Object, id:String):void
     {
@@ -310,6 +355,11 @@
      *
NOTE: Descendants must override this method to make it useful.

      *
      *  @param event An event from an associated logger.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
      */
     public function logEvent(event:LogEvent):void
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8619
Author:   clucier@adobe.com
Date:     2009-07-16T14:43:13.537656Z

Log Message:
-----------
The halo ListBase baselinePosition getter would step on empty data providers. Fixed.
Reviewer: Chet
Bugs: SDK-17879
QE Notes: None
Doc Notes: None

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as

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

--- frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
+++ frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as
@@ -1469,6 +1469,8 @@

         var isNull:Boolean = dataProvider == null;
         var isEmpty:Boolean = dataProvider != null && dataProvider.length == 0;
+        var originalProvider:Object = dataProvider;
+
         if (isNull || isEmpty)
         {
             dataProvider = [ null ];
@@ -1489,10 +1491,7 @@

         if (isNull || isEmpty)
         {
-            if (isNull)
-                dataProvider = null;
-            else if (isEmpty)
-                dataProvider = [];
+            dataProvider = originalProvider;
             validateNow();
         }


Added unsafe version of functions that manipulate ManagedArray.

--- src/Modi/ManagedArray.as
+++ src/Modi/ManagedArray.as
@@ -50,7 +50,12 @@

 			wasAdded(object, index);
 		}
-
+
+        public function pushUnsafe(object:ManagedObject):void
+        {
+            _data.push(object);
+        }
+
 		public function pushMultiple(array:Array):void
 		{
 			for each (var element:ManagedObject in array)
@@ -58,7 +63,15 @@
 				this.push(element);
 			}
 		}
-
+
+        public function pushMultipleUnsafe(array:Array):void
+        {
+            for each (var element:ManagedObject in array)
+            {
+                this.pushUnsafe(element);
+            }
+        }
+
 		public function pop():ManagedObject
 		{
 			var object:ManagedObject = null;
@@ -77,6 +90,20 @@
 			return object;
 		}

+        public function popUnsafe():ManagedObject
+        {
+            var object:ManagedObject = null;
+            var length:int = _data.length;
+
+            if (length > 0)
+            {
+                object = _data[length - 1];
+                removeUnsafe(object);
+            }
+
+            return object;
+        }
+
         public function shift():ManagedObject
         {
             var object:ManagedObject = null;
@@ -95,6 +122,20 @@
             return object;
         }

+        public function shiftUnsafe():ManagedObject
+        {
+            var object:ManagedObject = null;
+            var length:int = _data.length;
+
+            if (length > 0)
+            {
+                object = _data[0];
+                removeUnsafe(object);
+            }
+
+            return object;
+        }
+
 		public function remove(object:ManagedObject):Boolean
 		{
 			var index:int = _data.indexOf(object);
@@ -116,7 +157,19 @@

 			return false;
 		}
-
+
+        public function removeUnsafe(object:ManagedObject):Boolean
+        {
+            var index:int = _data.indexOf(object);
+            if (index != -1)
+            {
+                _data.splice(index, 1);
+                return true;
+            }
+
+            return false;
+        }
+
 		public function splice(startIndex:int, deleteCount:int):Vector.<ManagedObject>
 		{
 			var splicedObjects:Vector.<ManagedObject> = new Vector.<ManagedObject>();
@@ -147,7 +200,31 @@

 			return splicedObjects;
 		}
-
+
+        public function spliceUnsafe(startIndex:int, deleteCount:int):Vector.<ManagedObject>
+        {
+            var splicedObjects:Vector.<ManagedObject> = new Vector.<ManagedObject>();
+
+            if (startIndex < _data.length && (startIndex + deleteCount) <= _data.length)
+            {
+                var object:ManagedObject;
+
+                while (deleteCount > 0)
+                {
+                    object = _data[startIndex];
+                    removeUnsafe(object);
+                    splicedObjects.push(object);
+                    deleteCount--;
+                }
+            }
+            else
+            {
+                throw new RangeError("startIndex and deleteCount arguments specify an index to be deleted that's outside the ManagedArray's bounds.");
+            }
+
+            return splicedObjects;
+        }
+
 		public function replaceObject(oldObject:ManagedObject, newObject:ManagedObject):Boolean
 		{
 			var index:int = _data.indexOf(oldObject);
@@ -158,7 +235,18 @@

 			return replaceObjectAt(index, newObject);
 		}
-
+
+        public function replaceObjectUnsafe(oldObject:ManagedObject, newObject:ManagedObject):Boolean
+        {
+            var index:int = _data.indexOf(oldObject);
+            if (index == -1)
+            {
+                throw new Error("Object " + oldObject + " you are trying to replace is not stored in ManagedArray!");
+            }
+
+            return replaceObjectAtUnsafe(index, newObject);
+        }
+
 		public function replaceObjectAt(index:int, newObject:ManagedObject):Boolean
 		{
 			if (index < 0 || index >= _data.length)
@@ -181,6 +269,18 @@

 			return true;
 		}
+
+        public function replaceObjectAtUnsafe(index:int, newObject:ManagedObject):Boolean
+        {
+            if (index < 0 || index >= _data.length)
+            {
+                throw new RangeError("Index out of bounds.");
+            }
+
+            _data[index] = newObject;
+
+            return true;
+        }

 		public function indexOf(searchElement:ManagedObject, fromIndex:int = 0):int
 		{
@@ -504,7 +604,15 @@
 				this.pop();
 			}
 		}
-
+
+        public function removeAllObjectsUnsafe():void
+        {
+            while (_data.length > 0)
+            {
+                this.popUnsafe();
+            }
+        }
+
 		/* INTERFACE Modi.ISerializableObject */

 		public function serialize(serializator:ISerializator):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 12804
Author:   rfrishbe@adobe.com
Date:     2009-12-10T19:46:24.518133Z

Log Message:
-----------
Fixing 5 different video bugs:

SDK-24623 (Video doesn't stop when layer containing it is made non visibile and pauseWhenHidden=true): We now add a "layerPropertyChange" events to designLayers, if they exist.  We also check for designLayer.effectiveVisibility.

SDK-24619 (when source is set to null, duration is not set back to 0 and there is no durationChange event): The binding issue was actually previously fixed.  This is just updating the ASDoc so people don't expect such events when the source gets set to null.  An OSMF bug has been filed for them to dispatch these events when the element gets set to null (or in the short-term, update their ASDocs in a similar fashion).

SDK-24647 (Should be a way to disable Spark VideoPlayer full-screen hide controls delay): When the fullScreenHideControlsDelay is set to Infinity, we will now never hide the player controls in fullScreen mode.

SDK-24626 (RTE when trying to set Spark VideoPlayer scaleMode via data binding): Added more logic to deal with what happens if someone sends in a bad or null scaleMode.

SDK-24586 ([GUMBO_PRIORITY] scaleMode="none" and scaleMode="zoom" on VideoDisplay doesn't clip video to bounds): The underlying OSMF bug wasn't fixed, but they gave me a new approach to use RegionGateway for the viewing area rather than MediaPlayerSprite.

QE notes: -
Doc notes: -
Bugs: SDK-24623, SDK-24619, SDK-24647, SDK-24626, SDK-24586
Reviewer: Kevin
Tests run: checkintests
Is noteworthy for integration: Yes - a gumbo priority bug was fixed for Catalyst

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

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

--- frameworks/projects/spark/src/spark/components/VideoDisplay.as
+++ frameworks/projects/spark/src/spark/components/VideoDisplay.as
@@ -22,6 +22,7 @@
 import mx.core.UIComponent;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
+import mx.events.PropertyChangeEvent;
 import mx.resources.IResourceManager;
 import mx.resources.ResourceManager;

@@ -36,6 +37,9 @@
 import org.osmf.events.PlayingChangeEvent;
 import org.osmf.events.SeekEvent;
 import org.osmf.events.TimeEvent;
+import org.osmf.gateways.RegionGateway;
+import org.osmf.layout.LayoutUtils;
+import org.osmf.layout.RegistrationPoint;
 import org.osmf.media.IMediaResource;
 import org.osmf.media.MediaPlayer;
 import org.osmf.media.MediaPlayerState;
@@ -67,6 +71,9 @@
  *  directly from a server, typically by issuing an HTTP request.
  *  It is not displatched when playing a video from a special media server,
  *  such as Flash Media Server.
+ *
+ *
This event may not be dispatched when the source is set to null or a playback
+ *  error occurs.

  *
  *  @eventType org.osmf.events.LoadEvent.BYTES_LOADED_CHANGE
  *
@@ -91,6 +98,9 @@

 /**
  *  Dispatched when the currentTime property of the MediaPlayer has changed.
+ *
+ *
This event may not be dispatched when the source is set to null or a playback
+ *  error occurs.

  *
  *  @eventType org.osmf.events.TimeEvent.CURRENT_TIME_CHANGE
  *
@@ -103,6 +113,9 @@

 /**
  *  Dispatched when the duration property of the media has changed.
+ *
+ *
This event may not be dispatched when the source is set to null or a playback
+ *  error occurs.

  *
  *  @eventType org.osmf.events.TimeEvent.DURATION_CHANGE
  *
@@ -270,10 +283,10 @@

     /**
      *  @private
-     *  This is the underlying VideoPlayer object. At some point in the
-     *  future, we may change to a new implementation.
-     */
-    mx_internal var videoSprite:MediaPlayerSprite;
+     *  This is the underlying gateway object used to display
+     *  the underlying videoPlayer.
+     */
+    mx_internal var videoGateway:RegionGateway;

     /**
      *  @private
@@ -772,6 +785,11 @@
     //  scaleMode
     //----------------------------------

+    /**
+     *  @private
+     */
+    private var _scaleMode:String = ScaleMode.LETTERBOX;
+
     [Inspectable(Category="General", enumeration="none,stretch,letterbox,zoom", defaultValue="letterbox")]

     /**
@@ -793,7 +811,7 @@
      */
     public function get scaleMode():String
     {
-        return videoSprite.scaleMode.toString().toLowerCase();
+        return _scaleMode;
     }

     /**
@@ -804,21 +822,28 @@
         if (scaleMode == value)
             return;

-        switch(value.toLowerCase())
-        {
-            case "none":
-                videoSprite.scaleMode = ScaleMode.NONE;
+        switch(value)
+        {
+            case ScaleMode.NONE:
+                _scaleMode = ScaleMode.NONE;
                 break;
-            case "stretch":
-                videoSprite.scaleMode = ScaleMode.STRETCH;
+            case ScaleMode.STRETCH:
+                _scaleMode = ScaleMode.STRETCH;
                 break;
-            case "letterbox":
-                videoSprite.scaleMode = ScaleMode.LETTERBOX;
+            case ScaleMode.LETTERBOX:
+                _scaleMode = ScaleMode.LETTERBOX;
                 break;
-            case "zoom":
-                videoSprite.scaleMode = ScaleMode.ZOOM;
+            case ScaleMode.ZOOM:
+                _scaleMode = ScaleMode.ZOOM;
                 break;
-        }
+            default:
+                _scaleMode = ScaleMode.LETTERBOX;
+                break;
+        }
+
+        // set scaleMode on the videoElement object
+        if (videoPlayer.element)
+            LayoutUtils.setLayoutAttributes(videoPlayer.element.metadata, scaleMode, RegistrationPoint.CENTER);

         invalidateSize();
         invalidateDisplayList();
@@ -1166,8 +1191,9 @@
             return;
         }

-        videoSprite.width = Math.floor(unscaledWidth);
-        videoSprite.height = Math.floor(unscaledHeight);
+        // set the gateway's dimensions
+        LayoutUtils.setAbsoluteLayout(videoGateway.metadata,
+            Math.floor(unscaledWidth), Math.floor(unscaledHeight));
     }

     //--------------------------------------------------------------------------
@@ -1328,7 +1354,8 @@
     {
         // create new video player
         videoPlayer = new MediaPlayer();
-        videoSprite = new MediaPlayerSprite(videoPlayer);
+        videoGateway = new RegionGateway();
+        videoGateway.clipChildren = true;

         // internal events
         videoPlayer.addEventListener(DimensionEvent.DIMENSION_CHANGE, videoPlayer_dimensionChangeHandler);
@@ -1342,7 +1369,7 @@
         videoPlayer.addEventListener(TimeEvent.DURATION_CHANGE, dispatchEvent);
         videoPlayer.addEventListener(TimeEvent.COMPLETE, dispatchEvent);

-        addChild(videoSprite);
+        addChild(videoGateway);
     }

     /**
@@ -1351,6 +1378,10 @@
      */
     private function setUpSource():void
     {
+        // if was playing a previous video, let's remove it now
+        if (videoPlayer.element)
+            videoGateway.removeElement(videoPlayer.element);
+
         var videoElement:org.osmf.video.VideoElement;

         // check for 4 cases: streaming video, progressive download,
@@ -1435,14 +1466,29 @@
         if (!autoPlay && autoDisplayFirstFrame)
             load();

+        // set videoPlayer's element to the newly constructed VideoElement
+        // set the newly constructed videoElement's gateway to be the videoGateway
         videoPlayer.element = videoElement;

-        // if our source is null, let's invalidateSize() here.
-        // if it's a bad source, we'll get a playbackError and invalidate
-        // the size down there.  If it's a good source, we'll get a
-        // dimensionChange event and invalidate the size in there.
-        if (source == null)
+        if (videoElement)
+        {
+            videoElement.gateway = videoGateway;
+
+            // set the video's width within the gateway to be 100%, 100%
+            LayoutUtils.setRelativeLayout(videoElement.metadata, 100, 100);
+
+            // set the element scale (and distribute surplus space such that the
+            // element stays center)
+            LayoutUtils.setLayoutAttributes(videoElement.metadata, scaleMode, RegistrationPoint.CENTER);
+        }
+        else
+        {
+            // if our source is null, let's invalidateSize() here.
+            // if it's a bad source, we'll get a playbackError and invalidate
+            // the size down there.  If it's a good source, we'll get a
+            // dimensionChange event and invalidate the size in there.
             invalidateSize();
+        }
     }

     /**
@@ -1621,9 +1667,17 @@
         var current:IVisualElement = this;
         while (current)
         {
+            // add visibility listeners to the parent
             current.addEventListener(FlexEvent.HIDE, visibilityChangedHandler, false, 0, true);
             current.addEventListener(FlexEvent.SHOW, visibilityChangedHandler, false, 0, true);

+            // add listeners to the design layer too
+            if (current.designLayer)
+            {
+                current.designLayer.addEventListener("layerPropertyChange",
+                    designLayer_layerPropertyChangeHandler, false, 0, true);
+            }
+
             current = current.parent as IVisualElement;
         }
     }
@@ -1657,6 +1711,12 @@
             current.removeEventListener(FlexEvent.HIDE, visibilityChangedHandler, false);
             current.removeEventListener(FlexEvent.SHOW, visibilityChangedHandler, false);

+            if (current.designLayer)
+            {
+                current.designLayer.removeEventListener("layerPropertyChange",
+                    designLayer_layerPropertyChangeHandler, false);
+            }
+
             current = current.parent as IVisualElement;
         }
     }
@@ -1686,6 +1746,20 @@
     {
         effectiveVisibilityChanged = true;
         invalidateProperties();
+    }
+
+    /**
+     *  @private
+     *  Event call back whenever the visibility of our designLayer or one of our parent's
+     *  designLayers change.
+     */
+    private function designLayer_layerPropertyChangeHandler(event:PropertyChangeEvent):void
+    {
+        if (event.property == "effectiveVisibility")
+        {
+            effectiveVisibilityChanged = true;
+            invalidateProperties();
+        }
     }

     /**
@@ -1712,7 +1786,8 @@

         while (current)
         {
-            if (!current.visible)
+            if (!current.visible ||
+                (current.designLayer && !current.designLayer.effectiveVisibility))
             {
                 effectiveVisibility = false;
                 if (!effectiveEnabled)


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

--- frameworks/projects/spark/src/spark/layouts/TileOrientation.as
+++ frameworks/projects/spark/src/spark/layouts/TileOrientation.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 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: 4790
Author:   jimurphy@adobe.com
Date:     2009-02-02T18:13:13.580538Z

Log Message:
-----------
Merged 3.x revisions 4710-4711,4741,4746-4747,4755,4777,4787 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/ViewStack.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/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/NumberBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/tools/PreLink.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloFocusRect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.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/framework/src/mx/managers/SystemManager.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</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/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/tools/dependencychecker/flex/tools/dependencychecker/FrameworkSwcDependencyRules.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/CursorManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/collections/ArrayList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/SWFBridgeRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>

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

--- frameworks/projects/framework/src/mx/effects/Effect.as
+++ frameworks/projects/framework/src/mx/effects/Effect.as
@@ -1162,20 +1162,10 @@
     {
         if (targets.length > 0)
         {
-            // Reset the PropertyChanges array.
-            mx_internal::propertyChangesArray = [];
+            // Reset the PropertyChanges array by passing in 'null'
+            mx_internal::propertyChangesArray = captureValues(null, true);
+
             _callValidateNow = true;
-
-            // Create a new PropertyChanges object for the sum of all targets.
-            var n:int = targets.length;
-            for (var i:int = 0; i < n; i++)
-            {
-                mx_internal::propertyChangesArray.push(
-                    new PropertyChanges(targets[i]));
-            }
-
-            mx_internal::propertyChangesArray =
-                captureValues(mx_internal::propertyChangesArray,true);
         }
         endValuesCaptured = false;
     }
@@ -1188,13 +1178,7 @@
         if (targets.length > 0)
         {
             // make temporary PropertyChangesArray
-            var additionalPropertyChangesArray:Array = [];
-
-            // Create a new PropertyChanges object for the sum of all targets.
-            for (var i:int = 0; i < targets.length; i++)
-                additionalPropertyChangesArray.push(new PropertyChanges(targets[i]));
-
-            additionalPropertyChangesArray = captureValues(additionalPropertyChangesArray,true);
+            var additionalPropertyChangesArray:Array = captureValues(null, true);

             mx_internal::propertyChangesArray =
                 mx_internal::propertyChangesArray.concat(additionalPropertyChangesArray);
@@ -1206,8 +1190,10 @@
      */
     public function captureEndValues():void
     {
+        // captureValues will create propertyChangesArray if it does not
+        // yet exist
         mx_internal::propertyChangesArray =
-            captureValues(mx_internal::propertyChangesArray,false);
+            captureValues(mx_internal::propertyChangesArray, false);
         endValuesCaptured = true;
     }

@@ -1218,6 +1204,18 @@
     mx_internal function captureValues(propChanges:Array,
 									   setStartValues:Boolean):Array
     {
+        var n:int;
+        var i:int;
+        if (!propChanges)
+        {
+            propChanges = [];
+
+            // Create a new PropertyChanges object for the sum of all targets.
+            n = targets.length;
+            for (i = 0; i < n; i++)
+                propChanges.push(new PropertyChanges(targets[i]));
+        }
+
         // Merge Effect.filterProperties and filterObject.filterProperties
         var effectProps:Array = !mx_internal::filterObject ?
                                 relevantProperties :
@@ -1226,8 +1224,6 @@

         var valueMap:Object;
         var target:Object;
-        var n:int;
-        var i:int;
         var m:int;
         var j:int;


Transferred from the Adobe Open Source Subversion Repository

Revision: 5163
Author:   dsubrama@adobe.com
Date:     2009-03-04T16:43:19.057484Z

Log Message:
-----------
Few fixes/cleanups:

-Add dataChange event metadata to MXMLComponent so you can add event handlers in-line on MXMLComp and ItemRenderer
-Typo in FxListButtonBar SkinPart metadata
-Fix silly error in FxList.allowMultipleSelection
-Fix up name of collectionChangeHandler in FxListBase.

Reviewer: Ryan
Checkintests: Pass

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/MXMLComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -172,7 +172,7 @@
         if (value == _allowMultipleSelection)
             return

-        _allowMultipleSelection = true;
+        _allowMultipleSelection = value;
     }

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17804
Author:   rfrishbe@adobe.com
Date:     2010-09-22T17:24:30.060779Z

Log Message:
-----------
Fixing a bunch of List issues:

- Scrolling now interacts with List's selection, even if it isn't the List's own scroller that is scrolling
- the touchInteractionEnd event is now bubbling as documented
- Remove a hack in Scroller aorund updateAfterEvent() because I figured out what the underlying bug is around scaleX/scaleY==0 affecting the thumb position for sliders and scrollbars
- Fixing some caret issues (though some still remain and need to be worked out)
- Fix a padding issue for MobileItemRenderer

QE notes: None
Doc notes: None
Bugs: SDK-27671, SDK-27675, SDK-27734, SDK-27828, SDK-27935
Reviewer: Hans
Tests run: checkintests, mustella Slider, Scrollbar, List
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -1581,7 +1581,7 @@
         {
             // Single selection case, set the selectedIndex
             var currentRenderer:IItemRenderer;
-            if (caretIndex >= 0)
+            if (caretIndex >= 0 && caretIndex != newIndex)
             {
                 currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
                 if (currentRenderer)
@@ -2054,27 +2054,24 @@
      */
     private function touchInteractionStartHandler(event:TouchInteractionEvent):void
     {
-        if (event.relatedObject == this.scroller)
-        {
-            // cancel actual selection
-            mouseDownCancelledFromScroll = true;
-
-            // remove visual selection indicator
-            stopSelectButtonAfterDelayTimer();
-
-            // unselect what we thought was selected
-            itemSelected(mouseDownIndex, false);
-
-            // reselect what actually is selected
-            if (selectedIndex != NO_SELECTION)
-            {
-                itemSelected(selectedIndex, true);
-            }
-
-            mouseDownIndex = -1;
-            mouseDownPoint = null;
-            pendingSelectionOnMouseUp = false;
-        }
+        // cancel actual selection
+        mouseDownCancelledFromScroll = true;
+
+        // remove visual selection indicator
+        stopSelectButtonAfterDelayTimer();
+
+        // unselect what we thought was selected
+        itemSelected(mouseDownIndex, false);
+
+        // reselect what actually is selected
+        if (selectedIndex != NO_SELECTION)
+        {
+            itemSelected(selectedIndex, true);
+        }
+
+        mouseDownIndex = -1;
+        mouseDownPoint = null;
+        pendingSelectionOnMouseUp = false;
     }

     /**


fix for bug - http://code.google.com/p/as3isolib/issues/detail?id=21

--- fp9/src/as3isolib/display/primitive/IsoPolygon.as
+++ fp9/src/as3isolib/display/primitive/IsoPolygon.as
@@ -64,7 +64,7 @@
 			if (fill && styleType != RenderStyleType.WIREFRAME)
 				fill.begin(g);

-			var stroke:IStroke = IStroke(strokes[0]);
+			var stroke:IStroke = strokes.length >= 1 ? IStroke(strokes[0]) : DEFAULT_STROKE;
 			if (stroke)
 				stroke.apply(g);


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

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

 package mx.core
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 10464
Author:   rfrishbe@adobe.com
Date:     2009-09-21T17:40:30.663638Z

Log Message:
-----------
Removing support in Flex framework for compatibility version < 3.  We won't support compatibility-version 2 or 2.01 anymore.  We only keep compatibility-version for one full release, so for Flex 4, we only support compatibility-version = 3.x.

This should reduce our code-size some as we no longer need this old code.  I didn't clean up the compiler's support for compatibility-versioning as it didn't seem worth the effort.

QE notes: -
Doc notes: -
Bugs: SDK-15360
Reviewer: Kevin
Tests run: checkintests, Joan ran all mustella tests
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/HaloBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ProgressBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RadioButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/CanvasLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/AccordionHeaderSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Alert.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/framework/src/mx/controls/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeaderBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeItemRenderer.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/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/DateChooserYearArrowSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuBarItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/PanelSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/menuClasses/MenuItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/scrollClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/colorPickerClasses/SwatchPanel.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/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleProtoChain.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ScrollTrackSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/utilityClasses/Flex.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/LinkBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>

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

--- frameworks/projects/mx/src/mx/controls/LinkBar.as
+++ frameworks/projects/mx/src/mx/controls/LinkBar.as
@@ -16,7 +16,6 @@
 import flash.events.MouseEvent;
 import mx.core.ClassFactory;
 import mx.core.EdgeMetrics;
-import mx.core.FlexVersion;
 import mx.core.IFlexDisplayObject;
 import mx.core.mx_internal;
 import mx.events.ChildExistenceChangedEvent;
@@ -408,14 +407,8 @@

         var navItemStyleName:Object;

-        if (styleProp == "styleName" && FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-        {
-            navItemStyleName = this;
-        }
-        else if (styleProp == "linkButtonStyleName" && FlexVersion.compatibilityVersion >= FlexVersion.VERSION_3_0)
-        {
+        if (styleProp == "linkButtonStyleName")
             navItemStyleName = getStyle("linkButtonStyleName");
-        }

         if (navItemStyleName)
         {
@@ -554,17 +547,10 @@

         var newLink:Button = Button(navItemFactory.newInstance());

-        if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
-        {
-            newLink.styleName = this;
-        }
-        else
-        {
-            var linkButtonStyleName:String = getStyle("linkButtonStyleName");
-            if (linkButtonStyleName)
-                newLink.styleName = linkButtonStyleName;
-        }
-
+        var linkButtonStyleName:String = getStyle("linkButtonStyleName");
+        if (linkButtonStyleName)
+            newLink.styleName = linkButtonStyleName;
+
         if (label && label.length > 0)
             newLink.label = label;
         else


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

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

 package mx.flash
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 18987
Author:   rfrishbe@adobe.com
Date:     2010-12-03T01:08:34.503999Z

Log Message:
-----------
PARB changes for sizeElement/positionElement.  MobileSkin and MobileItemRenderer's methods have been renamed: resizeElement() -> setElementSize(), positionElement() -> setElementPosition().

Also, cleaning up text reflow for TextAreaSkin

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/TextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/SelectableButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as
@@ -95,7 +95,7 @@

     override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
     {
-        resizeElement(track, unscaledWidth, unscaledHeight);
+        setElementSize(track, unscaledWidth, unscaledHeight);
     }
 }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20736
Author:   smgilson@adobe.com
Date:     2011-03-09T21:18:00.204102Z

Log Message:
-----------
Merge 20719 - ASDoc updates

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/RuntimeDPIProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EdgeMetrics.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DeferredInstanceFromFunction.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/advancedgrids/src/mx/controls/advancedDataGridClasses/AdvancedDataGridBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IFlexModuleFactory.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/mx/src/mx/core/Container.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/FTETextField.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextInput.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/ITextFieldInterface.as</path>
<path kind="dir" action="M">/private/flex/sdk/trunk</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/private/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>

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

--- frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
+++ frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridColumn.as
@@ -479,8 +479,8 @@
             }

         }
-		else
-			hasComplexFieldName = false;
+        else
+            hasComplexFieldName = false;

         if (owner)
             owner.invalidateList();
@@ -1780,6 +1780,9 @@
         return " ";
     }

+    /**
+     * @private
+     */
     protected function deriveComplexColumnData( data:Object ):Object
     {
         var currentRef:Object = data;
@@ -1792,6 +1795,9 @@
         return currentRef;
     }

+    /**
+     * @private
+     */
     protected function complexColumnSortCompare( obj1:Object, obj2:Object ):int
     {
         if ( !obj1 && !obj2 )


Transferred from the Adobe Open Source Subversion Repository

Revision: 18625
Author:   smgilson@adobe.com
Date:     2010-11-16T20:43:37.417675Z

Log Message:
-----------
ASDoc updates for DataGrid

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/CellPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DataGridEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/DefaultGridItemEditor.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/ComboBoxGridItemEditor.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/CellRegion.as
@@ -14,17 +14,19 @@

 /**
  *  The CellRegion class defines a data structure
- *  used by the spark data grid classes to represent a rectangular region of
- *  cells in the DataGrid control. The origin of the region is specified with
- *  the rowIndex and columnIndex and the extent of the region is specified with
- *  the rowCount and the columnCount.
+ *  used by the Spark data grid classes to represent a rectangular region of
+ *  cells in the control.
+ *  The origin of the region is specified by the
+ *  rowIndex and columnIndex properties.
+ *  The extent of the region is specified by the
+ *  rowCount and the columnCount properties.
  *
- *  @see spark.component.DataGrid
- *  @see spark.component.Grid
+ *  @see spark.components.DataGrid
+ *  @see spark.components.Grid
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
- *  @playerversion AIR 2
+ *  @playerversion AIR 2.5
  *  @productversion Flex 4.5
  */
 public class CellRegion
@@ -40,14 +42,19 @@
     /**
      *  Constructor.
      *
-     *  @param rowIndex The 0-based row index of the origin cell. A value of -1 indicates "not set".
-     *  @param columnIndex The 0-based column index of the origin cell. A value of -1 indicates "not set".
-     *  @param rowCount The number of rows in the cell region.
+     *  @param rowIndex The 0-based row index of the origin cell.
+     *  A value of -1 indicates that the value is not set.
+     *
+     *  @param columnIndex The 0-based column index of the origin cell.
+     *  A value of -1 indicates that the value is not set.
+     *
+     *  @param rowCount The number of rows in the cell region.
+     *
      *  @param columnCount The number of columns in the cell region.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function CellRegion(rowIndex:int = -1, columnIndex:int = -1,
@@ -81,7 +88,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get columnCount():int
@@ -105,13 +112,13 @@

     /**
      *  The 0-based column index of the origin of the cell region.
-     *  A value of -1 indicates "not set".
+     *  A value of -1 indicates that the value is not set.
      *
      *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get columnIndex():int
@@ -140,7 +147,7 @@
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5
      */
     public function get rowCount():int
@@ -164,13 +171,13 @@

     /**
      *  The 0-based row index of the origin of the cell region.
-     *  A value of -1 indicates "not set".
+     *  A value of -1 indicates that the value is not set.
      *
      *  @default -1
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
-     *  @playerversion AIR 2.0
+     *  @playerversion AIR 2.5
      *  @productversion Flex 4.5

      */


Transferred from the Adobe Open Source Subversion Repository

Revision: 20382
Author:   hmuller@adobe.com
Date:     2011-02-18T18:40:08.598722Z

Log Message:
-----------
GridLayout/invalidateCell() now unconditionally calls getPreferredBoundsHeight() for the sake of DefaultGridItemRenderer, UITextFieldGridItemRenderer.

GridLayout/layoutItemRenderer() once again eagerly applies validateNow() to non-GraphicElement renderers.  My brain is beginning to reflow.

QE notes: Jacob has excluded three Mustella tests
Doc notes:
Bugs: SDK-29560, SDK-29546
Reviewer: Carol
Tests run: checkin, mustella
Is noteworthy for integration: no

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

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

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -1033,7 +1033,7 @@
                 initializeItemRenderer(renderer, rowIndex, colIndex);

                 var colWidth:Number = gridDimensions.getColumnWidth(colIndex);
-                layoutItemRenderer(renderer, cellX, cellY, colWidth, rowHeight);
+                layoutItemRenderer(renderer, cellX, cellY, colWidth, rowHeight);

                 gridDimensions.setCellHeight(rowIndex, colIndex, renderer.getPreferredBoundsHeight());
                 cellX += colWidth + colGap;
@@ -1145,7 +1145,14 @@

         layoutItemRenderer(renderer, rendererX, rendererY, rendererWidth, rendererHeight);

-        if (gridDimensions.variableRowHeight && (rendererHeight != renderer.getPreferredBoundsHeight()))
+        // If the renderer's preferredHeight has changed and variableRowHeight=true, then
+        // the row's height may have changed, which implies we need to layout -everything-.
+        // Warning: the unconditional getPreferredBoundsHeight() call also serves to
+        // force DefaultGridItemRenderer and UITextFieldGridItemRenderer to validate;
+        // similar to what happens in layoutItemRenderers() and updateTypicalCellSizes()
+
+        const preferredRendererHeight:Number = renderer.getPreferredBoundsHeight();
+        if (gridDimensions.variableRowHeight && (rendererHeight != preferredRendererHeight))
             grid.invalidateDisplayList();
     }

@@ -2164,13 +2171,6 @@

     /**
      *  @private
-     *  By default, this method uses the same approach as DataGroup/getVirtualElementAt() for elements
-     *  that implement IInvalidating: elt.validateNow(), elt.setLayoutBoundsSize(), elt.validateNow().
-     *  This is supposed to eliminate problems with (text) components that defer reflow until the next
-     *  updateDisplayList() pass.
-     *
-     *  Since doing so is rather expensive, we economize when the renderer is an IUITextField
-     *  since UITextField and UIFTETextField reflow synchronously.
      */
     private function layoutItemRenderer(renderer:IGridItemRenderer, x:Number, y:Number, width:Number, height:Number):void
     {
@@ -2193,6 +2193,12 @@
             }

             renderer.setLayoutBoundsSize(width, height);
+        }
+
+        if ((renderer is IInvalidating) && !(renderer is IGraphicElement))
+        {
+            const validateNowRenderer:IInvalidating = renderer as IInvalidating;
+            validateNowRenderer.validateNow();
         }

         renderer.setLayoutBoundsPosition(x, y);