FEC-4300 - better support for early phase seeking.

when performing seek at the beginning of the entry, player downloads
all segments instead of the seeked segments

Conflicts:
	HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as

--- HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
+++ HLSPlugin/src/com/kaltura/hls/HLSIndexHandler.as
@@ -40,7 +40,7 @@
 	{
 		// Polling interval when waiting on stuff like manifest reloads.
 		public static const SHORT_LIVE_STALL_DELAY:Number = 0.25;
-
+
 		// Time in seconds to wait before retrying a LIVE_STALL
 		public static const RETRY_INTERVAL:uint = 3;

@@ -48,34 +48,36 @@
 		public var bumpedTime:Boolean = false;
 		// The new current seek target.
 		public var bumpedSeek:Number = 0;
-
+
 		public var _lastSequence:int = 0;
 		public var _lastSequenceManifest:HLSManifestParser = null;
-
+
+		public var _pendingStartTime:Number = NaN;
+
 		public function updateLastSequence(newManifest:HLSManifestParser, newSeq:int):void
 		{
 			trace("UPDATING LAST SEQUENCE " + newSeq + " manifest=" + newManifest.fullUrl);
 			_lastSequence = newSeq;
 			_lastSequenceManifest = newManifest;
 		}
-
+
 		public function getLastSequence():int
 		{
 			return _lastSequence;
 		}
-
+
 		public function getLastSequenceManifest():HLSManifestParser
 		{
 			return _lastSequenceManifest;
 		}
-
+
 		public function getLastSequenceSegments():Vector.<HLSManifestSegment>
 		{
 			if(_lastSequenceManifest)
 				return _lastSequenceManifest.segments;
 			return new Vector.<HLSManifestSegment>();
 		}
-
+
 		public var lastKnownPlaylistStartTime:Number = 0.0;
 		public var lastQuality:int = 0;
 		public var targetQuality:int = 0;
@@ -112,12 +114,12 @@
 		private var _bestEffortLastGoodFragmentDownloadTime:Date = null;

 		private var _pendingBestEffortRequest:HTTPStreamRequest = null;
-
+
 		private var _pendingBestEffortStartTime:int = -1;
-
+
 		public static var _lastBestEffortFetchURI:String;
 		public static var _lastBestEffortFetchDuration:Number;
-
+
 		private function isBestEffortActive():Boolean
 		{
 			var dt:int = getTimer() - _pendingBestEffortStartTime;
@@ -129,27 +131,27 @@
 				return true;
 			return false;
 		}
-
+
 		// constants used by getNextRequestForBestEffortPlay:
 		private static const BEST_EFFORT_PLAY_SITUAUTION_NORMAL:String = "normal";
 		private static const BEST_EFFORT_PLAY_SITUAUTION_DROPOUT:String = "dropout";
 		private static const BEST_EFFORT_PLAY_SITUAUTION_LIVENESS:String = "liveness";
 		private static const BEST_EFFORT_PLAY_SITUAUTION_DONE:String = "done";
-
+
 		// We keep a list of witnesses of known PTS start values for segments.
 		// This is indexed by segment URL and returns the PTS start for that
 		// seg if known.  Since all segments are immutable, we can keep this
 		// as a global cache.
 		public static var startTimeWitnesses:Object = {};
 		public static var endTimeWitnesses:Object = {};
-
-
+
+
 		CONFIG::LOGGING
 		{
 			private static const logger:Logger = Log.getLogger("org.osmf.net.httpstreaming.HTTPNetStream");
 			private var previouslyLoggedState:String = null;
 		}
-
+
 		public function HLSIndexHandler(_resource:MediaResourceBase, _fileHandler:HTTPStreamingFileHandlerBase)
 		{
 			resource = _resource as HLSStreamingResource;
@@ -157,7 +159,7 @@
 			baseUrl = manifest.baseUrl;
 			fileHandler = _fileHandler as M2TSFileHandler;
 			fileHandler.extendedIndexHandler = this;
-
+
 			_bestEffortFileHandler.addEventListener(HTTPStreamingEvent.FRAGMENT_DURATION, onBestEffortParsed);
 			_bestEffortFileHandler.isBestEffort = true;
 		}
@@ -182,7 +184,7 @@
 		{
 			// Keep track of whatever segments we've assigned to.
 			var setSegments:Object = {};
-
+
 			// First, set any exactly known values.
 			for(var i:int=0; i<segments.length; i++)
 			{
@@ -197,7 +199,7 @@

 				setSegments[i] = 1;
 			}
-
+
 			if(segments.length > 1)
 			{
 				// Then fill in any unknowns scanning forward....
@@ -210,7 +212,7 @@
 					segments[i].startTime = segments[i-1].startTime + segments[i-1].duration;
 					setSegments[i] = 1;
 				}
-
+
 				// And scanning back...
 				for(i=segments.length-2; i>=0; i--)
 				{
@@ -233,14 +235,14 @@
 			/*trace("Last 10 manifest time reconstruction");
 			for(i=Math.max(0, segments.length - 100); i<segments.length; i++)
 			{
-				trace("segment #" + i + " start=" + segments[i].startTime + " duration=" + segments[i].duration + "uri=" + segments[i].uri);
+			trace("segment #" + i + " start=" + segments[i].startTime + " duration=" + segments[i].duration + "uri=" + segments[i].uri);
 			}
 			trace("Reconstructed manifest time with knowledge=" + checkAnySegmentKnowledge(segments) + " firstTime=" + (segments.length > 1 ? segments[0].startTime : -1) + " lastTime=" + (segments.length > 1 ? segments[segments.length-1].startTime : -1));*/
-
+
 			// Done!
 			return segments;
 		}
-
+
 		/**
 		 * Return true if we have encountered any segments from this list of segments. Useful for
 		 * determining if we need to do a best effort based seek and/or if the estimates are any good.
@@ -254,10 +256,10 @@
 				if(startTimeWitnesses.hasOwnProperty(segments[i].uri))
 					return true;
 			}
-
+
 			return false;
 		}
-
+
 		public static function getSegmentBySequence(segments:Vector.<HLSManifestSegment>, id:int):HLSManifestSegment
 		{
 			// Find matches.
@@ -268,11 +270,11 @@
 					continue;
 				return seg;
 			}
-
+
 			return null;
 		}
-
-
+
+
 		public static function getSegmentBySequenceCapped(segments:Vector.<HLSManifestSegment>, id:int):HLSManifestSegment
 		{
 			if(segments.length >= 1)
@@ -285,7 +287,7 @@
 					return segments[segments.length - 1];
 				}
 			}
-
+
 			// Find matches via linear search.
 			for(var i:int=0; i<segments.length; i++)
 			{
@@ -294,10 +296,10 @@
 					continue;
 				return seg;
 			}
-
+
 			return null;
 		}
-
+
 		public static function getSegmentStartTimeBySequence(segments:Vector.<HLSManifestSegment>, id:int):Number
 		{
 			// Find matches.
@@ -307,10 +309,10 @@
 				if(seg.id == id)
 					return seg.startTime;
 			}
-
+
 			return -1;
 		}
-
+
 		/**
 		 * Find the segment from a time-ordered list containing the specified time.
 		 *
@@ -354,7 +356,7 @@
 						return segments[i];
 				}
 			}
-
+
 			// No match, dump to aid debug.
 			var seg:HLSManifestSegment;
 			if(segments.length <= 10)
@@ -373,9 +375,9 @@
 					seg = segments[i];
 					trace("#" + i + " id=" + seg.id + " start=" + seg.startTime + " end=" + (seg.startTime + seg.duration));
 				}
-
+
 				trace(" .... skipping middle ....");
-
+
 				// Last 3
 				for(i=segments.length-4; i<segments.length-1; i++)
 				{
@@ -383,10 +385,10 @@
 					trace("#" + i + " id=" + seg.id + " start=" + seg.startTime + " end=" + (seg.startTime + seg.duration));
 				}
 			}
-
+
 			return null;
 		}
-
+
 		/**
 		 * Get the index of the segment containing a certain time.
 		 */
@@ -397,7 +399,7 @@
 				return -1;
 			return seg.id;
 		}
-
+
 		public override function initialize(indexInfo:Object):void
 		{
 			postRatesReady();
@@ -441,10 +443,10 @@
 		{
 			if (reloadTimer)
 				reloadTimer.stop(); // In case the timer is active - don't want to do another reload in the middle of it
-
+
 			trace("Scheduling reload for quality " + quality);
 			reloadingQuality = quality;
-
+
 			// Reload the manifest we were given, if we were given a manifest
 			var manToReload:HLSManifestParser = manifest ? manifest : getManifestForQuality(reloadingQuality);
 			if(getTimer() - manToReload.timestamp < (manToReload.targetDuration * 500))
@@ -454,12 +456,12 @@
 				dispatchDVRStreamInfo();
 				updateTotalDuration();
 				reloadingManifest = null; // don't want to hang on to it
-
+
 				if (reloadTimer) reloadTimer.start();
-
+
 				stalled = false;
 				HLSHTTPNetStream.hasGottenManifest = true;
-
+
 				return;
 			}

@@ -580,7 +582,7 @@

 			return true;
 		}
-
+
 		/**
 		 * Attempt to remap a sequence from an old manifest to a new.
 		 *
@@ -597,21 +599,21 @@
 				trace("remapSequence - no currentManifest!")
 				return -1;
 			}
-
+
 			if(newManifest == null)
 			{
 				trace("remapSequence - no newManifest!");
 				return -1;
 			}
-
+
 			if(currentManifest.fullUrl == newManifest.fullUrl)
 			{
 				trace("Remapping from/to same URL, no op.");
 				return currentSequence;
 			}
-
+
 			var newSequence:int = -1;
-
+
 			// Check knowledge on both sequences and queue request as appropriate.
 			if(!checkAnySegmentKnowledge(newManifest.segments) && !isBestEffortActive())
 			{
@@ -623,7 +625,7 @@
 				trace("(B) Encountered a live/VOD manifest with no timebase knowledge, request newest segment via best effort path for quality " + reloadingQuality);
 				_pendingBestEffortRequest = initiateBestEffortRequest(getLastSequence() + 1, lastQuality, currentManifest.segments, currentManifest);
 			}
-
+
 			if(!checkAnySegmentKnowledge(newManifest.segments) || !checkAnySegmentKnowledge(currentManifest.segments))
 			{
 				trace("Bailing on remap due to lack of knowledge!");
@@ -631,10 +633,10 @@
 				// re-reload.
 				reloadingManifest = null; // don't want to hang on to this one.
 				if (reloadTimer) reloadTimer.start();
-
+
 				return -1;
 			}
-
+
 			// Remap time!
 			updateSegmentTimes(currentManifest.segments);
 			updateSegmentTimes(newManifest.segments, currentManifest.segments[0].startTime);
@@ -642,7 +644,7 @@
 			const fudgeTime:Number = 0.2; //1.0 / 24; // Approximate acceptable jump.
 			var currentSeg:HLSManifestSegment = getSegmentBySequence(currentManifest.segments, currentSequence);
 			var newSeg:HLSManifestSegment = currentSeg ? getSegmentContainingTime(newManifest.segments, currentSeg.startTime + (end ? currentSeg.duration + fudgeTime : 0) , end) : null;
-
+
 			// When in live stream, try to keep things in bound.
 			if(newSeg == null)
 			{
@@ -653,12 +655,12 @@
 				}

 				trace("Remapping from " + currentSequence);
-
+
 				if(currentSeg)
 				{
 					// Guess by time....
 					trace("Found last seg with startTime = " + currentSeg.startTime + " duration=" + currentSeg.duration);
-
+
 					// If the segment is beyond last ID, then jump to end...
 					if(currentSeg.startTime + currentSeg.duration >= newManifest.segments[newManifest.segments.length-1].startTime)
 					{
@@ -675,7 +677,7 @@
 				{
 					// Guess by sequence number...
 					trace("No last seg found");
-
+
 					// If the segment is beyond last ID, then jump to end...
 					if(currentSequence >= newManifest.segments[newManifest.segments.length-1].id)
 					{
@@ -695,12 +697,12 @@
 				newSequence = newSeg.id;
 				trace("===== Remapping to #" + newSequence + " start=" + newSeg.startTime + " end=" + (newSeg.startTime + newSeg.duration) );
 			}
-
+
 			// And note how we ended.
 			trace("   o Ended at " + newSequence);
 			return newSequence;
 		}
-
+
 		private function onReloadComplete(event:Event):void
 		{
 			if(event.target != reloadingManifest)
@@ -708,22 +710,22 @@
 				trace("Rejecting invalid onReloadComplete call.");
 				return;
 			}
-
+
 			trace ("::onReloadComplete - last/reload/target: " + lastQuality + "/" + reloadingQuality + "/" + targetQuality);
 			var newManifest:HLSManifestParser = event.target as HLSManifestParser;
 			trace ("     - url=" + newManifest.fullUrl);
-
+
 			if(!newManifest)
 			{
 				trace("::onReloadComplete - failed to get new manifest?!");
-
+
 				// Same as at end of function.
 				dispatchDVRStreamInfo();
 				reloadingManifest = null; // don't want to hang on to it
 				if (reloadTimer) reloadTimer.start();
 				return;
 			}
-
+
 			// Detect if there are 0 segments in the new manifest
 			if (newManifest.segments.length == 0)
 			{
@@ -762,22 +764,22 @@
 					}
 				}
 			}
-
+
 			var currentManifest:HLSManifestParser = getManifestForQuality(lastQuality);

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

-
+
 			// Remap if needed.
 			var newSequence:int = remapSequence(getLastSequenceManifest(), newManifest, getLastSequence(), false);
-
+
 			// Store the new manifest.
 			trace("Updating manifest for quality " + reloadingQuality);
 			if(manifest.streams.length)
 				manifest.streams[reloadingQuality].manifest = newManifest;
 			else
 				manifest = newManifest;
-
+
 			// If it's a change and remap fails, we can abort.
 			if(newSequence == -1 && (!getLastSequenceManifest() || newManifest.fullUrl != getLastSequenceManifest().fullUrl))
 			{
@@ -786,35 +788,35 @@
 				trace("Can't remap to new manifest, aborting!")
 				return;
 			}
-
+
 			// Update our manifest for this quality level.
 			//trace("Changing from " + lastQuality + " to " + reloadingQuality);
 			lastQuality = reloadingQuality;
-
+
 			// Update last sequence state.
 			updateLastSequence(newManifest, newSequence);
-
+
 			// Kick off the next round as appropriate.
 			dispatchDVRStreamInfo();
 			updateTotalDuration();
 			reloadingManifest = null; // don't want to hang on to it
 			if (reloadTimer) reloadTimer.start();
-
+
 			stalled = false;
 			HLSHTTPNetStream.hasGottenManifest = true;
-
+
 			// Debug to JS.
 			manifest.postToJS();
 		}
-
+
 		public function getQualityLevelStreamName(index:int):String
 		{
 			if(!resource)
 				return null;
-
+
 			if(index < 0 || index > resource.streamItems.length)
 				return null;
-
+
 			return resource.streamItems[index].streamName;
 		}

@@ -822,7 +824,7 @@
 		{
 			var streams:Array = [];
 			var rates:Array = [];
-
+
 			// Make a copy of the streamItems and sort them by bitrate ascending.
 			for(var i:int=0; i<resource.streamItems.length; i++)
 			{
@@ -909,14 +911,26 @@
 		public override function getFileForTime(time:Number, quality:int):HTTPStreamRequest
 		{
 			trace("--- getFileForTime(time=" + time + ", quality=" + quality + ")");
-
+
 			targetQuality = quality;
-
+
 			// Force a reload if needed.
 			var manifestResponse:HTTPStreamRequest = issueManifestReloadIfNeeded(quality);
-			if(manifestResponse != null)
+			if(manifestResponse != null){
+				_pendingStartTime = time;
 				return manifestResponse;
-
+			}
+
+			// Fire any pending best effort.
+			if(_pendingBestEffortRequest)
+			{
+				trace("getFileForTime - Firing pending best effort request: " + _pendingBestEffortRequest);
+				var tmpR:HTTPStreamRequest = _pendingBestEffortRequest;
+				_pendingBestEffortRequest = null;
+				_pendingStartTime = time;
+				return tmpR;
+			}
+
 			var origQuality:int = quality;
 			quality = getWorkingQuality(quality);
 			var segments:Vector.<HLSManifestSegment> = getSegmentsForQuality( origQuality );
@@ -925,6 +939,8 @@
 			{
 				if(!isBestEffortActive())
 				{
+					_pendingStartTime = time;
+
 					// We may also need to establish a timebase.
 					trace("getFileForTime - Seeking without timebase; initiating request.");
 					if(getLastSequenceManifest())
@@ -963,29 +979,32 @@
 					return new HTTPStreamRequest (HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 				}
 			}
-
+
+			// If we get here pending start time isn't needed any longer.
+			_pendingStartTime = NaN;
+
 			// Debug to JS.
 			manifest.postToJS();
-
+
 			if(time < segments[0].startTime)
 			{
 				trace("getFileForTime - SequenceSkip - time: " + time + " playlistStartTime: " + segments[0].startTime);
 				time = segments[0].startTime;   /// TODO: HACK Alert!!! < this should likely be handled by DVRInfo (see dash plugin index handler)
-												/// No longer quite so sure this is a hack, but a requirement
+				/// No longer quite so sure this is a hack, but a requirement
 				++sequenceSkips;
-
+
 				//bumpedTime = true;
 				//bumpedSeek = time;
 			}
-
+
 			var seq:int = getSegmentSequenceContainingTime(segments, time);
-
+
 			if(seq == -1 && segments.length >= 2)
 			{
 				trace("getFileForTime - Got out of bound timestamp. Trying to recover...");
-
+
 				var lastSeg:HLSManifestSegment = segments[Math.max(0, segments.length - (HLSManifestParser.MAX_SEG_BUFFER+1))];
-
+
 				if(time < segments[0].startTime)
 				{
 					trace("getFileForTime - Fell off oldest segment, going to start #" + segments[0].id)
@@ -999,18 +1018,18 @@
 					//bumpedTime = true;
 				}
 			}
-
+
 			if(seq != -1)
 			{
 				var curSegment:HLSManifestSegment = getSegmentBySequence(segments, seq);
-
+
 				// If we need to, stall on the decrypt key.
 				var theKey:HLSManifestEncryptionKey = getKeyForSequence( curSegment.id, manifest );
 				if(theKey)
 				{
 					if(theKey.isLoading == false && theKey.isLoaded == false)
 						theKey.load();
-
+
 					if(theKey.isLoaded == false)
 					{
 						// Stall on key.
@@ -1018,9 +1037,9 @@
 						return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 					}
 				}
-
+
 				updateLastSequence(getManifestForQuality(origQuality), seq);
-
+
 				fileHandler.segmentId = seq;
 				fileHandler.key = theKey;
 				fileHandler.segmentUri = curSegment.uri;
@@ -1053,19 +1072,19 @@
 			}
 			return null;
 		}
-
+
 		private function issueManifestReloadIfNeeded(quality:int):HTTPStreamRequest
 		{
 			// If we don't need a reload, return null.
 			var manToReload:HLSManifestParser = getManifestForQuality(quality);
-
+
 			// If it's VOD, never need this.
 			if(manToReload.streamEnds)
 			{
 				trace("issueManifestReloadIfNeeded - VODs do not need to reload, returning.");
 				return null;
 			}
-
+
 			var curTime:uint = getTimer();
 			if(curTime - manToReload.timestamp < manToReload.targetDuration * 500)
 			{
@@ -1073,7 +1092,7 @@
 				trace("issueManifestReloadIfNeeded - Don't need to reload yet.");
 				return null;
 			}
-
+
 			if(reloadingManifest
 				&& reloadingManifest.quality == quality
 				&& curTime - reloadingManifest.lastReloadRequestTime < manToReload.targetDuration * 500
@@ -1083,31 +1102,38 @@
 				trace("issueManifestReloadIfNeeded - waiting on reload");
 				return new HTTPStreamRequest (HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 			}
-
+
 			// Otherwise, issue a reload and return a stall.
 			if (reloadTimer)
 				reloadTimer.stop(); // In case the timer is active - don't want to do another reload in the middle of it
-
+
 			trace("issueManifestReloadIfNeeded - Firing reload for quality " + quality);

 			reloadingQuality = quality;
-
+
 			reloadingManifest = new HLSManifestParser();
 			reloadingManifest.quality = quality;
 			reloadingManifest.type = manToReload.type;
 			reloadingManifest.addEventListener(Event.COMPLETE, onReloadComplete);
 			reloadingManifest.addEventListener(IOErrorEvent.IO_ERROR, onReloadError);
 			reloadingManifest.reload(manToReload);
-
+
 			return new HTTPStreamRequest (HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 		}

 		public override function getNextFile(quality:int):HTTPStreamRequest
 		{
 			trace("--- getNextFile(" + quality + ")");
-
+
 			targetQuality = quality;
-
+
+			// Switch to getFileForTime if a pending time is present.
+			if(!isNaN(_pendingStartTime))
+			{
+				trace("getNextFile - pending start time, going to getFileForTime");
+				return getFileForTime(_pendingStartTime, quality);
+			}
+
 			// Fire any pending best effort requests.
 			if(_pendingBestEffortRequest)
 			{
@@ -1116,32 +1142,32 @@
 				_pendingBestEffortRequest = null;
 				return pber;
 			}
-
+
 			var manifestResponse:HTTPStreamRequest = issueManifestReloadIfNeeded(quality);
 			if(manifestResponse != null)
 			{
 				trace("Got a manifest response");
 				return manifestResponse;
 			}
-
+
 			// Report stalls and/or wait on timebase establishment.
 			if (stalled)
 			{
 				trace("Stalling -- quality[" + quality + "] lastQuality[" + lastQuality + "]");
-
+
 				// TODO - ensure a reload is pending?
 				return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 			}
-
+
 			HLSHTTPNetStream.recoveryStateNum = URLErrorRecoveryStates.NEXT_SEG_ATTEMPTED;

 			//trace("Pre GWQ " + quality);
 			var origQuality:int = quality;
 			quality = getWorkingQuality(quality);
-
+
 			var currentManifest:HLSManifestParser = getManifestForQuality ( origQuality );
 			var oldManifest:HLSManifestParser = getLastSequenceManifest();
-
+
 			// If this would be the final file on the original quality level, end.
 			if(currentManifest.streamEnds
 				&& currentManifest.segments.length > 0
@@ -1154,20 +1180,20 @@

 				return new HTTPStreamRequest(HTTPStreamRequestKind.DONE);
 			}
-
+
 			if(quality != origQuality && isBestEffortActive())
 			{
 				trace("Waiting on best effort to resolve...");
 				return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 			}
-
+
 			// If no old manifest, it's a new play session.
 			var didWeSeedLastSequence:Boolean = false;
 			if(oldManifest == null)
 			{
 				trace("SEEDING LAST SEQUENCE");
 				didWeSeedLastSequence = true;
-
+
 				if(currentManifest.streamEnds == true)
 				{
 					updateLastSequence(currentManifest, 0);
@@ -1179,24 +1205,24 @@
 							currentManifest.segments.length - HLSManifestParser.MAX_SEG_BUFFER - 1)].id);
 				}
 			}
-
+
 			// Fire a reload if needed.
 			if(quality != origQuality && manifest.streamEnds == false)
 			{
 				trace("Firing reload of manifest for quality " + origQuality);
-
+
 				var hadPendingReload:Boolean = reloadingManifest != null;
-
+
 				// Kick the reloader.
 				onReloadTimer(null);
 			}
-
+
 			// Attempt remap.
 			var newSequence:int = remapSequence(getLastSequenceManifest(), currentManifest, getLastSequence());

 			// Debug to JS.
 			manifest.postToJS();
-
+
 			if(newSequence == -1)
 			{
 				if(_pendingBestEffortRequest && !isBestEffortActive())
@@ -1212,38 +1238,38 @@
 					return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 				}
 			}
-
+
 			// Stall if we aren't ready to go.
 			if(quality != origQuality && manifest.streamEnds == false)
 			{
 				trace("Stalling for manifest -- quality[" + quality + "] lastQuality[" + lastQuality + "]");
-
+
 				return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, 2);
 			}
-
+
 			// Advance sequence number if we didn't seed. This prevents us from
 			// inadvertantly advancing past the first segment of a video in streams
 			// with non-zero start times. We also don't increment when moving across
 			// quality levels as the remap and low water systems handles any overlap.
 			if(!didWeSeedLastSequence && (currentManifest.fullUrl == getLastSequenceManifest().fullUrl))
 				newSequence++;
-
+
 			var segments:Vector.<HLSManifestSegment> = currentManifest.segments;
-
+
 			if( segments.length > 0 && newSequence < segments[0].id)
 			{
 				trace("Resetting too low sequence " + newSequence + " to " + segments[0].id);
 				newSequence = segments[0].id;
 			}
-
+
 			if (segments.length > 0 && newSequence > (segments[Math.max(0, segments.length-1)].id + 3))
 			{
 				trace("Got in a bad state of " + newSequence + " , resetting to near end of stream " + segments[segments.length-HLSManifestParser.MAX_SEG_BUFFER].id);
 				newSequence = segments[segments.length-HLSManifestParser.MAX_SEG_BUFFER].id;
 			}
-
+
 			var curSegment:HLSManifestSegment = getSegmentBySequence(segments, newSequence);
-
+
 			if ( curSegment != null )
 			{
 				// If we need to, stall on the decrypt key.
@@ -1252,7 +1278,7 @@
 				{
 					if(theKey.isLoading == false && theKey.isLoaded == false)
 						theKey.load();
-
+
 					if(theKey.isLoaded == false)
 					{
 						// Stall on key.
@@ -1260,25 +1286,25 @@
 						return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 					}
 				}
-
+
 				trace("Getting Next Segment[" + newSequence + "] StartTime: " + curSegment.startTime + " Continuity: " + curSegment.continuityEra + " URI: " + curSegment.uri);

 				// Note new value.
 				updateLastSequence(currentManifest, newSequence);
-
+
 				//bumpedSeek = curSegment.startTime;
-
+
 				fileHandler.segmentId = newSequence;
 				fileHandler.key = theKey;
 				fileHandler.segmentUri = curSegment.uri;
-
+
 				return createHTTPStreamRequest( curSegment );
 			}

 			if ( reloadingManifest || !manifest.streamEnds )
 			{
 				trace("Stalling -- requested segment " + newSequence + " past the end " + segments[segments.length-1].id + " and we're in a live stream");
-
+
 				return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, segments[segments.length-1].duration / 2);
 			}

@@ -1297,7 +1323,7 @@

 			if(localManifest)
 				keys = localManifest.keys;
-
+
 			// What is the index of this id?
 			var foundIdx:int = -1;
 			for(var i:int=0; i<localManifest.segments.length; i++)
@@ -1305,10 +1331,10 @@
 				if(localManifest.segments[i].id == segId)
 					foundIdx = i;
 			}
-
+
 			if(foundIdx == -1)
 				return null;
-
+
 			for (i = 0; i < keys.length; i++ )
 			{
 				var key:HLSManifestEncryptionKey = keys[ i ];
@@ -1341,11 +1367,11 @@

 			if(!manifest)
 				return;
-
+
 			// Fetch active data.
 			var activeManifest:HLSManifestParser = getManifestForQuality(lastQuality);
 			var segments:Vector.<HLSManifestSegment> = activeManifest.segments;
-
+
 			if(segments.length > 0)
 			{
 				lastKnownPlaylistStartTime = segments[0].startTime;
@@ -1355,7 +1381,7 @@
 					accum = (segments[i].startTime + segments[i].duration) - lastKnownPlaylistStartTime;
 				}
 			}
-
+
 			// Push the metadata out.
 			var metadata:Object = new Object();
 			metadata.duration = accum;
@@ -1363,7 +1389,7 @@
 			tag.objects = ["onMetaData", metadata];
 			dispatchEvent(new HTTPStreamingEvent(HTTPStreamingEvent.SCRIPT_DATA, false, false, 0, tag, FLVTagScriptDataMode.IMMEDIATE));
 		}
-
+
 		// getSegmentIndexForTime()
 		//		returns
 		//			-1 if there is no manifest or no valid segments
@@ -1379,7 +1405,7 @@
 				return -1;

 			var segments:Vector.<HLSManifestSegment> = getSegmentsForQuality( lastQuality );
-
+
 			for (var i:int = segments.length - 1; i >= 0; --i)
 			{
 				if (segments[i].startTime < time)
@@ -1412,12 +1438,12 @@
 				trace("Failed to dispatch DVR info, no segments!");
 				return;
 			}
-
+
 			updateSegmentTimes(segments);
-
+
 			var firstSegment:HLSManifestSegment = segments[0];
 			var lastSegment:HLSManifestSegment  = segments[segments.length - 1];
-
+
 			var dvrInfo:DVRInfo = new DVRInfo();
 			dvrInfo.offline = false;
 			dvrInfo.isRecording = !curManifest.streamEnds;  // TODO: verify that this is what we REALLY want to be doing
@@ -1461,13 +1487,13 @@
 			if (!manifest) return new HLSManifestParser();
 			if (manifest.streams.length < 1 || manifest.streams[0].manifest == null) return manifest;
 			else if ( quality >= manifest.streams.length ) return manifest.streams[0].manifest;
-
+
 			// We give the HLSHTTPNetStream the stream for the quality we are currently using to help it recover after a URL error
 			HLSHTTPNetStream.currentStream = manifest.streams[quality];
-
+
 			// Also give HLSHTTPNetStream a reference to ourselves so it can call postRatesReady()
 			HLSHTTPNetStream.indexHandler = this;
-
+
 			return manifest.streams[quality].manifest;
 		}

@@ -1501,7 +1527,7 @@
 				trace("lastSegmentIndex: " + getLastSequence() + " | max allowed index: " + segments[segments.length - 1].id);
 				trace("Setting lastSegmentIndex to " + segments[segments.length - 1].id);
 				getLastSequence() = segments[segments.length - 1].id;
-
+
 				// Back off by one as it will get incremented later.
 				//lastSequence--; */
 			}
@@ -1534,12 +1560,12 @@
 			var segment:HLSManifestSegment = getSegmentBySequence( segments, getLastSequence() );
 			return segment ? segment.startTime + segment.duration : 0.0;
 		}
-
+
 		public function getTargetSegmentDuration():Number
 		{
 			return getManifestForQuality(lastQuality).targetDuration;
 		}
-
+
 		/**
 		 * @private
 		 *
@@ -1564,23 +1590,23 @@
 				trace("initiateBestEffortRequest - No manifest found to best effort request quality level " + quality);
 				return null;
 			}
-
+
 			if(!segments)
 			{
 				segments = newMan.segments;
 			}
-
+
 			if(!segments)
 			{
 				trace("initiateBestEffortRequest - NO SEGMENTS FOUND, ABORTING initiateBestEffortRequest");
 				return null;
 			}
-
+
 			var nextSeg:HLSManifestSegment = getSegmentBySequenceCapped(segments, nextFragmentId);
 			if(nextSeg.id != nextFragmentId)
 			{
 				trace("Out of bounds best effort segment ID request, using " + nextSeg.id + " instead of " + nextFragmentId);
-
+
 				// Wait for manifest to reload, we probably hit live edge!
 				if(nextSeg.id < nextFragmentId)
 				{
@@ -1596,14 +1622,14 @@
 					}
 				}
 			}
-
+
 			// If we need to, stall on the decrypt key.
 			var theKey:HLSManifestEncryptionKey = getKeyForSequence( nextSeg.id, newMan );
 			if(theKey)
 			{
 				if(theKey.isLoading == false && theKey.isLoaded == false)
 					theKey.load();
-
+
 				if(theKey.isLoaded == false)
 				{
 					// Stall on key.
@@ -1611,18 +1637,18 @@
 					return new HTTPStreamRequest(HTTPStreamRequestKind.LIVE_STALL, null, SHORT_LIVE_STALL_DELAY);
 				}
 			}
-
+
 			// recreate the best effort download monitor
 			// this protects us against overlapping best effort downloads
 			_bestEffortDownloaderMonitor = new EventDispatcher();
 			_bestEffortDownloaderMonitor.addEventListener(HTTPStreamingEvent.DOWNLOAD_COMPLETE, onBestEffortDownloadComplete);
 			_bestEffortDownloaderMonitor.addEventListener(HTTPStreamingEvent.DOWNLOAD_ERROR, onBestEffortDownloadError);
-
-
+
+
 			_bestEffortFileHandler.segmentId = nextSeg.id;
 			_bestEffortFileHandler.key = theKey;
 			_bestEffortFileHandler.segmentUri = nextSeg.uri;
-
+
 			var streamRequest:HTTPStreamRequest =  new HTTPStreamRequest(
 				HTTPStreamRequestKind.BEST_EFFORT_DOWNLOAD,
 				_bestEffortFileHandler.segmentUri, // url
@@ -1630,9 +1656,9 @@
 				_bestEffortDownloaderMonitor); // bestEffortDownloaderMonitor

 			_pendingBestEffortStartTime = getTimer();
-
+
 			trace("initiateBestEffortRequest - Requesting: " + streamRequest.toString());
-
+
 			return streamRequest;
 		}

@@ -1666,7 +1692,7 @@
 				trace("bufferAndParseDownloadedBestEffortBytes - Already set our reply to " + _bestEffortDownloadReply + ", so ignoring data...");
 				return;
 			}
-
+
 			try
 			{
 				var downloaderAvailableBytes:uint = downloader.totalAvailableBytes;
@@ -1686,13 +1712,13 @@

 					// Reset parsing process.
 					_bestEffortFileHandler.beginProcessFile(false, 0.0);
-
+
 					// feed the bytes to our f4f handler in order to parse out the bootstrap box.
 					trace("processing segment");
 					_bestEffortFileHandler.processFileSegment(_bestEffortSeekBuffer);
-
+
 					_bestEffortFileHandler.endProcessFile(_bestEffortSeekBuffer);
-
+
 					if(_bestEffortDownloadReply == HTTPStreamingEvent.DOWNLOAD_CONTINUE)
 					{
 						// we're done parsing and the HTTPStreamSource is going to process the file,
@@ -1718,15 +1744,15 @@
 				trace("Failed to parse best effort segment due to " + e.toString() + "\n " + e.getStackTrace());
 			}
 		}
-
+
 		protected function onBestEffortParsed(e:Event):void
 		{
 			// Currently a nop.
 			trace("Got duration from best effort segment: " + _bestEffortFileHandler.segmentUri);
-
+
 			// Try again.
 			stalled = false;
-
+
 			// Update DVR info in case we gained knowledge.
 			dispatchDVRStreamInfo();
 		}
@@ -1745,7 +1771,7 @@
 				trace("Got event for abandoned best effort download!");
 				return;
 			}
-
+
 			trace("Best effort download complete " + event.toString());

 			// unregister the listeners
@@ -1754,7 +1780,7 @@
 			trace("Start download parse");
 			bufferAndParseDownloadedBestEffortBytes(event.url, event.downloader as HLSHTTPStreamDownloader);
 			trace("end download parse");
-
+
 			// forward the DOWNLOAD_COMPLETE to HTTPStreamSource, but change the reason
 			var clone:HTTPStreamingEvent = new HTTPStreamingEvent(
 				event.type,
@@ -1768,35 +1794,35 @@
 				HTTPStreamingEventReason.BEST_EFFORT,
 				event.downloader);
 			dispatchEvent(clone);
-
+
 			// Note our download time so we can force the right duration
 			// rather than getting confused by speedy cache responses.
 			_lastBestEffortFetchURI = _bestEffortFileHandler.segmentUri;
 			_lastBestEffortFetchDuration = getTimer() - _pendingBestEffortStartTime;
-
+
 			// Is it the next one we want?
 			// This code path seems to result in buffer time getting screwed up and doesn't solve the
 			// bandwidth calculation/bitrate selection issues.
 			/*if(getLastSequenceManifest() && getManifestForQuality(targetQuality))
 			{
-				var nextSeg:HLSManifestSegment = getSegmentBySequence(getManifestForQuality(targetQuality).segments, getLastSequence() + 1);
-				if(nextSeg)
-				{
-					var nextUri:String = nextSeg.uri;
-					trace("onBestEffortDownloadComplete - Checking " + _bestEffortFileHandler.segmentUri + " vs " + nextUri);
-					if(_bestEffortFileHandler.segmentUri == nextUri)
-					{
-						trace("Keeping this download buddy.");
-						continueBestEffortFetch(nextUri, event.downloader);
-
-						// And update the last sequence state.
-						updateLastSequence(getManifestForQuality(targetQuality), getLastSequence() + 1);
-
-						return;
-					}
-				}
+			var nextSeg:HLSManifestSegment = getSegmentBySequence(getManifestForQuality(targetQuality).segments, getLastSequence() + 1);
+			if(nextSeg)
+			{
+			var nextUri:String = nextSeg.uri;
+			trace("onBestEffortDownloadComplete - Checking " + _bestEffortFileHandler.segmentUri + " vs " + nextUri);
+			if(_bestEffortFileHandler.segmentUri == nextUri)
+			{
+			trace("Keeping this download buddy.");
+			continueBestEffortFetch(nextUri, event.downloader);
+
+			// And update the last sequence state.
+			updateLastSequence(getManifestForQuality(targetQuality), getLastSequence() + 1);
+
+			return;
+			}
+			}
 			}*/
-
+
 			// Otherwise skip.
 			skipBestEffortFetch(_bestEffortFileHandler.segmentUri, event.downloader as HLSHTTPStreamDownloader);
 		}
@@ -1814,9 +1840,9 @@
 				// we're receiving an event for a download we abandoned
 				return;
 			}
-
+
 			trace("Best effort download error " + event.toString());
-
+
 			// unregister our listeners
 			stopListeningToBestEffortDownload();

@@ -1857,7 +1883,7 @@
 				bestEffortLog("Best effort wanted to skip fragment, but we already replied with "+_bestEffortDownloadReply);
 				return;
 			}
-
+
 			bestEffortLog("Best effort skipping fragment.");
 			var event:HTTPStreamingEvent = new HTTPStreamingEvent(HTTPStreamingEvent.DOWNLOAD_SKIP,
 				false, // bubbles


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

--- frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as
+++ frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2011 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.globalization.supportClasses
 {


Fixed whitespace

Fixed whitespace

--- as3/src/asunit4/framework/SuiteIterator.as
+++ as3/src/asunit4/framework/SuiteIterator.as
@@ -1,5 +1,5 @@
-package asunit4.framework
-{
+package asunit4.framework {
+
     import asunit.util.Iterator;

 	import flash.utils.getDefinitionByName;


Updated base TestCase

Updated base TestCase

--- as3/src/asunit4/framework/TestCase.as
+++ as3/src/asunit4/framework/TestCase.as
@@ -1,7 +1,8 @@
 package asunit4.framework {

+    import asunit4.async.IAsync;
+    import flash.display.DisplayObjectContainer;
     import flash.display.MovieClip
-    import asunit4.async.IAsync;

     class TestCase {

@@ -16,6 +17,11 @@
         public function callSetUp():void {
             setUp();
         }
+
+        [Context]
+        // TODO: The Runner should inject a unique
+        // and appropriate context for the requested DataType
+        public var context:DisplayObjectContainer;

         protected function setUp():void {
         }
@@ -34,7 +40,7 @@
         }

         protected function getContext():MovieClip {
-            return null;
+            return context;
         }
     }
 }


OFC-1543 - Exception in UI when active survey is reloaded

--- collect-client/src/generated/flex/org/openforis/collect/model/proxy/EntityProxy.as
+++ collect-client/src/generated/flex/org/openforis/collect/model/proxy/EntityProxy.as
@@ -581,7 +581,7 @@
 		private function getChildDefinitionIndex(childDefn:NodeDefinitionProxy):int {
 			var version:ModelVersionProxy = this.record.version;
 			var defs:IList = EntityDefinitionProxy(definition).getDefinitionsInVersion(version);
-			var index:int = defs.getItemIndex(childDefn);
+			var index:int = CollectionUtil.getItemIndex(defs, "id", childDefn.id);
 			return index;
 		}


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

--- frameworks/projects/automation/src/mx/automation/codec/IAutomationPropertyCodec.as
+++ frameworks/projects/automation/src/mx/automation/codec/IAutomationPropertyCodec.as
@@ -0,0 +1,84 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.codec
+{
+
+	import mx.automation.qtp.IQTPPropertyDescriptor;
+	import mx.automation.IAutomationManager;
+	import mx.automation.IAutomationObject;
+
+	/**
+	 * Defines the interface for codecs, which translate between internal Flex properties
+	 * and automation-friendly ones.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public interface IAutomationPropertyCodec
+	{
+		/**
+		 * Encodes the value into a form readable by the user.
+		 *
+		 * @param automationManager The automationManager object
+		 *
+		 * @param obj The object having the property which requires encoding.
+		 *
+		 * @param propertyDescriptor The property descriptor object describing the
+		 * 							 property which needs to be encoded.
+		 *
+		 * @param relativeParent The parent or automationParent of the component
+		 * 					    recording the event.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		function encode(automationManager:IAutomationManager,
+						obj:Object,
+						propertyDescriptor:IQTPPropertyDescriptor,
+						relativeParent:IAutomationObject):Object;
+
+		/**
+		 * Decodes the value into a form required for the framework to do operations.
+		 *  This may involve searching for some data in the dataProvider or a particualr
+		 *  child of the container.
+		 *
+		 * @param automationManager The automationManager object
+		 *
+		 * @param obj The object having the property which needs to be
+		 * 						updated with the new value.
+		 *
+		 * @param value The input value for the decoding process.
+		 *
+		 * @param propertyDescriptor The property descriptor object describing the
+		 * 							 property which needs to be decoded.
+		 *
+		 * @param relativeParent The parent or automationParent of the component
+		 * 					    recording the event.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		function decode(automationManager:IAutomationManager,
+						obj:Object,
+						value:Object,
+						propertyDescriptor:IQTPPropertyDescriptor,
+						relativeParent:IAutomationObject):void;
+
+	}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 8574
Author:   aharui@adobe.com
Date:     2009-07-15T05:33:44.225721Z

Log Message:
-----------
Bugs related to TLF and focus.  Also TLF Marshall Plan adjustments, and some IME fixes

QE Notes: None
Doc Notes: None
Bugs: SDK-21278, SDK-21686, SDK-21375, SDK-18516, SDK-15093, SDK-21335
Reviewer: darrell, carol
tests: checkintests mustella/gumbo mustella/components

Modified Paths:
--------------
<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/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IIMESupport.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/spark/src/spark/components/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/framework/src/mx/core/UITextField.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/events/SWFBridgeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/alertClasses/AlertForm.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.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/spark/src/spark/primitives/supportClasses/RichEditableTextContainerManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoPlayer.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/SWFLoader.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/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.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/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/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/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/marshalClasses/FocusManagerMarshalMixin.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -1295,6 +1295,17 @@
      */
     override protected function focusInHandler(event:FocusEvent):void
     {
+        if (event.target == this)
+        {
+            // call setFocus on ourselves to pass focus to the
+            // textDisplay.  This situation occurs when the
+            // player occasionally takes over the first TAB
+            // on a newly activated Window with nothing currently
+            // in focus
+            setFocus();
+            return;
+        }
+
         // Only editable text should have a focus ring.
         if (enabled && editable && focusManager)
             focusManager.showFocusIndicator = true;


Add 'copyFromMatrix3D' method to Matrix4x4.

--- src/aerys/minko/type/math/Matrix4x4.as
+++ src/aerys/minko/type/math/Matrix4x4.as
@@ -166,6 +166,16 @@
 		public function copyFrom(matrix : Matrix4x4) : Matrix4x4
 		{
 			_matrix.copyFrom(matrix._matrix);
+
+			if (!_locked)
+				_changed.execute(this);
+
+			return this;
+		}
+
+		public function copyFromMatrix3D(matrix : Matrix3D) : Matrix4x4
+		{
+			_matrix.copyFrom(matrix);

 			if (!_locked)
 				_changed.execute(this);


Rename local method variable.

Rename local method variable.

--- dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CloningOfCompositeCloneableClassTest.as
@@ -79,16 +79,16 @@
 	public function cloningOfArrayCollection():void {
 		const clone:CompositeCloneableClass = Cloner.clone(compositeCloneableClass);

-		const targetArrayCollection:ArrayCollection = clone.arrayCollection;
+		const arrayCollection:ArrayCollection = clone.arrayCollection;

-		assertNotNull(targetArrayCollection);
+		assertNotNull(arrayCollection);
 		assertFalse(clone.arrayCollection == compositeCloneableClass.arrayCollection);
-		assertEquals(targetArrayCollection.length, 5);
-		assertEquals(targetArrayCollection.getItemAt(0), 1);
-		assertEquals(targetArrayCollection.getItemAt(1), 2);
-		assertEquals(targetArrayCollection.getItemAt(2), 3);
-		assertEquals(targetArrayCollection.getItemAt(3), 4);
-		assertEquals(targetArrayCollection.getItemAt(4), 5);
+		assertEquals(arrayCollection.length, 5);
+		assertEquals(arrayCollection.getItemAt(0), 1);
+		assertEquals(arrayCollection.getItemAt(1), 2);
+		assertEquals(arrayCollection.getItemAt(2), 3);
+		assertEquals(arrayCollection.getItemAt(3), 4);
+		assertEquals(arrayCollection.getItemAt(4), 5);
 	}
 }
 }


Signal.removeAll() now clears the onceListeners Dictionary. Thanks to Thomas Brekelmans for the tip.

git-svn-id: 3635f658cd63696bbccf5e31eb8660aa893cf08d@16 6e9afafe-9be5-11de-811b-9ff18243e0fd

--- src/com/robertpenner/signals/Signal.as
+++ src/com/robertpenner/signals/Signal.as
@@ -71,6 +71,7 @@
 		public function removeAll():void
 		{
 			listeners.length = 0;
+			onceListeners = new Dictionary();
 		}

 		/** @inheritDoc */


Transferred from the Adobe Open Source Subversion Repository

Revision: 6470
Author:   rfrishbe@adobe.com
Date:     2009-05-01T20:07:28.859826Z

Log Message:
-----------
Renaming SkinnableComponent's methods again...instead of createSkin() and destroySkin(), it's now attachSkin() and detachSkin().

QE Notes: -
Doc Notes: -
Bugs: SDK-19779
Reviewer: -
tests: checkintests, mustella SkinnableComponent tests, Scroller tests (Scroller ones fail some compare bitmaps for me)

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/airframework/src/spark/components/windowClasses/TitleBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableComponent.as
@@ -167,8 +167,8 @@

     /**
      *  The instance of the skin class for this component instance.
-     *  This is a read-only property that you set
-     *  by calling the createSkin() method.
+     *  This is a read-only property that gets set automomatically when Flex
+     *  calls the attachSkin() method.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
@@ -276,8 +276,8 @@
         if (!skipReload)
         {
             if (skin)
-                destroySkin();
-            createSkin();
+                detachSkin();
+            attachSkin();
         }
     }

@@ -460,7 +460,7 @@
     /**
      *  Create the skin for the component.
      *  You do not call this method directly.
-     *  Flex calls it automatically when it calls
+     *  Flex calls it automatically when it calls createChildren() or
      *  the UIComponent.commitProperties() method.
      *  Typically, a subclass of SkinnableComponent does not override this method.
      *
@@ -473,7 +473,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function createSkin():void
+    protected function attachSkin():void
     {
         // Factory
         var skinClassFactory:IFactory = getStyle("skinFactory") as IFactory;
@@ -529,7 +529,7 @@
     /**
      *  Find the skin parts in the skin class and assign them to the properties of the component.
      *  You do not call this method directly.
-     *  Flex calls it automatically when it calls the createSkin() method.
+     *  Flex calls it automatically when it calls the attachSkin() method.
      *  Typically, a subclass of SkinnableComponent does not override this method.
      *
      *  @langversion 3.0
@@ -565,7 +565,7 @@
     /**
      *  Clear out references to skin parts.
      *  You do not call this method directly.
-     *  Flex calls it automatically when it calls the destroySkin() method.
+     *  Flex calls it automatically when it calls the detachSkin() method.
      *
      *
Typically, subclasses of SkinnableComponent do not override this method.

      *
@@ -613,7 +613,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function destroySkin():void
+    protected function detachSkin():void
     {
         skin.removeEventListener(PropertyChangeEvent.PROPERTY_CHANGE, skin_propertyChangeHandler);

@@ -632,7 +632,7 @@
     /**
      *  Called when a skin part is added.
      *  You do not call this method directly.
-     *  For static parts, Flex calls it automatically when it calls the createSkin() method.
+     *  For static parts, Flex calls it automatically when it calls the attachSkin() method.
      *  For dynamic parts, Flex calls it automatically when it calls
      *  the createDynamicPartInstance() method.
      *
@@ -657,7 +657,7 @@
     /**
      *  Called when an instance of a skin part is being removed.
      *  You do not call this method directly.
-     *  For static parts, Flex calls it automatically when it calls the destroySkin() method.
+     *  For static parts, Flex calls it automatically when it calls the detachSkin() method.
      *  For dynamic parts, Flex calls it automatically when it calls
      *  the removeDynamicPartInstance() method.
      *


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

--- frameworks/projects/advancedgrids/src/mx/olap/QueryError.as
+++ frameworks/projects/advancedgrids/src/mx/olap/QueryError.as
@@ -0,0 +1,47 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.olap
+{
+
+/**
+ *  @private
+ *  The QueryError class represents a query error message.
+ */
+public class QueryError extends Error
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param msg A string associated with the error object.
+     *
+     *  @param id A reference number to associate with the specific error message.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function QueryError(msg:String, id:int=0):void
+    {
+        super(msg, id);
+    }
+}
+
+}


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

--- frameworks/projects/framework/src/mx/core/IVisualElement.as
+++ frameworks/projects/framework/src/mx/core/IVisualElement.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
 package mx.core
 {
 import flash.display.DisplayObjectContainer;


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

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


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

--- frameworks/projects/mx/src/mx/skins/halo/TitleBackground.as
+++ frameworks/projects/mx/src/mx/skins/halo/TitleBackground.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.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7889
Author:   dsubrama@adobe.com
Date:     2009-06-16T20:01:19.393557Z

Log Message:
-----------
First batch of PARB changes to List, ListBase, ItemRenderer and IItemRenderer as documented here: https://zerowing.corp.adobe.com/display/flex/PARB_RENAME_LIST

QA: Yes
Docs: Yes
Checkintests: Pass

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/flex4/src/spark/skins/spark/DefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.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/ButtonBarButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/IItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/spark/DefaultComplexItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/ButtonBar.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/framework/src/mx/events/IndexChangedEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -712,12 +712,12 @@

     /**
      *  @private
-     *  Sets the renderer's data, owner and labelText properties.
+     *  Sets the renderer's data, owner and label properties.
      *  Then, gives the "true" owner a chance to call update the
      *  renderer if this DataGroup is not the owner. "True" owners
      *  would use their impl of updateRenderer to clear out stale
      *  properties for when the renderer is being recycled, and set
-     *  new properties like owner, labelText, selected, etc.
+     *  new properties like owner, label, selected, etc.
      *
      */
     private function updateRenderer(renderer:IVisualElement, data:Object):void
@@ -737,10 +737,10 @@
         if (!renderer.owner)
             renderer.owner = this;

-        //If we're the owner, set the labelText to the toString()
+        //If we're the owner, set the label to the toString()
         //of the data
         if (renderer.owner == this && renderer is IItemRenderer)
-            IItemRenderer(renderer).labelText = itemToLabel(data);
+            IItemRenderer(renderer).label = itemToLabel(data);

         //This dataGroup is not the "true" owner, give the true
         //owner a chance to update the renderer.


Transferred from the Adobe Open Source Subversion Repository

Revision: 4526
Author:   hmuller@adobe.com
Date:     2009-01-14T19:47:10.933315Z

Log Message:
-----------
Restored mx_internal qualifier to DataGroup.getItemIndexForRenderer(),
getRendererForItemAt() methods.  At the moment, many FxList mustella tests
depend on this.

QE Notes: Still seeing the same 44 failures in the FxList
Doc Notes: None
Bugs:
Reviewer: None

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/DataGroup.as</path>
<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/FxButtonBar.as</path>

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

--- frameworks/projects/spark/src/spark/components/DataGroup.as
+++ frameworks/projects/spark/src/spark/components/DataGroup.as
@@ -605,16 +605,17 @@
      *  @private
      *  Provisional access to the item renderers for FxList and FxButtonBar.
      */
-    internal function getRendererForItemAt(index:int):IVisualElement
-    {
-        return (index < super.numChildren) ? IVisualElement(super.getChildAt(index)) : null;
+    mx_internal function getRendererForItemAt(index:int):IVisualElement
+    {
+        var i:int = index - virtualLayoutOffset;
+        return ((i >= 0) && (i < super.numChildren)) ? IVisualElement(super.getChildAt(i)) : null;
     }

     /**
      *  @private
      *  Provisional access to the item renderers for FxList and FxButtonBar.
      */
-    internal function getItemIndexForRenderer(renderer:IVisualElement):int
+    mx_internal function getItemIndexForRenderer(renderer:IVisualElement):int
     {
         var child:DisplayObject = DisplayObject(renderer);
         return (child.parent == this) ? super.getChildIndex(child) : -1;


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

--- frameworks/projects/spark/src/spark/components/TextInput.as
+++ frameworks/projects/spark/src/spark/components/TextInput.as
@@ -0,0 +1,439 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 flex.component
+{
+
+import flash.events.Event;
+import flash.events.FocusEvent;
+
+import flex.component.TextView;
+import flex.core.SkinnableComponent;
+import flex.events.TextOperationEvent;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispached after the selectionAnchorIndex and/or
+ *  selectionActiveIndex properties have changed
+ *  due to a user interaction.
+ */
+[Event(name="selectionChange", type="flash.events.Event")]
+
+/**
+ *  Dispatched before a user editing operation occurs.
+ *  You can alter the operation, or cancel the event
+ *  to prevent the operation from being processed.
+ */
+[Event(name="changing", type="flex.events.TextOperationEvent")]
+
+/**
+ *  Dispatched after a user editing operation is complete.
+ */
+[Event(name="change", type="flex.events.TextOperationEvent")]
+
+/**
+ *  Dispatched when the user presses the Enter key.
+ */
+[Event(name="enter", type="flash.events.Event")]
+
+/**
+ *  Documentation is not currently available.
+ */
+public class TextInput extends SkinnableComponent
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     */
+	public function TextInput()
+	{
+		super();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  enabled
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	override public function set enabled(value:Boolean):void
+	{
+		if (value == enabled)
+			return;
+
+		super.enabled = value;
+
+		invalidateSkinState();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	//----------------------------------
+	//  selectionActiveIndex
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _selectionActiveIndex:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var selectionActiveIndexChanged:Boolean = false;
+
+	[Bindable("selectionChange")]
+
+	/**
+	 *  The active index of the selection.
+	 *  The "active" point is the end of the selection
+	 *  which is changed when the selection is extended.
+	 *  The active index may be either the start
+	 *  or the end of the selection.
+	 *
+	 *  @default -1
+	 */
+	public function get selectionActiveIndex():int
+	{
+		return _selectionActiveIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectionActiveIndex(value:int):void
+	{
+		if (value == _selectionActiveIndex)
+			return;
+
+		_selectionActiveIndex = value;
+		selectionActiveIndexChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new Event("selectionChange"));
+	}
+
+	//----------------------------------
+	//  selectionAnchorIndex
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _selectionAnchorIndex:int = -1;
+
+	/**
+	 *  @private
+	 */
+	private var selectionAnchorIndexChanged:Boolean = false;
+
+	[Bindable("selectionChange")]
+
+	/**
+	 *  The anchor index of the selection.
+	 *  The "anchor" point is the stable end of the selection
+	 *  when the selection is extended.
+	 *  The anchor index may be either the start
+	 *  or the end of the selection.
+	 *
+	 *  @default -1
+	 */
+	public function get selectionAnchorIndex():int
+	{
+		return _selectionAnchorIndex;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set selectionAnchorIndex(value:int):void
+	{
+		if (value == _selectionAnchorIndex)
+			return;
+
+		_selectionAnchorIndex = value;
+		selectionAnchorIndexChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new Event("selectionChange"));
+	}
+
+    //----------------------------------
+	//  text
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _text:String = "";
+
+	/**
+	 *  @private
+	 */
+	private var textChanged:Boolean = false;
+
+	[Bindable("change")]
+	[Bindable("textChanged")]
+
+	/**
+	 *  The text String displayed by this TextInput.
+	 */
+	public function get text():String
+	{
+		return _text;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set text(value:String):void
+	{
+		if (value == _text)
+			return;
+
+		_text = value;
+		textChanged = true;
+
+		invalidateProperties();
+
+		dispatchEvent(new Event("textChanged"));
+	}
+
+    //----------------------------------
+	//  textView
+    //----------------------------------
+
+    [SkinPart]
+
+	/**
+	 *  The TextView that must be present
+	 *  in any skin assigned to this TextInput.
+	 */
+	public var textView:TextView;
+
+	//----------------------------------
+	//  widthInChars
+    //----------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _widthInChars:int = 20;
+
+	/**
+	 *  @private
+	 */
+	private var widthInCharsChanged:Boolean = false;
+
+	/**
+	 *  The default width for the TextInput, measured in characters.
+	 *  The width of the "0" character is used for the calculation,
+	 *  since in most fonts the digits all have the same width.
+	 *  So if you set this property to 5, it will be wide enough
+	 *  to let the user enter 5 digits.
+	 *
+	 *  @default
+	 */
+	public function get widthInChars():int
+	{
+		return _widthInChars;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set widthInChars(value:int):void
+	{
+		if (value == _widthInChars)
+			return;
+
+		_widthInChars = value;
+		widthInCharsChanged = true;
+
+		invalidateProperties();
+	}
+
+	//--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Pushes various TextInput properties down into the TextView.
+	 */
+    override protected function commitProperties():void
+	{
+		super.commitProperties();
+
+		if (widthInCharsChanged)
+		{
+			textView.widthInChars = _widthInChars;
+			widthInCharsChanged = false;
+		}
+
+		if (textChanged)
+		{
+			textView.text = _text;
+			textChanged = false;
+		}
+
+		if (selectionAnchorIndexChanged)
+		{
+			textView.selectionAnchorIndex = _selectionAnchorIndex;
+			selectionAnchorIndexChanged = false
+		}
+
+		if (selectionActiveIndexChanged)
+		{
+			textView.selectionActiveIndex = _selectionActiveIndex;
+			selectionActiveIndexChanged = false
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function partAdded(partName:String, instance:*):void
+	{
+		super.partAdded(partName, instance);
+
+		if (instance == textView)
+		{
+			// Set the TextView to allow only one line of input.
+            textView.heightInLines = 1;
+			textView.multiline = false;
+
+			// Start listening for various events from the TextView.
+			textView.addEventListener("selectionChange",
+									  textView_selectionChangeHandler);
+			textView.addEventListener("changing", textView_changingHandler);
+			textView.addEventListener("change", textView_changeHandler);
+			textView.addEventListener("enter", textView_enterHandler);
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function partRemoved(partName:String, instance:*):void
+	{
+		super.partRemoved(partName, instance);
+
+		if (instance == textView)
+		{
+			// Stop listening for various events from the TextView.
+			textView.removeEventListener("selectionChange",
+										 textView_selectionChangeHandler);
+			textView.removeEventListener("changing", textView_changingHandler);
+			textView.removeEventListener("change", textView_changeHandler);
+			textView.removeEventListener("enter", textView_enterHandler);
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function getUpdatedSkinState():String
+	{
+		return enabled ? "enabled" : "disabled";
+	}
+
+	//--------------------------------------------------------------------------
+    //
+    //  Event handlers
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'selectionChange' event.
+	 */
+	private function textView_selectionChangeHandler(event:Event):void
+	{
+		// Update our storage variables for the selection indices.
+		_selectionAnchorIndex = textView.selectionAnchorIndex;
+		_selectionActiveIndex = textView.selectionActiveIndex;
+
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'change' event
+	 *  after an editing operation.
+	 */
+	private function textView_changeHandler(event:TextOperationEvent):void
+	{
+		// Update our storage variable for the text string.
+		_text = textView.text;
+
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches a 'changing' event
+	 *  before an editing operation.
+	 */
+	private function textView_changingHandler(event:TextOperationEvent):void
+	{
+		// Redispatch the event that came from the TextView.
+		var newEvent:Event = event.clone();
+		dispatchEvent(newEvent);
+
+		// If the event dispatched from this TextInput is canceled,
+		// cancel the one from the TextView, which will prevent
+		// the editing operation from being processed.
+		if (newEvent.isDefaultPrevented())
+			event.preventDefault();
+	}
+
+	/**
+	 *  @private
+	 *  Called when the TextView dispatches an 'enter' event
+	 *  in response to the Enter key.
+	 */
+	private function textView_enterHandler(event:Event):void
+	{
+		// Redispatch the event that came from the TextView.
+		dispatchEvent(event);
+	}
+}
+
+}
+


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

--- frameworks/projects/spark/src/spark/utils/MouseEventUtil.as
+++ frameworks/projects/spark/src/spark/utils/MouseEventUtil.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: 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@1253368 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/series/renderData/ColumnSeriesRenderData.as
+++ frameworks/projects/charts/src/mx/charts/series/renderData/ColumnSeriesRenderData.as
@@ -0,0 +1,171 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.charts.series.renderData
+{
+
+import mx.charts.chartClasses.RenderData
+
+/**
+ *  Represents all the information needed by the ColumnSeries to render.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class ColumnSeriesRenderData extends RenderData
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *
+     *  @param cache The list of ColumnSeriesItem objects representing the items in the dataProvider.
+     *  @param filteredCache The list of ColumnSeriesItem objects representing the items in the dataProvider that remain after filtering.
+     *  @param renderedBase The vertical position of the base of the columns, in pixels.
+     *  @param renderedHalfWidth Half the width of a column, in pixels.
+     *  @param renderedXOffset The offset of each column from its x value, in pixels.
+     *  @param labelScale The scale factor of the labels rendered by the column series.
+     *  @param labelData A structure of data associated with the layout of the labels rendered by the column series.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function  ColumnSeriesRenderData(cache:Array /* of ColumnSeriesItem */ = null,
+                                            filteredCache:Array /* of ColumnSeriesItem */ = null,
+                                            renderedBase:Number = 0,
+                                            renderedHalfWidth:Number = 0,
+                                            renderedXOffset:Number = 0,
+                                            labelScale:Number = 1,
+                                            labelData:Object = null)
+    {
+        super(cache, filteredCache);
+
+        this.renderedBase = renderedBase;
+        this.renderedHalfWidth = renderedHalfWidth;
+        this.renderedXOffset = renderedXOffset;
+        this.labelScale = labelScale;
+        this.labelData = labelData;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  labelData
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  A structure of data associated with the layout of the labels rendered by the column series.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var labelData:Object;
+
+    //----------------------------------
+    //  labelScale
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The scale factor of the labels rendered by the column series.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var labelScale:Number;
+
+    //----------------------------------
+    //  renderedBase
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The vertical position of the base of the columns, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var renderedBase:Number;
+
+    //----------------------------------
+    //  renderedHalfWidth
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  Half the width of a column, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var renderedHalfWidth:Number;
+
+    //----------------------------------
+    //  renderedXOffset
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The offset of each column from its x value, in pixels.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var renderedXOffset:Number;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function clone():RenderData
+    {
+        return new ColumnSeriesRenderData(cache, filteredCache, renderedBase,
+                                          renderedHalfWidth, renderedXOffset,
+                                          labelScale, labelData);
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 842
Author:   genovese@adobe.com
Date:     2008-03-17T21:51:41.069586Z

Log Message:
-----------
Minor ASDoc changes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/LoadEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/AbstractWebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncRequest.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/IResponder.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/IResponder.as
+++ frameworks/projects/rpc/src/mx/rpc/IResponder.as
@@ -23,6 +23,9 @@
 	 *  has been received.
 	 *  While data is typed as Object, it is often
 	 *  (but not always) an mx.rpc.events.ResultEvent.
+         *
+         * @param data Although typed as Object, data is often (but not always)
+         * an mx.rpc.events.ResultEvent.
 	 */
 	function result(data:Object):void;

@@ -30,6 +33,9 @@
 	 *  This method is called by a service when an error has been received.
 	 *  While info is typed as Object it is often
 	 *  (but not always) an mx.rpc.events.FaultEvent.
+         *
+         * @param info Although typed as Object, info is often (but not always)
+         * an mx.rpc.events.FaultEvent.
 	 */
 	function fault(info:Object):void;
 }


 - added ...args to AbstractPlayer.play signature, to use it as handler!

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

--- src/reprise/media/AbstractPlayer.as
+++ src/reprise/media/AbstractPlayer.as
@@ -288,7 +288,7 @@
 		* bandwidth calling this method leads to no immediate effect. After the buffer was filled
 		* with data the playback starts automatically.
 		*/
-		public function play():void
+		public function play(...args):void
 		{
 			if (m_status & STATUS_PAUSED_AT_END)
 			{


Script code formatting.

Script code formatting.

--- Bin/Data/Scripts/Terrain.as
+++ Bin/Data/Scripts/Terrain.as
@@ -121,7 +121,7 @@
         renderer.viewports[0].AddPostProcess(edgeFilter);
         renderer.viewports[0].AddPostProcess(bloom);

-        audio.listener = cameraNode.CreateComponent("SoundListener");
+        audio.listener = cameraNode.CreateComponent("SoundListener");
     }

     if (runClient)
@@ -596,7 +596,7 @@
         SubscribeToEvent(node, "NodeCollisionStart", "HandleCollisionStart");
         SubscribeToEvent(node, "NodeCollisionEnd", "HandleCollisionEnd");
     }
-
+
     void HandleCollisionStart(StringHash eventType, VariantMap& eventData)
     {
         Node@ otherNode = eventData["OtherNode"].GetNode();
@@ -637,7 +637,7 @@
                 // Apply damping to linear & angular velocity
                 float damping = 1.0 - insideFraction * 0.05;
                 otherBody.linearVelocity = otherBody.linearVelocity * damping;
-                otherBody.angularVelocity = otherBody.angularVelocity * damping;;
+                otherBody.angularVelocity = otherBody.angularVelocity * damping;
             }
         }
     }


Fixed indentation

Fixed indentation


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

--- frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransitionMode.as
+++ frameworks/projects/mobilecomponents/src/spark/transitions/SlideViewTransitionMode.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.transitions
 {


def: 7713 fix issues with bumpers

def: 7713 fix issues with bumpers

--- plugins/wvPlugin/src/WvMediator.as
+++ plugins/wvPlugin/src/WvMediator.as
@@ -109,7 +109,7 @@

 				case NotificationType.MEDIA_ELEMENT_READY:
 					//get flavor asset ID
-					if (_mediaProxy.vo.deliveryType==StreamerType.HTTP)
+					if (!(facade.retrieveProxy(SequenceProxy.NAME) as SequenceProxy).vo.isInSequence && _mediaProxy.vo.deliveryType==StreamerType.HTTP)
 					{
 						var flavors:Array = _mediaProxy.vo.kalturaMediaFlavorArray;
 						if (flavors && flavors.length)


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

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

 package mx.collections
 {


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

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