ASSIGNED - # 28: calc and percentages don't work for positions
http://forkbase-trac.fork.de:8088/trac/ticket/28

- working now
- other changes:
	lots of refactoring in UIComponent to change all spatterings of auto flag usage to use m_autoFlags

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

--- src/reprise/ui/UIComponent.as
+++ src/reprise/ui/UIComponent.as
@@ -45,7 +45,33 @@
 		/***************************************************************************
 		*							protected properties							   *
 		***************************************************************************/
-		protected static var DEFAULT_SCROLLBAR_WIDTH : int = 16;
+		protected static const WIDTH_RELATIVE_PROPERTIES : Array =
+		[
+			['marginTop', false],
+			['marginBottom', false],
+			['marginLeft', false],
+			['marginRight', false],
+			['paddingTop', false],
+			['paddingBottom', false],
+			['paddingLeft', false],
+			['paddingRight', false],
+			['left', true],
+			['right', true]
+		];
+		protected static const HEIGHT_RELATIVE_PROPERTIES : Array =
+		[
+			['top', true],
+			['bottom', true]
+		];
+		protected static const OWN_WIDTH_RELATIVE_PROPERTIES:Array =
+		[
+			['borderTopLeftRadius', false],
+			['borderTopRightRadius', false],
+			['borderBottomLeftRadius', false],
+			['borderBottomRightRadius', false]
+		];
+
+		protected static const DEFAULT_SCROLLBAR_WIDTH : int = 16;

 		protected var m_containingBlock : UIComponent;
@@ -74,10 +100,7 @@

 		protected var m_positionOffset : Point;

-		protected var m_leftIsAuto : Boolean;
-		protected var m_rightIsAuto : Boolean;
-		protected var m_topIsAuto : Boolean;
-		protected var m_bottomIsAuto : Boolean;
+		protected var m_autoFlags : Object = {};

 		protected var m_paddingTop : Number = 0;
 		protected var m_paddingLeft : Number = 0;
@@ -268,7 +291,7 @@
 			}
 			m_currentStyles.top = value;
 			m_instanceStyles.setStyle('top', value + "px");
-			m_topIsAuto = false;
+			m_autoFlags.top = false;
 			if (!m_positionInFlow)
 			{
 				m_top = value;
@@ -295,7 +318,7 @@
 			}
 			m_currentStyles.left = value;
 			m_instanceStyles.setStyle('left', value + "px");
-			m_leftIsAuto = false;
+			m_autoFlags.left = false;
 			if (!m_positionInFlow)
 			{
 				m_left = value;
@@ -322,7 +345,7 @@
 			}
 			m_currentStyles.right = value;
 			m_instanceStyles.setStyle('right', value + "px");
-			m_rightIsAuto = false;
+			m_autoFlags.right = false;
 			if (!m_positionInFlow)
 			{
 				m_right = value;
@@ -350,7 +373,7 @@
 			}
 			m_currentStyles.bottom = value;
 			m_instanceStyles.setStyle('bottom', value + "px");
-			m_bottomIsAuto = false;
+			m_autoFlags.bottom = false;
 			if (!m_positionInFlow)
 			{
 				m_bottom = value;
@@ -947,35 +970,20 @@

 			var autoFlag:String = CSSProperty.AUTO_FLAG;

-			var widthProperty:CSSProperty = m_complexStyles.getStyle('width');
-			var outerWidthProperty:CSSProperty =
-				m_complexStyles.getStyle('outerWidth');
-			var widthIsAuto:Boolean =
-				widthProperty.specifiedValue() == autoFlag &&
-				(!outerWidthProperty ||
-				outerWidthProperty.specifiedValue() == autoFlag);
-			var heightProperty:CSSProperty = m_complexStyles.getStyle('height');
-			var outerHeightProperty:CSSProperty =
-				m_complexStyles.getStyle('outerHeight');
-			var heightIsAuto:Boolean =
-				(!heightProperty || heightProperty.specifiedValue() == autoFlag) &&
-				(!outerHeightProperty ||
-				outerHeightProperty.specifiedValue() == autoFlag);
-
 			var oldIntrinsicHeight : Number = m_intrinsicHeight;
 			var oldIntrinsicWidth : Number = m_intrinsicWidth;

 			measure();

-			if (widthIsAuto || heightIsAuto)
-			{
-				if (widthIsAuto &&
+			if (m_autoFlags.width || m_autoFlags.height)
+			{
+				if (m_autoFlags.width &&
 					(m_currentStyles.display == 'inline' ||
-					(!m_positionInFlow && (m_leftIsAuto || m_rightIsAuto))))
+					(!m_positionInFlow && (m_autoFlags.left || m_autoFlags.right))))
 				{
 					m_width = m_intrinsicWidth;
 				}
-				if (m_intrinsicHeight != -1 && heightIsAuto)
+				if (m_intrinsicHeight != -1 && m_autoFlags.height)
 				{
 					m_height = m_intrinsicHeight;
 				}
@@ -1021,8 +1029,8 @@
 					//check if at least one of the vertical and one of the
 					//horizontal dimensions is specified. If not, we need to
 					//let the parent do the positioning
-					if ((m_topIsAuto && m_bottomIsAuto) ||
-						(m_leftIsAuto && m_rightIsAuto))
+					if ((m_autoFlags.top && m_autoFlags.bottom) ||
+						(m_autoFlags.left && m_autoFlags.right))
 					{
 						parentReflowNeeded = true;
 	//					trace("f reason for reflow: All positions in " +
@@ -1204,57 +1212,10 @@
 			resolveContainingBlock();
 			resolveRelativeStyles(styles);
 		}
-
+
 		protected function applyStyles() : void
 		{
-			var autoFlag:String = CSSProperty.AUTO_FLAG;
 			var styles : CSSDeclaration = m_complexStyles;
-
-			var prop:CSSProperty;
-			prop = styles.getStyle('left');
-			if (!prop || prop.specifiedValue() == autoFlag)
-			{
-				m_leftIsAuto = true;
-				m_left = 0;
-			}
-			else
-			{
-				m_leftIsAuto = false;
-				m_left = prop.valueOf() as Number;
-			}
-			prop = styles.getStyle('right');
-			if (!prop || prop.specifiedValue() == autoFlag)
-			{
-				m_rightIsAuto = true;
-				m_right = 0;
-			}
-			else
-			{
-				m_rightIsAuto = false;
-				m_right = prop.valueOf() as Number;
-			}
-			prop = styles.getStyle('top');
-			if (!prop || prop.specifiedValue() == autoFlag)
-			{
-				m_topIsAuto = true;
-				m_top = 0;
-			}
-			else
-			{
-				m_topIsAuto = false;
-				m_top = prop.valueOf() as Number;
-			}
-			prop = styles.getStyle('bottom');
-			if (!prop || prop.specifiedValue() == autoFlag)
-			{
-				m_bottomIsAuto = true;
-				m_bottom = 0;
-			}
-			else
-			{
-				m_bottomIsAuto = false;
-				m_bottom = prop.valueOf() as Number;
-			}

 			m_positionOffset = new Point(0, 0);
 			if (m_positioningType == 'relative')
@@ -1317,6 +1278,22 @@
 			}

+			if (!m_currentStyles.outerWidth)
+			{
+				m_currentStyles.outerWidth = m_width +
+					m_borderLeftWidth + m_paddingLeft +
+					m_borderRightWidth + m_paddingRight;
+			}
+			if (!m_currentStyles.outerHeight)
+			{
+				m_currentStyles.outerHeight = m_height +
+					m_borderTopWidth + m_paddingTop +
+					m_borderBottomWidth + m_paddingBottom;
+			}
+			m_paddingBoxWidth = m_paddingLeft + m_width + m_paddingRight;
+			m_paddingBoxHeight = m_paddingTop + m_height + m_paddingBottom;
+
+
 			if (m_currentStyles.tabIndex != null)
 			{
 				m_tabIndex = m_currentStyles.tabIndex;
@@ -1374,20 +1351,6 @@
 				super.alpha = 1;
 			}

-			if (!m_currentStyles.outerWidth)
-			{
-				m_currentStyles.outerWidth = m_width +
-					m_borderLeftWidth + m_paddingLeft +
-					m_borderRightWidth + m_paddingRight;
-			}
-			if (!m_currentStyles.outerHeight)
-			{
-				m_currentStyles.outerHeight = m_height +
-					m_borderTopWidth + m_paddingTop +
-					m_borderBottomWidth + m_paddingBottom;
-			}
-			m_paddingBoxWidth = m_paddingLeft + m_width + m_paddingRight;
-			m_paddingBoxHeight = m_paddingTop + m_height + m_paddingBottom;
 //			trace(m_selectorPath);
 //			trace(m_complexStyles);
 		}
@@ -1611,18 +1574,8 @@
 			var parentW:Number = m_containingBlock.m_currentStyles.width;
 			var parentH:Number = m_containingBlock.m_currentStyles.height;

-			var propsResolvableToContainingWidth:Array =
-			[
-				'marginTop',
-				'marginBottom',
-				'marginLeft',
-				'marginRight',
-				'paddingTop',
-				'paddingBottom',
-				'paddingLeft',
-				'paddingRight'
-			];
-			resolvePropsToValue(styles, propsResolvableToContainingWidth, parentW);
+			resolvePropsToValue(styles, WIDTH_RELATIVE_PROPERTIES, parentW);
+			resolvePropsToValue(styles, HEIGHT_RELATIVE_PROPERTIES, parentH);

 			var wProp : CSSProperty = styles.getStyle('width');
 			var hProp : CSSProperty = styles.getStyle('height');
@@ -1630,14 +1583,13 @@
 			if (wProp.specifiedValue() == 'auto')
 			{
 				var outerWidthProp : CSSProperty = styles.getStyle('outerWidth');
-				if (outerWidthProp != null &&
-					outerWidthProp.specifiedValue() != 'auto')
+				if (outerWidthProp && outerWidthProp.specifiedValue() != 'auto')
 				{
 					var specOuterWidth : Number;
 					if (outerWidthProp.isRelativeValue())
 					{
 						specOuterWidth = Math.round(
-							outerWidthProp.resolveRelativeValueTo(parentW));
+							outerWidthProp.resolveRelativeValueTo(parentW, this));
 					}
 					else
 					{
@@ -1647,49 +1599,50 @@
 						m_marginLeft - m_marginRight -
 						m_paddingLeft - m_paddingRight -
 						m_borderLeftWidth - m_borderRightWidth;
-				}
-				else if (!m_positionInFlow)
-				{
-					m_width = m_currentStyles.width = parentW -
-						m_left - m_right -
-						m_marginLeft - m_marginRight -
-						m_paddingLeft - m_paddingRight -
-						m_borderLeftWidth - m_borderRightWidth;
+					m_autoFlags.width = false;
+				}
+				else
+				{
+					m_autoFlags.width = true;
+					if (!m_positionInFlow)
+					{
+						m_width = m_currentStyles.width = parentW -
+							m_left - m_right -
+							m_marginLeft - m_marginRight -
+							m_paddingLeft - m_paddingRight -
+							m_borderLeftWidth - m_borderRightWidth;
+					}
+					else
+					{
+						m_width = m_currentStyles.width = parentW -
+							m_marginLeft - m_marginRight -
+							m_paddingLeft - m_paddingRight -
+							m_borderLeftWidth - m_borderRightWidth;
+					}
+				}
+			}
+			else
+			{
+				m_autoFlags.width = false;
+				if (wProp.isRelativeValue())
+				{
+					var relevantWidth : Number = parentW;
+					if (m_positioningType == 'absolute')
+					{
+						relevantWidth = m_containingBlock.calculateContentWidth() +
+							m_containingBlock.m_paddingLeft +
+							m_containingBlock.m_paddingRight;
+					}
+					m_width = m_currentStyles.width =
+						wProp.resolveRelativeValueTo(relevantWidth);
 				}
 				else
 				{
-					m_width = m_currentStyles.width = parentW -
-						m_marginLeft - m_marginRight -
-						m_paddingLeft - m_paddingRight -
-						m_borderLeftWidth - m_borderRightWidth;
-				}
-			}
-			else if (wProp.isRelativeValue())
-			{
-				var relevantWidth : Number = parentW;
-				if (m_positioningType == 'absolute')
-				{
-					relevantWidth = m_containingBlock.calculateContentWidth() +
-						m_containingBlock.m_paddingLeft +
-						m_containingBlock.m_paddingRight;
-				}
-				m_width = m_currentStyles.width =
-					wProp.resolveRelativeValueTo(relevantWidth);
-			}
-			else
-			{
-				m_width = m_currentStyles.width || 0;
-			}
-
-			var propsResolvableToOwnWidth:Array =
-			[
-				'borderTopLeftRadius',
-				'borderTopRightRadius',
-				'borderBottomLeftRadius',
-				'borderBottomRightRadius'
-			];
+					m_width = m_currentStyles.width || 0;
+				}
+			}
 			//TODO: verify that we should really resolve the border-radii this way
-			resolvePropsToValue(styles, propsResolvableToOwnWidth,
+			resolvePropsToValue(styles, OWN_WIDTH_RELATIVE_PROPERTIES,
 				m_width + m_borderTopWidth);

 			if (hProp.specifiedValue() == 'auto')
@@ -1701,7 +1654,8 @@
 					var specOuterHeight : Number;
 					if (outerHeightProp.isRelativeValue())
 					{
-						specOuterHeight = outerHeightProp.resolveRelativeValueTo(parentH);
+						specOuterHeight =
+							outerHeightProp.resolveRelativeValueTo(parentH, this);
 					}
 					else
 					{
@@ -1711,14 +1665,17 @@
 						m_marginTop - m_marginBottom -
 						m_paddingTop - m_paddingBottom -
 						m_borderTopWidth - m_borderBottomWidth;
+					m_autoFlags.height = false;
 				}
 				else
 				{
-					m_height = m_currentStyles.height;
+					m_autoFlags.height = true;
+					m_height = 0;
 				}
 			}
 			else
 			{
+				m_autoFlags.height = false;
 				if (hProp.isRelativeValue())
 				{
 					m_height = hProp.resolveRelativeValueTo(parentH);
@@ -1733,9 +1690,9 @@
 		protected function resolvePropsToValue(styles : CSSDeclaration,
 			props : Array, baseValue : Number) : void
 		{
-			for (var i:Number = props.length; i--;)
-			{
-				var propName:String = props[i];
+			for (var i : int = props.length; i--;)
+			{
+				var propName:String = props[i][0];
 				var cssProperty:CSSProperty = styles.getStyle(propName);
 				if (cssProperty)
 				{
@@ -1744,10 +1701,12 @@
 						m_currentStyles[propName] = this["m_"+propName] =
 							Math.round(cssProperty.resolveRelativeValueTo(baseValue));
 					}
+					m_autoFlags[propName] = cssProperty.isAuto();
 					this["m_"+propName] = m_currentStyles[propName];
 				}
 				else
 				{
+					m_autoFlags[propName] = props[i][1];
 					m_currentStyles[propName] = this["m_"+propName] = 0;
 				}
 			}
@@ -1865,7 +1824,7 @@
 					}
 				}
 				else if (child.m_positionInFlow ||
-					(child.m_leftIsAuto && child.m_rightIsAuto))
+					(child.m_autoFlags.left && child.m_autoFlags.right))
 				{
 					var childMarginLeft : CSSProperty =
 						childStyles.getStyle('marginLeft');
@@ -1946,7 +1905,7 @@
 				else
 				{
 					if (child.m_float ||
-						(child.m_topIsAuto && child.m_bottomIsAuto))
+						(child.m_autoFlags.top && child.m_autoFlags.bottom))
 					{
 						child.y = currentLineBoxTop + child.m_marginTop;
 					}
@@ -2019,15 +1978,10 @@
 					absolutePosition.x -= child.x;
 					absolutePosition.y -= child.y;

-					if (!child.m_leftIsAuto)
-					{
-						var childMarginLeft : CSSProperty =
-							child.m_complexStyles.getStyle('marginLeft');
-						var childMarginRight : CSSProperty =
-							child.m_complexStyles.getStyle('marginRight');
-						if (!child.m_rightIsAuto &&
-							childMarginLeft && childMarginLeft.isAuto() &&
-							childMarginRight && childMarginRight.isAuto())
+					if (!child.m_autoFlags.left)
+					{
+						if (!child.m_autoFlags.right &&
+							child.m_autoFlags.marginLeft && child.m_autoFlags.marginRight)
 						{
 							//center horizontally if margin-left and margin-right
 							//are both auto and left and right have values.
@@ -2042,22 +1996,17 @@
 								child.m_marginLeft - absolutePosition.x;
 						}
 					}
-					else if (!child.m_rightIsAuto)
+					else if (!child.m_autoFlags.right)
 					{
 						child.x = child.m_containingBlock.m_paddingBoxWidth -
 							child.m_paddingBoxWidth - child.m_borderRightWidth -
 							child.m_right - child.m_marginRight - absolutePosition.x;
 					}

-					if (!child.m_topIsAuto)
-					{
-						var childMarginTop : CSSProperty =
-							child.m_complexStyles.getStyle('marginTop');
-						var childMarginBottom : CSSProperty =
-							child.m_complexStyles.getStyle('marginBottom');
-						if (!child.m_bottomIsAuto &&
-							childMarginTop && childMarginTop.isAuto() &&
-							childMarginBottom && childMarginBottom.isAuto())
+					if (!child.m_autoFlags.top)
+					{
+						if (!child.m_autoFlags.bottom &&
+							child.m_autoFlags.marginTop && child.m_autoFlags.marginBottom)
 						{
 							//center vertically if margin-top and margin-bottom
 							//are both auto and top and bottom have values.
@@ -2072,7 +2021,7 @@
 								child.m_marginTop - absolutePosition.y;
 						}
 					}
-					else if (!child.m_bottomIsAuto)
+					else if (!child.m_autoFlags.bottom)
 					{
 						child.y = child.m_containingBlock.m_paddingBoxHeight -
 							child.m_paddingBoxHeight - child.m_borderBottomWidth -


Fix old/new manifest logic and timebase establishment.

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -465,7 +465,7 @@
 				}
 			}

-			var currentManifest:HLSManifestParser = getManifestForQuality(reloadingQuality);
+			var currentManifest:HLSManifestParser = getManifestForQuality(lastQuality);

 			var timerOnErrorDelay:Number = newManifest.targetDuration * 1000  / 2;

@@ -486,11 +486,11 @@
 				} else if(!checkAnySegmentKnowledge(currentManifest.segments)
 					&& !_bestEffortDownloaderMonitor)
 				{
-					trace("(A) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
-					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, reloadingQuality);
-				}
-
-				if(!checkAnySegmentKnowledge(newManifest.segments) && !checkAnySegmentKnowledge(currentManifest.segments))
+					trace("(B) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
+					_pendingBestEffortRequest = initiateBestEffortRequest(uint.MAX_VALUE, lastQuality);
+				}
+
+				if(!checkAnySegmentKnowledge(newManifest.segments) || !checkAnySegmentKnowledge(currentManifest.segments))
 				{
 					trace("Bailing on reload due to lack of knowledge!");


REPRISE: List.as reverted

REPRISE: List.as reverted

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

--- src/reprise/controls/List.as
+++ src/reprise/controls/List.as
@@ -79,7 +79,7 @@

 		public override function setData(theData:*):void
 		{
-			super.setXMLData(theData);
+			super.setData(theData);
 			options = theData;
 		}


Tweaked Efficiency

Tweaked Efficiency

--- src/Levels/Level.as
+++ src/Levels/Level.as
@@ -291,16 +291,19 @@

 			var pipeShard:LevelShard = delayShard.compositWith(LevelShard.SPD);
+
 			L_PCPU_Basic = new ShardLevel("Efficiency!", pipeShard);
 			L_PCPU_Basic.predecessors.push(L_PTutorial4);
-			L_PCPU_Basic.displayName = "Efficiency"
-			L_PCPU_Basic.info = "This level's a lot like the last tutorial, just with the usual basic instructions (SET/ADD/SAVE) you know so well."
-			L_PCPU_Basic.info += " One thing to keep in mind, though: what happens if you have an instruction which depends directly on a previous instruction?"
-			L_PCPU_Basic.info += "\n\nLet's say you decide to have 'read from registers' in a separate stage from 'write to registers'. (This is reasonable.)"
-			L_PCPU_Basic.info += " In this case, if you have something that writes to a register (e.g. SET R1), followed by an instruction that reads from that register (e.g. ADD R1 R1 -> R2),"
-			L_PCPU_Basic.info += " you'll end up reading the *old* value of the register with the second instruction *before* you write the *new* value in with the first instruction! This problem is called a 'read-before-write' error."
-			L_PCPU_Basic.info += "\n\nThis is a solvable problem - you can use a multiplexer to choose (in the 'read-from-registers' stage) between the values coming out of the registers, and values from later stages (previous instructions)."
-			L_PCPU_Basic.info += " You want to use the newest values possible - so for both registers you're reading, if previous instructions are going to write to that register, select their values instead!"
+			L_PCPU_Basic.displayName = "Efficiency";
+			L_PCPU_Basic.info = "This level's a lot like the last tutorial, just with the usual basic instructions (SET/ADD/SAVE).";
+			L_PCPU_Basic.info += " One thing to keep in mind, though: what happens if you have an instruction which depends directly on a previous instruction?";
+			L_PCPU_Basic.info += "\n\nLet's say you decide to have 'read from registers' in a separate stage from 'write to registers'. (This is reasonable.)";
+			L_PCPU_Basic.info += " In this case, if you have something that writes to a register (e.g. SET R1), followed by an instruction that reads from that register (e.g. ADD R1 R1 -> R2),";
+			L_PCPU_Basic.info += " you'll end up reading the *old* value of the register with the second instruction *before* you write the *new* value in with the first instruction! This problem is called a 'read-before-write' error.";
+			L_PCPU_Basic.info += "\n\nThis is a solvable problem - you can use a multiplexer to choose (in the 'read-from-registers' stage) between the values coming out of the registers, and values from later stages (previous instructions).";
+			L_PCPU_Basic.info += " You want to use the newest values possible - so for both registers you're reading, if previous instructions are going to write to that register, select their values instead!";
+
+			(L_PCPU_Basic.goal as GeneratedGoal).allowedTimePerInstr = 20; //give a little bit of slack

 			L_PCPU_Load = new ShardLevel("Efficient Load", pipeShard.compositWith(LevelShard.LOAD));
 			L_PCPU_Load.predecessors.push(L_PCPU_Basic, L_CPU_Load);
@@ -313,7 +316,6 @@
 			L_PCPU_Jump.predecessors.push(L_PCPU_Basic, L_CPU_Branch);
 			L_PCPU_Branch = new ShardLevel("Efficient Branch", pipeShard.compositWith( LevelShard.JUMP, LevelShard.BRANCH));
 			L_PCPU_Branch.predecessors.push(L_PCPU_Jump);
-

 			var fullEfficientShard:LevelShard = pipeShard.compositWith(LevelShard.ADV, LevelShard.LOAD, LevelShard.JUMP, LevelShard.BRANCH);
 			L_PCPU_Full = new ShardLevel("Full Efficient", fullEfficientShard);


diff code now makes copies of non-primitive objects

--- WeaveCore/src/weave/core/SessionManager.as
+++ WeaveCore/src/weave/core/SessionManager.as
@@ -340,13 +340,19 @@
 			setSessionState(destination, sessionState, true);
 		}

-		private function applyDiff(base:Object, diff:Object):Object
+		private function applyDiffForLinkableVariable(base:Object, diff:Object):Object
 		{
 			if (base === null || diff === null || typeof(base) != 'object' || typeof(diff) != 'object')
-				return diff;
+				return diff; // don't need to make a copy because LinkableVariable makes copies anyway

 			for (var key:String in diff)
-				base[key] = applyDiff(base[key], diff[key]);
+			{
+				var value:* = diff[key];
+				if (value === undefined)
+					delete base[key];
+				else
+					base[key] = applyDiffForLinkableVariable(base[key], value);
+			}

 			return base;
 		}
@@ -368,7 +374,7 @@
 				var lv:ILinkableVariable = linkableObject as ILinkableVariable;
 				if (removeMissingDynamicObjects == false && newState && getQualifiedClassName(newState) == 'Object')
 				{
-					lv.setSessionState(applyDiff(ObjectUtil.copy(lv.getSessionState()), newState));
+					lv.setSessionState(applyDiffForLinkableVariable(copyObject(lv.getSessionState()), newState));
 				}
 				else
 				{
@@ -1441,6 +1447,14 @@

 		public static const DIFF_DELETE:String = 'delete';

+		private function copyObject(object:Object):Object
+		{
+			if (object === null || typeof object != 'object') // primitive value
+				return object;
+			else
+				return ObjectUtil.copy(object); // make copies of non-primitives
+		}
+
 		/**
 		 * @inheritDoc
 		 */
@@ -1451,7 +1465,7 @@

 			// special case if types differ
 			if (typeof(newState) != type)
-				return newState;
+				return copyObject(newState); // make copies of non-primitives

 			if (type == 'xml')
 			{
@@ -1470,7 +1484,7 @@
 			else if (oldState === null || newState === null || type != 'object') // other primitive value
 			{
 				if (oldState !== newState) // no type-casting
-					return newState;
+					return copyObject(newState);

 				return undefined; // no diff
 			}
@@ -1481,7 +1495,7 @@
 				{
 					if (StandardLib.compare(oldState, newState) == 0)
 						return undefined; // no diff
-					return newState;
+					return ObjectUtil.copy(newState);
 				}

 				// create an array of new DynamicState objects for all new names followed by missing old names
@@ -1522,9 +1536,9 @@
 					// If the object specified in newState does not exist in oldState, we don't need to do anything further.
 					// If the class is the same as before, then we can save a diff instead of the entire session state.
 					// If the class changed, we can't save only a diff -- we need to keep the entire session state.
-					// Replace the sessionState in the new DynamicState object with the diff.
 					if (oldTypedState != null && oldTypedState[DynamicState.CLASS_NAME] == className)
 					{
+						// Replace the sessionState in the new DynamicState object with the diff.
 						className = null; // no change
 						diffValue = computeDiff(oldTypedState[DynamicState.SESSION_STATE], sessionState);
 						if (diffValue === undefined)
@@ -1533,6 +1547,7 @@
 							// we only need to specify that this name is still present.
 							result.push(objectName);

+							// see if name order changed
 							if (!changeDetected && oldState[i][DynamicState.OBJECT_NAME] != objectName)
 								changeDetected = true;

@@ -1540,6 +1555,10 @@
 						}
 						sessionState = diffValue;
 					}
+					else
+					{
+						sessionState = copyObject(sessionState);
+					}

 					// save in new array and remove from lookup
 					result.push(DynamicState.create(objectName || null, className, sessionState)); // convert empty string to null
@@ -1571,7 +1590,10 @@
 					{
 						if (!diff)
 							diff = {};
-						diff[oldName] = diffValue;
+						if (newState.hasOwnProperty(oldName))
+							diff[oldName] = diffValue;
+						else
+							diff[oldName] = undefined; // property was removed
 					}
 				}

@@ -1582,7 +1604,7 @@
 					{
 						if (!diff)
 							diff = {};
-						diff[newName] = newState[newName]; // TODO: same object pointer.. potential problem?
+						diff[newName] = copyObject(newState[newName]);
 					}
 				}

@@ -1601,10 +1623,7 @@
 			// special cases
 			if (baseDiff == null || diffToAdd == null || baseType != diffType || baseType != 'object')
 			{
-				if (diffType == 'object') // not a primitive, so make a copy
-					baseDiff = ObjectUtil.copy(diffToAdd);
-				else
-					baseDiff = diffToAdd;
+				baseDiff = copyObject(diffToAdd);
 			}
 			else if (baseDiff is Array && diffToAdd is Array)
 			{
@@ -1657,10 +1676,7 @@
 						var oldTypedState:Object = baseLookup[objectName];
 						if (oldTypedState is String || oldTypedState == null)
 						{
-							if (typedState is String || typedState == null)
-								baseLookup[objectName] = typedState; // avoid unnecessary function call overhead
-							else
-								baseLookup[objectName] = ObjectUtil.copy(typedState);
+							baseLookup[objectName] = copyObject(typedState);
 						}
 						else if (!(typedState is String || typedState == null)) // update dynamic state
 						{


Fix for reference to invalid class member.

--- WeaveJS/src/weavejs/net/WeaveAdminService.as
+++ WeaveJS/src/weavejs/net/WeaveAdminService.as
@@ -340,7 +340,7 @@

 		public function getAuthenticatedUser():WeavePromise/*/<string>/*/
 		{
-			return invokeAdmin(whoAmI, arguments);
+			return invokeAdmin(getAuthenticatedUser, arguments);
 		}

 		public function authenticate(user:String, pass:String):WeavePromise/*/<boolean>/*/


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

--- frameworks/projects/mx/src/mx/containers/Tile.as
+++ frameworks/projects/mx/src/mx/containers/Tile.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 mx.containers
 {


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

--- frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/ISOAPDecoder.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.rpc.soap
 {


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

--- frameworks/projects/spark/src/mx/core/UIFTETextField.as
+++ frameworks/projects/spark/src/mx/core/UIFTETextField.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.core
 {


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

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

 package spark.components
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 6792
Author:   jimurphy@adobe.com
Date:     2009-05-11T18:24:09.346026Z

Log Message:
-----------
Merged revisions 6729,6731,6746,6755,6757,6765,6767-6768,6770-6772,6775,6784-6786,6790 from http://p01weblab02.corp.adobe.com/svn/opensource/flex/sdk/branches/beta1

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/FlashContainerPlaceholder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/FlexContentHolder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/ContainerMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/spark/components/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/TypeHelper.java</path>
<path kind="dir" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types" copyfrom-rev="6790" action="A">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Resize.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/ButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/fxg/swf/FXG2SWFTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/ResizeInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/RadioButtonSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/beta1/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java" copyfrom-rev="6790" action="R">/flex/sdk/trunk/modules/fxgutils/src/java/com/adobe/internal/fxg/swf/types/FXGMatrix.java</path>

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

--- frameworks/projects/spark/src/spark/components/Group.as
+++ frameworks/projects/spark/src/spark/components/Group.as
@@ -846,8 +846,7 @@
             graphics.clear();

         // Render a transparent background fill as necessary to support the mouseOpaque flag.
-        if ( _mouseOpaque && mouseEventReferenceCount != 0
-             && !isNaN(unscaledHeight) && !isNaN(unscaledWidth))
+        if ( _mouseOpaque && mouseEventReferenceCount != 0)
         {
             graphics.beginFill(0xFFFFFF, 0);
             graphics.drawRect(0, 0, unscaledWidth, unscaledHeight);


Transferred from the Adobe Open Source Subversion Repository

Revision: 4097
Author:   aharui@adobe.com
Date:     2008-11-13T05:54:48.462188Z

Log Message:
-----------
FxPanel initial checkin.  Skin is ugly.  Glenn will provide better skin later.

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Glenn
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxPanel.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxPanel.png</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxPanelSkin.mxml</path>

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


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

 package spark.skins.mobile
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 14000
Author:   clucier@adobe.com
Date:     2010-02-05T16:09:03.629809Z

Log Message:
-----------
Merge branch revision 4.x, 13999 --> trunk

----------------------------------------
r13999 | clucier

Moved Inspectable metadata so that it's decorating the correct property.

QE notes: None
Doc notes: None
Bugs: SDK-25159
Reviewer: Deepa
Tests run: Checkin
Is noteworthy for integration: No

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as

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

--- frameworks/projects/spark/src/spark/components/SkinnableContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableContainer.as
@@ -424,14 +424,14 @@
     //----------------------------------
     //  creationPolicy
     //----------------------------------
-
-    [Inspectable(enumeration="auto,all,none", defaultValue="auto")]
-
+
     // Internal flag used when creationPolicy="none".
     // When set, the value of the backing store _creationPolicy
     // style is "auto" so descendants inherit the correct value.
     private var creationPolicyNone:Boolean = false;

+    [Inspectable(enumeration="auto,all,none", defaultValue="auto")]
+
     /**
      *  @inheritDoc
      *


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 17491
Author:   aharui@adobe.com
Date:     2010-08-26T18:31:34.581497Z

Log Message:
-----------
Handle clipped sub-apps

QE notes: none
Doc notes: New optional parameter to SystemManager.getVisibleApplicationRect
Bugs: SDK-26478
Reviewer: Darrell
Tests run: checkintests mustella/MarshallPlan
Is noteworthy for integration: yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/VSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/TreeItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/dataGridClasses/DataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/PopUpManagerImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManagerProxy.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/TileListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/mx/controls/advancedDataGridClasses/FTEAdvancedDataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/systemClasses/MarshallingSupport.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/datavisualization/src/mx/controls/advancedDataGridClasses/AdvancedDataGridItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ComboBox.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/listClasses/ListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/controls/dataGridClasses/FTEDataGridItemRenderer.as</path>

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

--- frameworks/projects/mx/src/mx/controls/ColorPicker.as
+++ frameworks/projects/mx/src/mx/controls/ColorPicker.as
@@ -1252,7 +1252,7 @@

             // Position: top or bottom
             var sm:ISystemManager = systemManager.topLevelSystemManager;
-            var screen:Rectangle = sm.getVisibleApplicationRect();
+            var screen:Rectangle = sm.getVisibleApplicationRect(null, true);

             if (point.y + height + dropdownGap + dropdownSwatch.height > screen.bottom &&
                 point.y > (screen.top + dropdownGap + dropdownSwatch.height)) // Up


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

--- frameworks/projects/mx/src/mx/controls/RadioButton.as
+++ frameworks/projects/mx/src/mx/controls/RadioButton.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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Added suggestPrecision() and roundPrecision()

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -22,6 +22,8 @@
 	import flash.utils.ByteArray;
 	import flash.utils.getQualifiedClassName;
 	import flash.utils.getTimer;
+
+	import flashx.textLayout.tlf_internal;

 	import mx.formatters.DateFormatter;
 	import mx.formatters.NumberFormatter;
@@ -417,6 +419,26 @@
 				for (var d:int = 0; d <= 9; d++)
 					trace('roundSignificant(',n,',',d,') =',roundSignificant(n, d));
 			}
+		}
+
+		/**
+		 * Rounds a number to the nearest multiple of a precision value.
+		 * @param number A number to round.
+		 * @param precision A precision to use.
+		 * @return The number rounded to the nearest multiple of the precision value.
+		 */
+		public static function roundPrecision(number:Number, precision:Number):Number
+		{
+			return Math.round(number / precision) * precision;
+		}
+
+		/**
+		 * @param n The number to round.
+		 * @param d The total number of non-zero digits we care about for small numbers.
+		 */
+		public static function suggestPrecision(n:Number, d:int):Number
+		{
+			return Math.pow(10, Math.min(0, Math.ceil(Math.log(n) / Math.LN10) - d));
 		}

 		/**


"lessThan" optimization

"lessThan" optimization

--- src/aerys/minko/render/shader/part/ShaderPart.as
+++ src/aerys/minko/render/shader/part/ShaderPart.as
@@ -763,7 +763,7 @@

 		protected final function lessEqual(a : Object, b : Object) : SFloat
 		{
-			return or(lessThan(a, b), equal(a, b));
+			return add(lessThan(a, b), equal(a, b));
 		}

 		protected final function equal(a : Object, b : Object) : SFloat


Oh hey, you can set the size of video capture.  Me likey!

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

--- src/as/com/threerings/flash/CameraSnapshotter.as
+++ src/as/com/threerings/flash/CameraSnapshotter.as
@@ -90,6 +90,17 @@
         return (_camera == null) ? null : _camera.name;
     }

+    /**
+     * Just like Camera's setMode().
+     * @see flash.media.Camera#setMode()
+     */
+    public function setMode (width :int, height :int, fps :Number, favorArea :Boolean = true) :void
+    {
+        _camera.setMode(width, height, fps, favorArea);
+        _video.width = _camera.width;
+        _video.height = _camera.height;
+    }
+
     public function takeSnapshot () :void
     {
         if (_camera == null) {


Gamepad controls now also respond correctly to time-sensitive activations

--- com/zehfernando/input/binding/KeyActionBinder.as
+++ com/zehfernando/input/binding/KeyActionBinder.as
@@ -246,6 +246,7 @@
 						filteredControls[i].isActivated = isActivated;
 						if (isActivated) {
 							// Marks as pressed
+							filteredControls[i].lastActivatedTime = getTimer();

 							// Add this activation to the list of current activations
 							(actionsActivations[filteredControls[i].action] as ActivationInfo).activations.push(filteredControls[i]);


Fixed Bloc

Fixed Bloc

--- src/Components/Bloc.as
+++ src/Components/Bloc.as
@@ -97,20 +97,18 @@

 		public function toString():String {
-			var str:String = "";
+			var moduleStrings:Vector.<String> = new Vector.<String>;
 			for each (var module:Module in modules)
-				str += module.saveString();
-			str += U.SAVE_DELIM;
-			if (!modules.length)
-				str += U.SAVE_DELIM;
+				moduleStrings.push(module.saveString());
+			var wireStrings:Vector.<String> = new Vector.<String>;
 			for each (var wire:Wire in wires)
-				str += wire.saveString();
-			return str;
+				wireStrings.push(wire.saveString());
+			return [moduleStrings.join(U.SAVE_DELIM), wireStrings.join(U.SAVE_DELIM)].join(U.MAJOR_SAVE_DELIM);
 		}

 		public static function fromString(str:String, allowableTypes:Vector.<Class> = null, Rooted:Boolean = false):Bloc {
-			var stringSegments:Array = str.split(U.SAVE_DELIM + U.SAVE_DELIM);
+			var stringSegments:Array = str.split(U.MAJOR_SAVE_DELIM);
 			var moduleStrings:Array = stringSegments[0].split(U.SAVE_DELIM);
 			var wireStrings:Array = stringSegments[1].split(U.SAVE_DELIM);


Added TODO for future member/type lookup tweaking

--- as3/xobjas3/src/com/rpath/xobj/XObjUtils.as
+++ as3/xobjas3/src/com/rpath/xobj/XObjUtils.as
@@ -394,6 +394,10 @@
             }

             // ask if this is a member of not
+            //TODO: move this to the start of this funciton and roll in
+            // type mapping done by decoder to eliminate unwanted reflection
+            // and also ease potential for subtypes to "alias" properties as
+            // members (ref RCE-229)
             if (object is IXObjCollection)
             {
                 typeInfo.isMember = (object as IXObjCollection).isElementMember(propName);


switchWorld() is now called immediately after update() in both timestep modes to avoid glitches.

--- net/flashpunk/Engine.as
+++ net/flashpunk/Engine.as
@@ -153,6 +153,9 @@
 			// update input
 			Input.update();

+			// switch worlds
+			if (FP._goto) switchWorld();
+
 			// reset drawing target
 			Draw.resetTarget();

@@ -161,9 +164,6 @@

 			// redraw buffers
 			FP.screen.redraw();
-
-			// switch worlds
-			if (FP._goto) switchWorld();
 		}

 		/** @private Fixed framerate game loop. */
@@ -202,6 +202,9 @@

 				// update input
 				Input.update();
+
+				// switch worlds
+				if (FP._goto) switchWorld();
 			}

 			// reset drawing target
@@ -212,9 +215,6 @@

 			// redraw buffers
 			FP.screen.redraw();
-
-			// switch worlds
-			if (FP._goto) switchWorld();
 		}

 		/** @private Switch Worlds if they've changed. */


fixed a bug in defaultbackgroundrenderer, where under certain circumstances the activeBackgroundImageContainer could be null while attempting to apply the (formerly) loaded backgroundImage

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

--- src/reprise/ui/renderers/DefaultBackgroundRenderer.as
+++ src/reprise/ui/renderers/DefaultBackgroundRenderer.as
@@ -112,6 +112,7 @@
 				{
 					m_backgroundImageLoader.cancel();
 				}
+				m_backgroundImageLoader = null;
 				clearBackgroundImage();
 			}

@@ -183,6 +184,10 @@
 						// we force redrawing here, due to the fact that our size or
 						// the image position could have changed
 						//TODO: verify that this really calls bitmapLoader_complete
+						// @till: that is ugly. if you want to make sure that bitmapLoader_complete
+						// is called you should call it directly. furthermore since
+						// bitmapLoader_complete is normally called via an event, the functionality
+						// of that method should be extracted and then called directly instead!
 						m_backgroundImageLoader.dispatchEvent(
 							new ResourceEvent(Event.COMPLETE, true));
 					}
@@ -214,6 +219,13 @@
 				m_backgroundImageLoader = null;
 			}

+			if (!m_backgroundImageContainer)
+			{
+				m_backgroundImageContainer = Sprite(m_display.addChildAt(
+					new Sprite(), 0));
+				m_backgroundImageContainer.name = 'm_backgroundImageContainer';
+			}
+
 			// if we're already loading the right animation, do nothing
 			if (m_backgroundImageLoader &&
 				m_backgroundImageLoader.url() == m_styles.backgroundImage &&
@@ -512,7 +524,6 @@
 					m_inactiveBackgroundAnimationContainer);
 				m_inactiveBackgroundAnimationContainer = null;
 			}
-
 			var imgContainer : Sprite = m_activeBackgroundAnimationContainer;
 			imgContainer.addChild(m_backgroundImageLoader.content());


added check for ExternalInterface.available

Change-Id: Ia9464cde98e2a90556812e8048abf01b7ddfcd5c

--- WeaveUI/src/weave/application/VisApplication.as
+++ WeaveUI/src/weave/application/VisApplication.as
@@ -55,11 +55,11 @@
 	import weave.Weave;
 	import weave.WeaveProperties;
 	import weave.api.WeaveAPI;
+	import weave.api.getCallbackCollection;
+	import weave.api.reportError;
 	import weave.api.core.ILinkableObject;
 	import weave.api.data.ICSVExportable;
 	import weave.api.data.IDataSource;
-	import weave.api.getCallbackCollection;
-	import weave.api.reportError;
 	import weave.api.ui.IVisTool;
 	import weave.compiler.StandardLib;
 	import weave.core.ExternalSessionStateInterface;
@@ -1556,7 +1556,8 @@
 		{
 			try
 			{
-				ExternalInterface.call("setTitle", Weave.properties.pageTitle.value);
+				if (ExternalInterface.available)
+					ExternalInterface.call("setTitle", Weave.properties.pageTitle.value);
 			}
 			catch (e:Error)
 			{


fixed bug in loadFile() request method

fixed bug in loadFile() request method

--- WeaveUI/src/weave/application/VisApplication.as
+++ WeaveUI/src/weave/application/VisApplication.as
@@ -33,6 +33,7 @@
 	import flash.net.SharedObject;
 	import flash.net.URLRequest;
 	import flash.net.URLRequestHeader;
+	import flash.net.URLRequestMethod;
 	import flash.net.navigateToURL;
 	import flash.system.Capabilities;
 	import flash.ui.ContextMenu;
@@ -287,7 +288,7 @@
 			else
 			{
 				request = new URLRequest(String(url['url']));
-				request.method = url['method'];
+				request.method = url['method'] || URLRequestMethod.GET;
 				var headers:Object = url['requestHeaders'];
 				for (var k:String in headers)
 					request.requestHeaders.push(new URLRequestHeader(k, headers[k]));


fixing crash when switching layout state

--- WeaveCore/src/weave/core/LinkableDynamicDisplayObject.as
+++ WeaveCore/src/weave/core/LinkableDynamicDisplayObject.as
@@ -36,7 +36,6 @@
 			this.addImmediateCallback(this, firstCallback);
 		}

-		private var _oldParent:DisplayObjectContainer = null;
 		private var _parent:DisplayObjectContainer = null;
 		private var _object:DisplayObject = null;

@@ -55,17 +54,16 @@
 		private function updateParentLater():void
 		{
 			if (_object)
-				_object.addEventListener(Event.ENTER_FRAME, updateParent);
+				_object.addEventListener(Event.ENTER_FRAME, updateParentNow);
 		}

-		private function updateParent(event:Event):void
+		private function updateParentNow(event:Event):void
 		{
 			if (event.currentTarget != _object)
 				return;

-			changeParent(_object, _oldParent, _parent);
-			_oldParent = null;
-			_object.removeEventListener(Event.ENTER_FRAME, updateParent);
+			changeParent(_object, null, _parent);
+			_object.removeEventListener(Event.ENTER_FRAME, updateParentNow);
 		}

 		private static function changeParent(child:DisplayObject, oldParent:DisplayObjectContainer, newParent:DisplayObjectContainer):void
@@ -91,8 +89,7 @@
 		 */
 		public function set parent(newParent:DisplayObjectContainer):void
 		{
-			if (!_oldParent)
-				_oldParent = _parent;
+			changeParent(_object, _parent, null);
 			_parent = newParent;
 			updateParentLater();
 		}


Can now login as an anonymous user again

--- src/org/jivesoftware/xiff/core/XMPPConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPConnection.as
@@ -763,20 +763,13 @@
 		protected function sendAnonymousLogin_result(resultIQ:IQ):void
 		{
 			if( resultIQ.type == IQ.RESULT_TYPE ) {
-				try
-				{
-					// update resource
-					var resultAuth:Array = resultIQ.getAllExtensionsByNS(AuthExtension.NS)[0];
-					resource = resultAuth.resource;
-					// dispatch login event
-					loggedIn = true;
-					var event:LoginEvent = new LoginEvent();
-					dispatchEvent( event );
-				}
-				catch (e:Error)
-				{
-					trace("Error : null trapped. Resuming.");
-				}
+				// update resource
+				var resultAuth:AuthExtension = resultIQ.getAllExtensionsByNS(AuthExtension.NS)[0];
+				resource = resultAuth.resource;
+				// dispatch login event
+				loggedIn = true;
+				var event:LoginEvent = new LoginEvent();
+				dispatchEvent( event );
 			}
 		}


fix uri encoding of query parameters

fix uri encoding of query parameters

--- snowplow-as3-tracker/src/com/adobe/net/URI.as
+++ snowplow-as3-tracker/src/com/adobe/net/URI.as
@@ -1197,9 +1197,9 @@
 				// Need to escape the name/value pair so that they
 				// don't conflict with the query syntax (specifically
 				// '=', '&', and <whitespace>).
-				name = queryPartEscape(name);
-				value = queryPartEscape(value);
-
+				name = encodeURIComponent(name);
+				value = encodeURIComponent(value);
+
 				tmpPair = name;

 				if (value.length > 0)


Transferred from the Adobe Open Source Subversion Repository

Revision: 17011
Author:   deeptika@adobe.com
Date:     2010-07-22T12:18:00.759409Z

Log Message:
-----------
Moving ADG related spark item renderers to a new swc, spark_dmv.swc
Those item renderers need to be modified now to reintroduce its dependency on datavisualization.swc with strong typing in code.

QE notes:
Doc notes:
Bugs: FLEXDMV-2294 and SDK-25009 (create spark_dmv.swc for spark dmv classes)
Reviewer:
Tests run:
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/build_framework.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/build.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/defaults.css</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src/SparkDmvClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/build.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/build.xml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/SparkClasses.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/src</path>
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private/frameworks/libs</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark_dmv/manifest_spark_dmv.xml</path>

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

--- frameworks/projects/spark/src/SparkClasses.as
+++ frameworks/projects/spark/src/SparkClasses.as
@@ -23,8 +23,6 @@
  *  For example, Button does not have a reference to ButtonSkin,
  *  but ButtonSkin needs to be in framework.swc along with Button.
  */
-import mx.controls.advancedDataGridClasses.FTEAdvancedDataGridItemRenderer; FTEAdvancedDataGridItemRenderer;
-import mx.controls.advancedDataGridClasses.MXAdvancedDataGridItemRenderer; MXAdvancedDataGridItemRenderer;
 import mx.controls.dataGridClasses.FTEDataGridItemRenderer; FTEDataGridItemRenderer;
 import mx.controls.MXFTETextInput; MXFTETextInput;
 import mx.core.UIFTETextField; UIFTETextField;


Transferred from the Adobe Open Source Subversion Repository

Revision: 1968
Author:   jimurphy@adobe.com
Date:     2008-06-05T15:31:56.961691Z

Log Message:
-----------
Merge 3.0.x revisions [1940,1954] -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemHistoryButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemTree.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/mac/AIR Integration Kit.tbz2</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumeration.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/utils/DirectoryEnumerationMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/AIREvent.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FileEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/StatusBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/in/air/win/AIR Integration Kit.zip</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemDataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/ApplicationTitleBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMinimizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowMaximizeButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowRestoreButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/StatusBarBackgroundSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/IWindow.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemSizeDisplayMode.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/airframework/src/mx/events/FlexNativeWindowBoundsEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowBackground.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/skins/halo/WindowCloseButtonSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FlexNativeMenu.as</path>

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

--- frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as
+++ frameworks/projects/airframework/src/mx/events/FlexNativeMenuEvent.as
@@ -22,7 +22,7 @@
  *
  *  @see mx.controls.FlexNativeMenu
  *
- *  @productversion Apollo 1.0
+ *  @playerversion AIR 1.1
  */
 public class FlexNativeMenuEvent extends Event
 {


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6609
Author:   gruehle@adobe.com
Date:     2009-05-04T22:47:31.285324Z

Log Message:
-----------
Add theme attribute to theme-specific style metadata.

Example of a halo-specific style:
[Style(name="cornerRadius", type="Number", format="Length", inherit="no", theme="halo")]

Example of a spark-specific style:
[Style(name="baseColor", type="uint", format="Color", inherit="yes", theme="spark")]

Style metadata without a theme attribute is theme-agnostic, and works with either spark or halo.

Bugs: SDK-20606

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Scroller.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/styles/metadata/FillStyles.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/flex4/src/spark/components/supportClasses/ButtonBase.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/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/SkinStyles.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/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/metadata/BorderStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Spinner.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/metadata/BarColorStyle.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/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/CheckBox.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/styles/metadata/IconColorStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RadioButton.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/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/styles/metadata/SelectedFillColorsStyle.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/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.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/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/TextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.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/core/ScrollControlBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/framework/src/mx/styles/metadata/BarColorStyle.as
+++ frameworks/projects/framework/src/mx/styles/metadata/BarColorStyle.as
@@ -23,5 +23,5 @@
  *  @playerversion AIR 1.1
  *  @productversion Flex 3
  */
-[Style(name="barColor", type="uint", format="Color", inherit="yes")]
+[Style(name="barColor", type="uint", format="Color", inherit="yes", theme="halo")]


Ye olde typoe.

Ye olde typoe.

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

--- src/as/com/threerings/crowd/data/TokenRing.as
+++ src/as/com/threerings/crowd/data/TokenRing.as
@@ -81,7 +81,7 @@
      */
     public function holdsToken (token :int) :Boolean
     {
-        return (_token & token) == token;
+        return (_tokens & token) == token;
     }

     /**


Cope with non-Loader media objects that have set up their own masks.
God, what a disaster. I'd say the right thing to do would be to add the
mask directly to the media container, but we rely in a few places on being
able to easily decorate the media container by winging other objects off
the edges, and we don't want to just create one mask that's big enough for
the user media as well as our decorations (because then malicious user
media could alter what the user perceives as our decorations).

Perhaps the right thing to do is make MsoySprite not be a subclass
of MediaContainer, but contain one. That's a refactor I won't be
rabbit-holing right now, thankyou.

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

--- src/as/com/threerings/flash/MediaContainer.as
+++ src/as/com/threerings/flash/MediaContainer.as
@@ -220,10 +220,19 @@
     public function shutdown (completely :Boolean = true) :void
     {
         try {
-            // remove the mask
+            // remove the mask (but only if we added it)
             if (_media != null && _media.mask != null) {
-                removeChild(_media.mask);
-                _media.mask = null;
+                try {
+                    removeChild(_media.mask);
+                    _media.mask = null;
+
+                } catch (argErr :ArgumentError) {
+                    // If we catch this error, it was thrown in removeChild
+                    // and means that we did not add the media's mask,
+                    // and so shouldn't remove it either. The action we
+                    // take here is NOT setting _media.mask = null.
+                    // Then, we continue happily...
+                }
             }

             if (_media is Loader) {
@@ -436,6 +445,19 @@
     {
         var mask :Shape;
         if (_media.mask != null) {
+            // see if the mask was added by us
+            try {
+                getChildIndex(_media.mask);
+
+            } catch (argErr :ArgumentError) {
+                // oy! We are not the controllers of this mask, it must
+                // have been added by someone else. This probably means
+                // that the _media is not a Loader, and so we should just
+                // leave it alone with its custom mask.
+                return;
+            }
+
+            // otherwise, it's a mask we previously configured
             mask = (_media.mask as Shape);

         } else {


setting rootCause of fault

setting rootCause of fault

--- WeaveData/src/weave/services/URLRequestUtils.as
+++ WeaveData/src/weave/services/URLRequestUtils.as
@@ -583,6 +583,7 @@
 		}
 		else
 			fault = new Fault(event.type, event.type, "Request cancelled");
+		fault.rootCause = this;
 		applyFault(fault);
 		_isClosed = true;
 	}


explain how "is player visible" heuristics works related to #213

--- src/org/mangui/hls/controller/FPSController.as
+++ src/org/mangui/hls/controller/FPSController.as
@@ -60,6 +60,10 @@
         var newTimer : int = getTimer();
         if(_lastTimer) {
           var delta:int = newTimer - _lastTimer;
+          /* according to http://www.kaourantin.net/2010/03/timing-it-right.html, when player is hidden, Flash timer only runs at 8Hz.
+             here we armed our timer to 50ms, if delta time between 2 runs is more than 100ms, consider that our player is hidden ...
+          */
+          the idea here is
           if(delta && delta < 100) {
             if(_hiddenVideo == false) {
               var deltaDroppedFrames : int = _hls.stream.info.droppedFrames - _lastdroppedFrames;


Added x,y to Visual Test Case

Added x,y to Visual Test Case

--- asunit-4.0/test/asunit/framework/VisualTestCaseTest.as
+++ asunit-4.0/test/asunit/framework/VisualTestCaseTest.as
@@ -22,11 +22,15 @@

         [Test]
         public function testDrawnSize():void {
+            sprite.x = 110;
+            sprite.y = 115;
             sprite.graphics.beginFill(0xFF0000);
             sprite.graphics.drawRect(0, 0, 100, 200);

             assertEquals(100, sprite.width);
             assertEquals(200, sprite.height);
+            assertEquals(110, sprite.x);
+            assertEquals(115, sprite.y);
         }

         [Test]