Transferred from the Adobe Open Source Subversion Repository

Revision: 2668
Author:   kelin@adobe.com
Date:     2008-07-30T21:05:00.806335Z

Log Message:
-----------
Massive check-in:

Updated Range, TrackBase, Slider, Spinner to use valueInterval to constrain values. In Slider, snapInterval was removed in favor of just using stepSize (for simplicity). TrackBase also is able to handle a resizable thumb.

Refactored ScrollBar to subclass TrackBase instead of Range in order to share thumb dragging code. pageSize was also moved from Range into ScrollBar.

Added a basic version of NumericStepper that can handle simple operations like committing the value when the enter key is pressed.

Skins for each of the components were also updated/added as needed. I also updated flex4test/CircularScrollBar.

QE: Yes!
Reviewer: Chet, Gordon, Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/MyVScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/Flex4Classes.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/mxml-2009-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/NumericStepper.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/NumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/gumbo-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/VScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/HScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/flex4test.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/skin/SpinnerIncrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/components/CircularScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/development/eclipse/flex/flex4test/src/skins/CircularScrollBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/Range.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/Range.as
@@ -13,26 +13,30 @@
 {

 import flash.events.Event;
+
 import flex.core.SkinnableComponent;
+
 import mx.events.FlexEvent;

 /**
- *  The Range class holds a value and a legal range for that value, defined by a
- *  minimum and maximum. The value is always constrained to be within the
- *  current minimum and maximum, and the minimum and maximum are always
- *  constrained to be in the proper numerical order such that, at any
- *  time, (minimum <= value <= maximum) is true.
+ *  The Range class holds a value and a legal range for that
+ *  value, defined by a minimum and maximum. value
+ *  is always constrained to be within the current minimum and
+ *  maximum, and the minimum and maximum are always constrained
+ *  to be in the proper numerical order such that, at any time,
+ *  (minimum <= value <= maximum) is true.
+ *  value is also constrained to be multiples of
+ *  valueInterval if valueInterval is not 0.
  *
- *
Range has the stepSize and pageSize properties
- *  to control how much value will change based on small (step) and
- *  large (page) stepping operations.

+ *
Range has a stepSize property to control
+ *  how much value will change based on small
+ *  stepping operations.

  *
  *
Range is a base class for various controls that require Range
- *  functionality, including ScrollBar and its subclasses.

+ *  functionality, including TrackBase and Spinner.

  *
- *  @see flex.component.ScrollBar
- *  @see flex.component.HScrollBar
- *  @see flex.component.VScrollBar
+ *  @see flex.component.TrackBase
+ *  @see flex.component.Spinner
  */
 public class Range extends SkinnableComponent
 {
@@ -54,29 +58,24 @@

     //--------------------------------------------------------------------------
     //
-    //  Variables
-    //
-    //--------------------------------------------------------------------------
-
-    private var rangeChanged:Boolean = false;
-
-    //--------------------------------------------------------------------------
-    //
     //  Properties
     //
     //--------------------------------------------------------------------------

-    //////////////////////////////////
+    //---------------------------------
     // maximum
-    //////////////////////////////////
+    //---------------------------------

     private var _maximum:Number = 100;

+    private var maxChanged:Boolean = false;
+
     /**
      *  Number which represents the maximum value possible for
-     *  value. If the values for either minimum or
-     *  value are greater than maximum, they will
-     *  be changed to reflect the new max value.
+     *  value. If the values for either
+     *  minimum or value are greater
+     *  than maximum, they will be changed to
+     *  reflect the new maximum
      *
      *  @default 100
      */
@@ -89,23 +88,27 @@
     {
         if (value == _maximum)
             return;
+
         _maximum = value;
-
-        rangeChanged = true;
+        maxChanged = true;
+
         invalidateProperties();
     }

-    //////////////////////////////////
+    //---------------------------------
     // minimum
-    //////////////////////////////////
+    //---------------------------------

     private var _minimum:Number = 0;

+    private var minChanged:Boolean = false;
+
     /**
      *  Number which represents the minimum value possible for
-     *  value. If the values for either maximum or
-     *  value are less than minimum, they will
-     *  be changed to reflect the new min value.
+     *  value. If the values for either
+     *  maximum or value are less
+     *  than minimum, they will be changed to
+     *  reflect the new minimum
      *
      *  @default 0
      */
@@ -118,43 +121,28 @@
     {
         if (value == _minimum)
             return;
+
         _minimum = value;
-
-        rangeChanged = true;
+        minChanged = true;
+
         invalidateProperties();
     }
-
-    //////////////////////////////////
-    // pageSize
-    //////////////////////////////////
-
-    private var _pageSize:Number = 20;
-
-    /**
-     *  Amount of change in value when
-     *  the range is paged.
-     *
-     *  @default 20
-     */
-    public function get pageSize():Number
-    {
-        return _pageSize;
-    }
-
-    public function set pageSize(value:Number):void
-    {
-        _pageSize = value;
-    }
-
-    //////////////////////////////////
+
+    //---------------------------------
     // stepSize
-    //////////////////////////////////
+    //---------------------------------

     private var _stepSize:Number = 1;
-
-    /**
-     *  Amount of change in value when
-     *  the range is stepped.
+
+    private var stepSizeChanged:Boolean = false;
+
+    /**
+     *  stepSize is the amount that the value
+     *  changes when step() is called. It must
+     *  be a multiple of valueInterval unless
+     *  valueInterval is 0. If stepSize
+     *  is not a multiple, it is rounded to the nearest multiple
+     *  >= valueInterval.
      *
      *  @default 1
      */
@@ -165,28 +153,33 @@

     public function set stepSize(value:Number):void
     {
+        if (value == _stepSize)
+            return;
+
         _stepSize = value;
-    }
-
-    //////////////////////////////////
+        stepSizeChanged = true;
+
+        invalidateProperties();
+    }
+
+    //---------------------------------
     // value
-    //////////////////////////////////
+    //---------------------------------

     private var _value:Number = 0;

-    /**
-     *  @private
-     *  Flag that is set whenever the value changes. This flag is cleared
-     *  in commitProperties().
-     */
     private var valueChanged:Boolean = false;

     [Bindable(event="valueCommit")]

     /**
      *  Number which represents the current value for this range.
-     *  value will always be constrained to lie within the
-     *  current minimum and maximum values.
+     *  value will always be constrained to lie
+     *  within the current minimum and
+     *  maximum values. It also must be a multiple
+     *  of valueInterval.
+     *
+     *  @default 0
      */
     public function get value():Number
     {
@@ -203,6 +196,44 @@

         invalidateProperties();
     }
+
+    //---------------------------------
+    // valueInterval
+    //---------------------------------
+
+    private var _valueInterval:Number = 1;
+
+    private var valueIntervalChanged:Boolean = false;
+
+    /**
+     *  If greater than 0, valueInterval constrains
+     *  value to multiples of itself. If it is 0, then
+     *  value can be any number between minimum and
+     *  maximum. Also, value may always be set to the
+     *  minimum and maximum.
+     *  Changing valueInterval also may change
+     *  stepSize to be a multiple of
+     *  valueInterval and >= valueInterval.
+     *
+     *  @default 1
+     */
+    public function get valueInterval():Number
+    {
+        return _valueInterval;
+    }
+
+    public function set valueInterval(value:Number):void
+    {
+        if (value == _valueInterval)
+            return;
+
+        _valueInterval = value;
+        valueIntervalChanged = true;
+
+        stepSizeChanged = true;
+
+        invalidateProperties();
+    }

     //--------------------------------------------------------------------------
     //
@@ -217,40 +248,96 @@
     {
         super.commitProperties();

-        if (valueChanged || rangeChanged)
+        if (minimum > maximum)
         {
-            var newValue:Number = nearestValidValue(_value);
+            // Check min <= max
+            if (!maxChanged)
+                _minimum = _maximum;
+            else
+                _maximum = _minimum;
+        }
+
+        if (valueChanged || maxChanged || minChanged || valueIntervalChanged)
+        {
+            var newValue:Number = nearestValidValue(_value, valueInterval);
+
             if (valueChanged || newValue != _value)
             {
             	_value = newValue;
                 dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
             }
-
+
             valueChanged = false;
-            rangeChanged = false;
+            maxChanged = false;
+            minChanged = false;
+            valueIntervalChanged = false;
         }
-    }
-
-    /**
-     *  Returns the nearest valid value. The value must be between the
-     *  maximum and minimum.
+
+        if (stepSizeChanged)
+        {
+            if (valueInterval != 0)
+                _stepSize = nearestValidInterval(_stepSize, valueInterval);
+
+            stepSizeChanged = false;
+        }
+    }
+
+    /**
+     *  Utility function to round intervals (such as
+     *  stepSize) to a multiple of valueInterval.
+     */
+    protected function nearestValidInterval(value:Number, interval:Number):Number
+    {
+        var closest:Number = Math.round(value / interval)
+                             * interval;
+
+        if (closest < interval)
+            return interval;
+        else
+            return closest;
+    }
+
+    /**
+     *  Rounds the given value to the closest multiple of the
+     *  given interval and constrains it to the range. If interval
+     *  is 0, then the value is only bound to the range.
      *
-     *  @param value The value to be bounded.
-     *  @return The bounded value or 0 if value was NaN.
-     */
-    protected function nearestValidValue(value:Number):Number
-    {
-        // NaN returns 0
-        if (isNaN(value))
-            value = 0;
-
-        // Bound the value.
-        if (value > maximum)
+     *  @param value The value to be rounded.
+     *  @param interval The interval to round the value against.
+     *  @return The rounded value or 0 if value was NaN.
+     */
+    protected function nearestValidValue(value:Number, interval:Number):Number
+    {
+        var closest:Number = value;
+
+        if (isNaN(closest))
+            closest = 0;
+
+        // Round value to closest multiple of valueInterval
+        if (interval != 0)
+            closest = Math.round(closest / interval) * interval;
+
+        if (closest >= maximum)
             return maximum;
-        else if (value < minimum)
+        else if (closest <= minimum)
             return minimum;
-
-        return value;
+
+        if (interval == 0)
+            return closest;
+
+        // Round to the closest value (closest multiple, min, or max).
+        var cdiff:Number = Math.abs(closest - value);
+        var mindiff:Number = Math.abs(minimum - value);
+        var maxdiff:Number = Math.abs(maximum - value);
+        var min:Number = Math.min(cdiff, mindiff, maxdiff);
+
+        // Return order maintains rounding up when in the middle.
+        if (min == maxdiff)
+            return maximum;
+        else if (min == cdiff)
+            return closest;
+        else
+            return minimum;
     }

     /**
@@ -258,7 +345,7 @@
      *  and invalidation processes. Subclasses may use this method if
      *  they wish to customize behavior.
      *
-     *  @param value The value to set Range's value to.
+     *  @param value The number to set value
      */
     protected function setValue(value:Number):void
     {
@@ -266,30 +353,23 @@
             return;

         _value = value;
-        dispatchEvent(new Event(FlexEvent.VALUE_COMMIT));
-    }
-
-    /**
-     *  Steps the range value up or down
+
+        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
+    }
+
+    /**
+     *  Steps the range value up or down.
      *
      *  @param increase Whether the stepping action increases or
      *  decreases value.
      */
     public function step(increase:Boolean = true):void
     {
-        value += (increase ? stepSize : -stepSize);
-    }
-
-    /**
-     *  Pages the range value up or down
-     *
-     *  @param increase Whether the paging action increases or
-     *  decreases value.
-     */
-    public function page(increase:Boolean = true):void
-    {
-        value += (increase ? pageSize : -pageSize);
+        if (increase)
+            setValue(nearestValidValue(value + stepSize, stepSize));
+        else
+            setValue(nearestValidValue(value - stepSize, stepSize));
     }
 }

-}
+}


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

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


Transferred from the Adobe Open Source Subversion Repository

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

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

 package mx.messaging.messages
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 11323
Author:   aharui@adobe.com
Date:     2009-10-30T20:07:45.203965Z

Log Message:
-----------
Some tweaks to MXItemRenderer

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer: Ryan
API Change: no
Is noteworthy for integration: No
tests: checkintests

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/BaseListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/treeClasses/TreeListData.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as</path>

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

--- frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as
+++ frameworks/projects/spark/src/mx/controls/listClasses/MXItemRenderer.as
@@ -60,7 +60,6 @@
     public function MXItemRenderer()
     {
         super();
-        autoDrawBackground = true;
         focusEnabled = false;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12310
Author:   rfrishbe@adobe.com
Date:     2009-12-01T02:17:58.852008Z

Log Message:
-----------
Last remaining known API changes to the Flex video components:

VideoDisplay/VideoPlayer.seekToFirstFrame has been renamed to autoDisplayFirstFrame.

ScrubBar.bufferedStart has been removed as a property.

ScrubBar.bufferedEnd has been renamed to loadedRangeEnd.

ScrubBar.bufferedArea skin part has been renamed to loadedRangeArea.

Also I'm changing the behavior of the autoDisplayFirstFrame = true to key off of a state change event rather than the capabilities events now that an underlying OSMF bug has been fixed.

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/mediaClasses/normal/ScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.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/spark/src/spark/skins/spark/mediaClasses/fullScreen/ScrubBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/wireframe/src/spark/skins/wireframe/mediaClasses/ScrubBarSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.as
+++ frameworks/projects/spark/src/spark/components/mediaClasses/ScrubBar.as
@@ -24,7 +24,8 @@

 /**
  *  The VideoScrubBar class is a video scrubbar/timeline that can show the
- *  current playHead, the amount previously played, and the buffered video.
+ *  current playHead, the amount previously played, and the loaded in part
+ *  of the video.
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
@@ -78,14 +79,19 @@

     /**
      *  An optional skin part for the area on the track
-     *  representing the buffered video.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public var bufferedArea:IVisualElement;
+     *  representing the currently loaded in part of the video.
+     *
+     *
For a progressive download video, this will correspond
+     *  to the number of bytes downloaded.  For a streaming video,
+     *  the whole video is "loaded in" as it's quick to seek to
+     *  any spot in the video.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var loadedRangeArea:IVisualElement;

     //--------------------------------------------------------------------------
     //
@@ -94,66 +100,39 @@
     //--------------------------------------------------------------------------

     //---------------------------------
-    // bufferedEnd
+    // loadedRangeEnd
     //---------------------------------

-    private var _bufferedEnd:Number;
-
-    /**
-     *  The range of currently buffered in values.  This
+    private var _loadedRangeEnd:Number;
+
+    /**
+     *  The range of currently loaded in values.  This
      *  property corresponds to the end of that range.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get bufferedEnd():Number
-    {
-        return _bufferedEnd;
-    }
-
-    /**
-     *  @private
-     */
-    public function set bufferedEnd(value:Number):void
-    {
-        if (value == _bufferedEnd)
+     *
+     *
For a progressive download video, this will correspond
+     *  to the number of bytes downloaded.  For a streaming video,
+     *  the whole video is "loaded in" as it's quick to seek to
+     *  any spot in the video.

+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get loadedRangeEnd():Number
+    {
+        return _loadedRangeEnd;
+    }
+
+    /**
+     *  @private
+     */
+    public function set loadedRangeEnd(value:Number):void
+    {
+        if (value == _loadedRangeEnd)
             return;

-        _bufferedEnd = value;
-        invalidateDisplayList();
-    }
-
-    //---------------------------------
-    // bufferedStart
-    //---------------------------------
-
-    private var _bufferedStart:Number;
-
-    /**
-     *  The range of currently buffered in values.  This
-     *  property corresponds to the start of that range.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public function get bufferedStart():Number
-    {
-        return _bufferedStart;
-    }
-
-    /**
-     *  @private
-     */
-    public function set bufferedStart(value:Number):void
-    {
-        if (value == _bufferedStart)
-            return;
-
-        _bufferedStart = value;
+        _loadedRangeEnd = value;
         invalidateDisplayList();
     }

@@ -179,12 +158,12 @@

             invalidateDisplayList();
         }
-        else if (instance == bufferedArea)
+        else if (instance == loadedRangeArea)
         {
-            if (bufferedArea is InteractiveObject)
-                InteractiveObject(bufferedArea).mouseEnabled = false;
-            if (bufferedArea is DisplayObjectContainer)
-                DisplayObjectContainer(bufferedArea).mouseChildren = false;
+            if (loadedRangeArea is InteractiveObject)
+                InteractiveObject(loadedRangeArea).mouseEnabled = false;
+            if (loadedRangeArea is DisplayObjectContainer)
+                DisplayObjectContainer(loadedRangeArea).mouseChildren = false;

             invalidateDisplayList();
         }
@@ -209,24 +188,24 @@
     override protected function updateSkinDisplayList():void
     {
         super.updateSkinDisplayList();
-        sizeBufferedArea(calculateAreaSize(bufferedEnd));
+        sizeLoadedRangeArea(calculateAreaSize(loadedRangeEnd));
         sizePlayedArea(calculateAreaSize(value));
     }

     /**
-     *  Sets the size of the buffered area
+     *  Sets the size of the loaded range area
      *
-     *  @param bufferedAreaSize The new size of the buffered area
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    protected function sizeBufferedArea(bufferedAreaSize:Number):void
-    {
-        if (bufferedArea)
-            bufferedArea.setLayoutBoundsSize(Math.round(bufferedAreaSize), NaN);
+     *  @param loadedRangeAreaSize The new size of the loaded in range area
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function sizeLoadedRangeArea(loadedRangeAreaSize:Number):void
+    {
+        if (loadedRangeArea)
+            loadedRangeArea.setLayoutBoundsSize(Math.round(loadedRangeAreaSize), NaN);
     }

     /**


use screenXY and clientXY

use screenXY and clientXY

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/events/MouseEvent.as
@@ -85,6 +85,7 @@
         public function set localX(value:Number):void
         {
             _localX = value;
+            clientX = value;
             _stagePoint = null;
         }

@@ -96,6 +97,7 @@
         public function set localY(value:Number):void
         {
             _localY = value;
+            clientY = value;
             _stagePoint = null;
         }

@@ -109,9 +111,13 @@
         public var controlKey:Boolean;
         public var clickCount:int;

+        // these map directly to JS MouseEvent fields.
+        public var clientX:Number;
+        public var clientY:Number;
+
         private var _stagePoint:Point;

-        public function get stageX():Number
+        public function get screenX():Number
         {
             if (!target) return localX;
             if (!_stagePoint)
@@ -122,7 +128,7 @@
             return _stagePoint.x;
         }

-        public function get stageY():Number
+        public function get screenY():Number
         {
             if (!target) return localY;
             if (!_stagePoint)


Runtime does not like subclass types...

Runtime does not like subclass types...

--- frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
+++ frameworks/projects/Core/src/main/flex/org/apache/flex/geom/Rectangle.as
@@ -43,15 +43,15 @@
     {
         super(x, y, width, height);
     }
-	override public function clone():org.apache.flex.geom.Rectangle
+	override public function clone():flash.geom.Rectangle
 	{
 		return new org.apache.flex.geom.Rectangle(x,y,width,height);
 	}
-	override public function intersection(toIntersect:flash.geom.Rectangle):org.apache.flex.geom.Rectangle
+	override public function intersection(toIntersect:flash.geom.Rectangle):flash.geom.Rectangle
 	{
 		return org.apache.flex.geom.Rectangle(super.intersection(toIntersect));
 	}
-	override public function union(toUnion:flash.geom.Rectangle):org.apache.flex.geom.Rectangle
+	override public function union(toUnion:flash.geom.Rectangle):flash.geom.Rectangle
 	{
 		return org.apache.flex.geom.Rectangle(super.union(toUnion));
 	}


Transferred from the Adobe Open Source Subversion Repository

Revision: 7062
Author:   dloverin@adobe.com
Date:     2009-05-19T11:16:05.869220Z

Log Message:
-----------
Spark WindowedApplication fixes.

https://bugs.adobe.com/jira/browse/SDK-21186

Fix returning a bogus state.

spark.components.Window
spark.components.WindowedApplication
                Return “disabled” instead of “disableActive”. “disabledActive” was renamed to “disabled” but the code didn’t get updated.

http://bugs.adobe.com/jira/browse/SDK-21039

Fix returning an out of range value from the “type” and “systemChrome” properties.

mx.core.WindowedApplication
spark.components.WindowedApplication

                get type()
                                The initial Window is always normal so don’t bother with getting the nativeWindow.

                get systemChrome()
                                Fix returning an out of range value.  Set the value as soon as possible and stick with it.

                override initialize() to set _systemChrome as early as possible.
                Initialize _nativateWindow in initialize() instead of in the createComplete handler. This seems better but doesn’t fix a bug.

QE Notes: None.
Doc Notes: None.
Bugs: SDK-21186, SDK-21039
Reviewer: Darrell
tests: checkintests

Modified Paths:
--------------
<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/airframework/src/spark/components/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>

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

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -1412,6 +1412,8 @@
     //  systemChrome
     //----------------------------------

+    private var _systemChrome:String = NativeWindowSystemChrome.STANDARD;
+
     /**
      *  Specifies the type of system chrome (if any) the window has.
      *  The set of possible values is defined by the constants
@@ -1425,9 +1427,7 @@
      */
     public function get systemChrome():String
     {
-        if (nativeWindow.closed)
-            return "";
-        return nativeWindow.systemChrome;
+        return _systemChrome;
     }

     //----------------------------------
@@ -1592,10 +1592,8 @@
      */
     public function get type():String
     {
-        if (nativeWindow.closed)
-            return "standard";
-
-        return nativeWindow.type;
+        // The initial window is always of type "normal".
+        return NativeWindowType.NORMAL;
     }

     //--------------------------------------------------------------------------
@@ -1603,8 +1601,7 @@
     //  Overridden methods: UIComponent
     //
     //--------------------------------------------------------------------------
-
-
+
     /**
      *  @private
      */
@@ -1756,6 +1753,19 @@
                 nativeWindow.maximize();
         }
      }
+
+    /**
+     *  @private
+     */
+    override public function initialize():void
+    {
+        // initialize _nativeWindow as soon as possible and
+        // get the value of systemChrome.
+        _nativeWindow = systemManager.stage.nativeWindow;
+        _systemChrome = _nativeWindow.systemChrome;
+
+        super.initialize();
+    }

     /**
      *  @private
@@ -2131,7 +2141,7 @@
             return "disabled";

         if (nativeWindow.active)
-            return enabled ? "normal" : "disabledActive";
+            return enabled ? "normal" : "disabled";
         else
             return enabled ? "normalInactive" : "disabledInactive";

@@ -2261,7 +2271,6 @@
     private function creationCompleteHandler(event:Event):void
     {
         addEventListener(Event.ENTER_FRAME, enterFrameHandler);
-        _nativeWindow = systemManager.stage.nativeWindow;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 22126
Author:   tkraikit@adobe.com
Date:     2011-08-20T06:36:03.947681Z

Log Message:
-----------
remove unnecessary TODO comment

QE notes: n/a
Doc notes: n/a
Bugs: n/a
Reviewer: n/a
Tests run: checkintests
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as

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

--- frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
+++ frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as
@@ -680,9 +680,6 @@
     {
         super.commitProperties();

-        // TODO: CHECK ON THIS ASSUMPTION
-        // TODO: Jason says this is wrong; just use styleName = DateSpinner to link styles
-        //       but having trouble getting that to work
         var localeStr:String = getStyle("locale");
         if (refreshDateTimeFormatter)
         {


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

Reviewer: Evtim
QA: yes.

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

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

--- frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
+++ frameworks/projects/spark/src/spark/layouts/supportClasses/LayoutBase.as
@@ -17,6 +17,7 @@

 import mx.components.baseClasses.GroupBase;
 import mx.core.ScrollUnit;
+import mx.core.ILayoutElement;
 import mx.utils.OnDemandEventDispatcher;


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

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

 package mx.messaging.channels
 {


only harvest

only harvest

only harvest

--- src/ageofai/unit/utils/VillagerAI.as
+++ src/ageofai/unit/utils/VillagerAI.as
@@ -103,7 +103,7 @@
                 else if (nextToObject)
                 {
                     villager.destination = null;
-                    villager.status = nodeVO.node.objectType == CMapNodeType.OBJECT_FRUIT ? CVillagerStatus.HARVEST : CVillagerStatus.WOOD_CUTTING;
+                    villager.status = nodeVO.node.objectType == CMapNodeType.OBJECT_FRUIT ? CVillagerStatus.HARVEST : CVillagerStatus.HARVEST;
                     newPoint = villager.position;
                 }
                 else


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 8486
Author:   smgilson@adobe.com
Date:     2009-07-09T18:42:45.734868Z

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

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ButtonBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HGroup.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/spark/src/spark/components/RadioButtonGroup.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Button.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Spinner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/VGroup.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/spark/src/spark/components/CheckBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HSlider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/HScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Panel.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Application.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/VSlider.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/spark/src/spark/components/VScrollBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/Range.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -136,7 +136,7 @@
  *
  *  @mxml
  *
- *
The <GroupBase> tag inherits all of the tag
+ *
The <s:GroupBase> tag inherits all of the tag
  *  attributes of its superclass and adds the following tag attributes:

  *
  *


Transferred from the Adobe Open Source Subversion Repository

Revision: 4040
Author:   gosmith@adobe.com
Date:     2008-11-07T02:08:56.069851Z

Log Message:
-----------
Improved text hiliting.

Text selections in TextView now hilite using three CSS-settable colors. And you can control whether the selection is shown when the component doesn't have focus, and when the window isn't active.

The visibility of the selection is determined by a new 'selectionVisibility' property on TextView and FxTextBase. The allowed values -- "whenFocused", "whenActive", and "always" -- are available in the new TextSelectionVisibility enum class. This is similar to TextField's 'alwaysShowSelection' property but more general.

The hilite color in each of the three states is determined by the three styles selectionColor, unfocusedSelectionColor, and inactiveSelectionColor. The latter two are new in Gumbo. Note that the existing selectionColor style now applies to selected text as well as to selected list items, etc. We may decide to have unfocusedSelectionColor and inactiveSelectionColor apply to things like list items as well, but that isn't part of this checkin.

QE Notes: The blinking insertion point is now barely visible because it is the selection hilite color. I'll work with the TLF team to get it drawn in a highly-visible way. Also, the selectionColor is not getting properly computed based on the themeColor for FxApplications.
Doc Notes: None
Bugs: None
Reviewer: Deepa

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextSelectionVisibility.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/styles/metadata/SelectionFormatTextStyles.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/GroupBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/GroupBase.as
@@ -47,6 +47,7 @@
 include "../../styles/metadata/AdvancedParagraphFormatTextStyles.as"
 include "../../styles/metadata/BasicCharacterFormatTextStyles.as"
 include "../../styles/metadata/AdvancedCharacterFormatTextStyles.as"
+include "../../styles/metadata/SelectionFormatTextStyles.as"

 [Exclude(name="enabled", kind="property")]


Change 20080606-hqm-S by hqm@badtzmaru.home on 2008-06-06 11:08:01 EDT
    in /Users/hqm/openlaszlo/trunk2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: fix text selectability in swf9

New Features:

Bugs Fixed: LPP-6114

Technical Reviewer: andre
QA Reviewer: pbr
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

mouseEnabled must be true to allow selecting of text

setSelectable(..):
this.textfield.mouseEnabled = isSel || this.clickable;
setClickable(..):
this.textfield.mouseEnabled = c || this.textfield.selectable;

Tests:

text which says "I am selectable..."  is selectable in test/swf9/hello.lzx test

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@9494 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
@@ -54,7 +54,7 @@
         override public function setClickable( c:Boolean ):void {
           if (this.clickable == c) return;

-          this.textfield.mouseEnabled = c;
+          this.textfield.mouseEnabled = c || this.textfield.selectable;

           this.clickable = c;
           if (c) {
@@ -351,6 +351,7 @@
          */
         public function setSelectable ( isSel:Boolean ):void {
             this.textfield.selectable = isSel;
+            this.textfield.mouseEnabled = isSel || this.clickable;
         }

         public function getTextWidth ( ):Number {


Change 20090218-bargull-hTy by bargull@dell--p4--2-53 on 2009-02-18 02:13:27
    in /home/Admin/src/svn/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: use flash.utils.Timer for LzTimeKernel

New Features:

Bugs Fixed: LPP-7763

Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
Changed LzTimeKernelClass#setTimeout, #setInterval, #clearTimeout, #clearInterval to use flash.utils.Timer instead of the functions defined in flash.utils.*
It was necessary to change the implementation because the setTimeout etc. functions apparently create memory leaks within the flash player.
I created a subclass of flash.utils.Timer so that we can easily identify each instance (timerID property) and to support functions callbacks instead the event based mechanism (closure and arguments property). To reduce the overall number of LzKernelTimer instances up to MAX_POOL (currently set to 10) are cached.

Tests:
testcase from bugreport, note that cpu usage stays low

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12917 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzTimeKernel.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzTimeKernel.as
@@ -1,7 +1,7 @@
 /**
   * LzTimeKernel.as
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic Kernel
@@ -12,19 +12,125 @@
 final class LzTimeKernelClass {
     #passthrough (toplevel:true) {
     import flash.utils.getTimer;
-    import flash.utils.setTimeout;
-    import flash.utils.setInterval;
-    import flash.utils.clearTimeout;
-    import flash.utils.clearInterval;
+    import flash.events.TimerEvent;
     }#

-    const getTimer :Function = flash.utils.getTimer;
-    const setTimeout :Function = flash.utils.setTimeout;
-    const setInterval :Function = flash.utils.setInterval;
-    const clearTimeout :Function = flash.utils.clearTimeout;
-    const clearInterval :Function = flash.utils.clearInterval;
+    private const MAX_POOL :int = 10;
+    private var timerPool :Array = [];
+    private var timers :Object = {};
+
+    /**
+      * Creates a new timer and returns an unique identifier which can be used to remove the timer.
+      */
+    private function createTimer (delay:Number, repeatCount:int, closure:Function, args:Array) :uint {
+        var timer:LzKernelTimer = this.timerPool.pop() || new LzKernelTimer();
+        this.timers[timer.timerID] = timer;
+        timer.delay = delay;
+        timer.repeatCount = repeatCount;
+        timer.closure = closure;
+        timer.arguments = args;
+        timer.addEventListener(TimerEvent.TIMER, this.timerHandler);
+        timer.addEventListener(TimerEvent.TIMER_COMPLETE, this.timerCompleteHandler);
+        timer.start();
+        return timer.timerID;
+    }
+
+    /**
+      * Stops and removes the timer with the given id.
+      */
+    private function removeTimer (id:uint) :void {
+        var timer:LzKernelTimer = this.timers[id];
+        if (timer) {
+            timer.closure = null;
+            timer.arguments = null;
+            timer.removeEventListener(TimerEvent.TIMER, this.timerHandler);
+            timer.removeEventListener(TimerEvent.TIMER_COMPLETE, this.timerCompleteHandler);
+            timer.reset();
+            delete this.timers[id];
+            if (this.timerPool.length < this.MAX_POOL) {
+                this.timerPool.push(timer);
+            }
+        }
+    }
+
+    private function timerHandler (event:TimerEvent) :void {
+        var timer:LzKernelTimer = LzKernelTimer(event.target);
+        if (timer.closure) {
+            timer.closure.apply(null, timer.arguments);
+        }
+    }
+
+    private function timerCompleteHandler (event:TimerEvent) :void {
+        var timer:LzKernelTimer = LzKernelTimer(event.target);
+        this.removeTimer(timer.timerID);
+    }
+
+    public const getTimer :Function = flash.utils.getTimer;
+
+    // const setTimeout :Function = flash.utils.setTimeout;
+    public function setTimeout (closure:Function, delay:Number, ...args) :uint {
+        return this.createTimer(delay, 1, closure, args);
+    }
+
+    // const setInterval :Function = flash.utils.setInterval;
+    public function setInterval (closure:Function, delay:Number, ...args) :uint {
+        return this.createTimer(delay, 0, closure, args);
+    }
+
+    // const clearTimeout :Function = flash.utils.clearTimeout;
+    public function clearTimeout (id:uint) :void {
+        this.removeTimer(id);
+    }
+
+    // const clearInterval :Function = flash.utils.clearInterval;
+    public function clearInterval (id:uint) :void {
+        this.removeTimer(id);
+    }

     function LzTimeKernelClass() {
     }
 }
 var LzTimeKernel = new LzTimeKernelClass();
+
+/**
+  * This is a helper class for LzTimeKernel. In addition to the flash.utils.Timer
+  * class, each timer has got an unique id and holds a reference to a function
+  * and an arguments array.
+  * @see LzTimeKernelClass#createTimer
+  * @see LzTimeKernelClass#removeTimer
+  */
+final class LzKernelTimer extends Timer {
+  #passthrough (toplevel:true) {
+    import flash.utils.Timer;
+  }#
+
+  #passthrough {
+    private static var idCounter :uint = 0;
+
+    public function LzKernelTimer () {
+        super(0);
+        this._timerID = LzKernelTimer.idCounter++;
+    }
+
+    private var _timerID :uint;
+    public function get timerID () :uint {
+        return this._timerID;
+    }
+
+    private var _closure :Function;
+    public function get closure () :Function {
+        return this._closure;
+    }
+    public function set closure (c:Function) :void {
+        this._closure = c;
+    }
+
+    private var _arguments :Array;
+    public function get arguments () :Array {
+        return this._arguments;
+    }
+    public function set arguments (a:Array) :void {
+        this._arguments = a;
+    }
+  }#
+}


asNumber() now supports Date objects

asNumber() now supports Date objects

Change-Id: Idf0ef934f374f25ac784eb9b87df30f8199d18a9

--- WeaveCore/src/weave/compiler/StandardLib.as
+++ WeaveCore/src/weave/compiler/StandardLib.as
@@ -47,7 +47,7 @@
 			if (value == null)
 				return NaN; // return NaN because Number(null) == 0

-			if (value is Number)
+			if (value is Number || value is Date)
 				return value;

 			try {


LinkableHashMap.renameObject now sets the name order so the new name is
in the same place the old name was.

Change-Id: Id58ee1d2bb021c83690f3a08f6a1d3d62ce26dda

--- WeaveCore/src/weave/core/LinkableHashMap.as
+++ WeaveCore/src/weave/core/LinkableHashMap.as
@@ -220,8 +220,17 @@
 			if (oldName != newName)
 			{
 				delayCallbacks();
+
+				// prepare a name order that will put the new name in the same place the old name was
+				var newNameOrder:Array = _orderedNames.concat();
+				var index:int = newNameOrder.indexOf(oldName);
+				if (index >= 0)
+					newNameOrder.splice(index, 1, newName);
+
 				requestObjectCopy(newName, getObject(oldName));
 				removeObject(oldName);
+				setNameOrder(newNameOrder);
+
 				resumeCallbacks();
 			}
 			return getObject(newName);


fixing "_complete" method, adding conditional


Revert "AutomaticExporter: don't check Publisher.modified"

This reverts commit 66bd67a5f293259ef411770b0f321cfca4b0fcc1.

Always exporting sucks as well. We need a better solution.

--- exporter/src/main/as/flump/export/AutomaticExporter.as
+++ exporter/src/main/as/flump/export/AutomaticExporter.as
@@ -100,9 +100,7 @@
             var libs :Vector.<XflLibrary> = getLibs();
             // if we have one or more combined export format, publish them
             if (hasCombined) {
-                // TODO: publisher.modified checks for SWF modifications, but ignores
-                // FLA modifications, which leads to false negatives.
-                if (true || publisher.modified(libs)) {
+                if (publisher.modified(libs)) {
                     println("Exporting combined formats...");
                     var numPublished :int = publisher.publishCombined(libs);
                     if (numPublished == 0) {
@@ -118,7 +116,7 @@
             // now publish any appropriate single formats
             if (hasSingle) {
                 for each (var status :DocStatus in _statuses) {
-                    if (true || publisher.modified(new <XflLibrary>[status.lib], 0)) {
+                    if (publisher.modified(new <XflLibrary>[status.lib], 0)) {
                         println("Exporting '" + status.path + "'...");
                         numPublished = publisher.publishSingle(status.lib);
                         if (numPublished == 0) {


Transferred from the Adobe Open Source Subversion Repository

Revision: 16992
Author:   cframpto@adobe.com
Date:     2010-07-21T15:27:15.672021Z

Log Message:
-----------
If requireSelection is true, and there is no selection, in addition to setting the selection, enusre the caret position is set.

The Grid Selection API will now set the caret position as well as the selection.  For SET, ADD or REMOVE ROW/CELL caret is set to that row or cell and for SET_ROWS/CELLS caret is set to the last row in indicies or the last cell (rowIndex + rowCount, columnIndex + columnCount).  I'm not sure the selection API should be setting the caret position but this is consistent with how spark list works.

QE notes: grid selection API now sets caret position as well
Doc notes:
Bugs: SDK-26987, SDK-27039
Reviewer: Hans
Tests run: none
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Grid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/supportClasses/GridSelection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/GridContainerBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/Grid.as
+++ frameworks/projects/spark/src/spark/components/Grid.as
@@ -415,7 +415,7 @@
          *  GridSelectionMode.MULTIPLE_CELLS then the caretIndicator
          *  occupies the specified cell.
          *
-         *
Setting careColumnIndex to -1 means that the column index is undefined and
+         *
Setting caretColumnIndex to -1 means that the column index is undefined and
          *  a cell caret will not be shown.

          *
          *  @default -1
@@ -435,14 +435,8 @@
          */
         public function set caretColumnIndex(value:int):void
         {
-            // TBD(hmuller): this short-circuit doens't seem right.  Don't update the _caretColumnIndex
-            // if selectionMode == ROW,ROWS?  What if the selectionMode has changed at commitProperties time?
-            if (caretColumnIndex == value ||
-                selectionMode == GridSelectionMode.SINGLE_ROW ||
-                selectionMode == GridSelectionMode.MULTIPLE_ROWS)
-            {
+            if (caretColumnIndex == value)
                 return;
-            }

             _oldCaretColumnIndex = _caretColumnIndex;
             _caretColumnIndex = value;
@@ -1517,7 +1511,6 @@
             const selectionChanged:Boolean = gridSelection.selectAll();
             if (selectionChanged)
             {
-                caretRowIndex = caretColumnIndex = -1;
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1526,7 +1519,7 @@
             caretRowIndex = -1;
             caretColumnIndex = -1;

-            return selectionChanged;
+           return selectionChanged;
         }

         /**
@@ -1655,9 +1648,10 @@
         }

         /**
-         *  Sets the selection to this row, if selectionMode
+         *  If selectionMode
          *  is GridSelectionMode.SINGLE_ROW or
-         *  GridSelectionMode.MULTIPLE_ROWS.
+         *  GridSelectionMode.MULTIPLE_ROWS, sets the selection and
+         *  the caret position to this row.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -1668,6 +1662,8 @@
          *  @return True if no errors, or false if index is invalid or
          *  the selectionMode is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#dataProvider
          *
          *  @langversion 3.0
@@ -1680,6 +1676,9 @@
             const selectionChanged:Boolean = gridSelection.setRow(index);
             if (selectionChanged)
             {
+                caretRowIndex = index;
+                caretColumnIndex = -1;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1688,8 +1687,9 @@
         }

         /**
-         *  Adds this row to the selection, if selectionMode
-         *  is GridSelectionMode.MULTIPLE_ROWS.
+         *  If selectionMode
+         *  is GridSelectionMode.MULTIPLE_ROWS, adds this row to
+         *  the selection and sets the caret position to this row.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -1700,6 +1700,8 @@
          *  @return True if no errors, or false if index is invalid or
          *  the selectionMode is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#dataProvider
          *
          *  @langversion 3.0
@@ -1712,6 +1714,9 @@
             const selectionChanged:Boolean = gridSelection.addRow(index);
             if (selectionChanged)
             {
+                caretRowIndex = index;
+                caretColumnIndex = -1;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1720,9 +1725,10 @@
         }

         /**
-         *  Removes this row from the selection, if selectionMode
+         *  If selectionMode
          *  is GridSelectionMode.SINGLE_ROW or
-         *  GridSelectionMode.MULTIPLE_ROWS.
+         *  GridSelectionMode.MULTIPLE_ROWS, removes this row
+         *  from the selection and sets the caret position to this row.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -1733,6 +1739,8 @@
          *  @return True if no errors, or false if index is invalid or
          *  the selectionMode is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#dataProvider
          *
          *  @langversion 3.0
@@ -1745,6 +1753,9 @@
             const selectionChanged:Boolean = gridSelection.removeRow(index);
             if (selectionChanged)
             {
+                caretRowIndex = index;
+                caretColumnIndex = -1;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1753,8 +1764,9 @@
         }

         /**
-         *  Sets the selection to the specified rows if
-         *  selectionMode is GridSelectionMode.MULTIPLE_ROWS.
+         *  If selectionMode is GridSelectionMode.MULTIPLE_ROWS,
+         *  sets the selection to the specfied rows and the caret position to
+         *  the last row in indices.
          *  For all other selection modes, this method has no effect.
          *
          *
Each element in the Vector is an index in dataProvider
@@ -1777,6 +1789,9 @@
             const selectionChanged:Boolean = gridSelection.setRows(indices);
             if (selectionChanged)
             {
+                caretRowIndex = indices[indices.length - 1];
+                caretColumnIndex = -1;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1944,9 +1959,10 @@
         }

         /**
-         *  Sets the selection to this cell, if selectionMode
+         *  If selectionMode
          *  is GridSelectionMode.SINGLE_CELL or
-         *  GridSelectionMode.MULTIPLE_CELLS.
+         *  GridSelectionMode.MULTIPLE_CELLS, sets the selection
+         *  and the caret position to this cell.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -1962,6 +1978,8 @@
          *  or columnIndex is invalid or the selectionMode
          *  is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#columns
          *  @see spark.components.Grid#dataProvider
          *
@@ -1975,6 +1993,9 @@
             const selectionChanged:Boolean = gridSelection.setCell(rowIndex, columnIndex);
             if (selectionChanged)
             {
+                caretRowIndex = rowIndex;
+                caretColumnIndex = columnIndex;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -1983,9 +2004,10 @@
         }

         /**
-         *  Adds the cell to the selection, if selectionMode
+         *  If selectionMode
          *  is GridSelectionMode.SINGLE_CELL or
-         *  GridSelectionMode.MULTIPLE_CELLS.
+         *  GridSelectionMode.MULTIPLE_CELLS, adds the cell to
+         *  the selection and sets the caret position to the cell.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -2001,6 +2023,8 @@
          *  or columnIndex is invalid or the selectionMode
          *  is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#columns
          *  @see spark.components.Grid#dataProvider
          *
@@ -2014,6 +2038,9 @@
             const selectionChanged:Boolean = gridSelection.addCell(rowIndex, columnIndex);
             if (selectionChanged)
             {
+                caretRowIndex = rowIndex;
+                caretColumnIndex = columnIndex;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -2022,9 +2049,10 @@
         }

         /**
-         *  Removes the cell from the selection, if selectionMode
+         *  If selectionMode
          *  is GridSelectionMode.SINGLE_CELL or
-         *  GridSelectionMode.MULTIPLE_CELLS.
+         *  GridSelectionMode.MULTIPLE_CELLS, removes the cell
+         *  from the selection and sets the caret position to the cell.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -2040,6 +2068,8 @@
          *  or columnIndex is invalid or the selectionMode
          *  is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#columns
          *  @see spark.components.Grid#dataProvider
          *
@@ -2053,6 +2083,9 @@
             const selectionChanged:Boolean = gridSelection.removeCell(rowIndex, columnIndex);
             if (selectionChanged)
             {
+                caretRowIndex = rowIndex;
+                caretColumnIndex = columnIndex;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -2060,9 +2093,10 @@
             return selectionChanged;
         }

-        /**
-         *  Sets the selection to all the cells in the cell region if
-         *  selectionMode is GridSelectionMode.MULTIPLE_CELLS.
+        /**
+         *  If selectionMode is GridSelectionMode.MULTIPLE_CELLS,
+         *  sets the selection to all the cells in the cell region and the
+         *  caret position to the last cell in the cell region.
          *  For all other selection modes, this method has no effect.
          *
          *
The rowIndex is the index in dataProvider
@@ -2088,6 +2122,8 @@
          *  @return True if no errors, or false if the cell region is invalid or
          *  the selectionMode is invalid.
          *
+         *  @see spark.components.Grid#caretColumnIndex
+         *  @see spark.components.Grid#caretRowIndex
          *  @see spark.components.Grid#columns
          *  @see spark.components.Grid#dataProvider
          *
@@ -2104,6 +2140,9 @@
                 rowCount, columnCount);
             if (selectionChanged)
             {
+                caretRowIndex = rowIndex + rowCount;
+                caretColumnIndex = columnIndex + columnCount;
+
                 invalidateDisplayList()
                 dispatchFlexEvent(FlexEvent.VALUE_COMMIT);
             }
@@ -2307,12 +2346,6 @@
          */
         override protected function commitProperties():void
         {
-            if (caretChanged)
-            {
-                dispatchCaretChangeEvent();
-                caretChanged = false;
-            }
-
             // If the dataProvider or columns change, reset the selection and
             // the grid dimensions.  This has to be done here rather than in the
             // setters because the gridSelection and gridDimensions might not
@@ -2341,12 +2374,24 @@
                         gridDimensions.columnCount = _columns.length;
                 }

-                caretRowIndex = -1;
-                caretColumnIndex = -1;
+                // Don't wipe out a pending caret change.
+                if (!caretChanged)
+                {
+                    caretRowIndex = -1;
+                    caretColumnIndex = -1;
+                }

                 dataProviderChanged = false;
                 columnsChanged = false;
             }
+
+            // Only want one event if both caretRowIndex and caretColumnIndex
+            // changed.
+            if (caretChanged)
+            {
+                dispatchCaretChangeEvent();
+                caretChanged = false;
+            }
         }

         /**


Change:	41001

Change:	41001

User:	jgrandy

Description:
	Summary:Optimize LzView.updateSize

	Technical Reviewer: ptw (pending)
	QA Reviewer: mdavis (pending)
	Doc Reviewer:

	Details:Reduce string concat overhead and only send events if they are
	non-null. Profiler tells me these changes reduce overhead of
	LzView.updateSize by about 40%.

	Tests:smokecheck.lzx

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@251 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/views/LaszloView.as
+++ WEB-INF/lps/lfc/views/LaszloView.as
@@ -630,13 +630,13 @@
     if ( (!this.hassetwidth && this.resourcewidth > this.width ) ||
         (this._setrescwidth && this.unstretchedwidth <
                                                 this.resourcewidth)){
-        this.updateSize( "width" , this.resourcewidth  );
+        this.updateWidth( this.resourcewidth  );
     }

     if ( (!this.hassetheight && this.resourceheight > this.height ) ||
             (this._setrescheight && this.unstretchedheight <
                                                 this.resourceheight)){
-        this.updateSize( "height" , this.resourceheight  );
+        this.updateHeight( this.resourceheight  );
     }

     //@event onload: Sent when the view attaches its resource.
@@ -1326,7 +1326,10 @@

             if ( ss > ts && sview.visible ){
                 this[ "__LZoutlie" + axis ] = sview;
-                this.updateSize( axis , ss);
+                if (axis == "width")
+                    this.updateWidth(ss);
+                else
+                    this.updateHeight(ss);
             } else if ( this[ "__LZoutlie" + axis ] == sview
                         && ( ss < ts || ! sview.visible ) ){
                 //uhoh -- we need to recheck everything
@@ -1430,37 +1433,90 @@
 // @keywords private
 //-----------------------------------------------------------------------------
 LzView.prototype.updateSize = function ( axis , newsize ){
-    var sc = "_" + (axis == "width" ? "x" : "y" ) + "scale";
-    if ( this[ "_setresc" + axis ] ){
-        this[ "unstretched" + axis ] = newsize;
-
-        if ( this[ 'hasset' + axis ] ){
-            var scale = this[ axis ] / newsize;
-            this[ sc ] = scale;
-
-            this.__LZmovieClipRef[ sc ] = 100 * scale;
-        }
-
-        this['onunstretched' + axis ].sendEvent( newsize );
+    if (axis == "width")
+        this.updateWidth(newsize);
+    else
+        this.updateHeight(newsize);
+}
+
+//-----------------------------------------------------------------------------
+// @keywords private
+//-----------------------------------------------------------------------------
+LzView.prototype.updateWidth = function ( newsize ){
+    if ( this._setrescwidth ){
+        this.unstretchedwidth = newsize;
+
+        if ( this.hassetwidth ){
+            var scale = this.width / newsize;
+            this._xscale = scale;
+
+            this.__LZmovieClipRef._xscale = 100 * scale;
+        }
+
+        var evt1 = this.onunstretchedwidth;
+        if (evt1 != null)
+            evt1.sendEvent( newsize );
     }

     if ( this.masked ){
         // If the view does not stretch, we have to resize the mask
-        if ( !this[ '_setresc' + axis ] ){
-            this.__LZmaskClip[ sc ] = newsize;
-        }
-
-    }
-    if ( !this[ 'hasset' + axis ] ){
-        this[ axis ] = newsize;
-        this[ "on" + axis ].sendEvent( newsize );
-
-        this.immediateparent[ "__LZcheck" + axis ]( this );
-
-        this.__LZbgRef[ sc ] = newsize;
-    }
-
-    this.setButtonSize( axis, newsize );
+        if ( !this._setrescwidth ){
+            this.__LZmaskClip._xscale = newsize;
+        }
+
+    }
+    if ( !this.hassetwidth ){
+        this.width = newsize;
+        var evt2 = this.onwidth;
+        if (evt2 != null)
+            evt2.sendEvent( newsize );
+
+        this.immediateparent.__LZcheckwidth( this );
+
+        this.__LZbgRef._xscale = newsize;
+    }
+
+    this.setButtonSize( "width", newsize );
+}
+
+//-----------------------------------------------------------------------------
+// @keywords private
+//-----------------------------------------------------------------------------
+LzView.prototype.updateHeight = function ( newsize ){
+    if ( this._setrescheight ){
+        this.unstretchedheight = newsize;
+
+        if ( this.hassetheight ){
+            var scale = this.height / newsize;
+            this._yscale = scale;
+
+            this.__LZmovieClipRef._yscale = 100 * scale;
+        }
+
+        var evt1 = this.onunstretchedheight;
+        if (evt1 != null)
+            evt1.sendEvent( newsize );
+    }
+
+    if ( this.masked ){
+        // If the view does not stretch, we have to resize the mask
+        if ( !this._setrescheight ){
+            this.__LZmaskClip._yscale = newsize;
+        }
+
+    }
+    if ( !this.hassetheight ){
+        this.height = newsize;
+        var evt2 = this.onheight;
+        if (evt2 != null)
+            evt2.sendEvent( newsize );
+
+        this.immediateparent.__LZcheckheight( this );
+
+        this.__LZbgRef._yscale = newsize;
+    }
+
+    this.setButtonSize( "height", newsize );
 }

 //-----------------------------------------------------------------------------
@@ -1501,7 +1557,10 @@
     }

     if ( o != w ){
-        this.updateSize( axis ,  w );
+        if (axis == "width")
+            this.updateWidth(w);
+        else
+            this.updateHeight(w);
     }
 }


Jesus Christ, what is the point of all these typed variables and casting
if the compiler DOESN'T FUCKING CARE?

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

--- src/as/com/threerings/presents/client/ClientDObjectMgr.as
+++ src/as/com/threerings/presents/client/ClientDObjectMgr.as
@@ -252,7 +252,7 @@

         // look up the object on which we're dispatching this event
         var toid :int = event.getTargetOid();
-        var target :DObject = (_ocache.get(toid) as DEvent);
+        var target :DObject = (_ocache.get(toid) as DObject);
         if (target == null) {
             if (_dead.get(toid) == null) {
                 Log.warning("Unable to dispatch event on non-proxied " +


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

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

 package mx.controls
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19003
Author:   mhorn@adobe.com
Date:     2010-12-03T14:58:24.046575Z

Log Message:
-----------
ASDoc updates

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/resources/IResourceManager.as

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

--- frameworks/projects/framework/src/mx/resources/IResourceManager.as
+++ frameworks/projects/framework/src/mx/resources/IResourceManager.as
@@ -242,21 +242,21 @@
      *  @param resourceBundle The resource bundle to be added.
      *  @param useWeakReference Determines if the ResourceManager
      *  keeps a weak reference to the resource bundle.
-     *  If useWeakReference is true then the ResourceManager will
-     *  provide a weak reference to the resource bundle. When the
+     *  If useWeakReference is true then the ResourceManager
+     *  provides a weak reference to the resource bundle. When the
      *  caller chooses to use a weak reference it becomes the
      *  caller's responsibility to keep a hard reference the resource bundle
-     *  so it is not garbaged collected prematurely. If useWeakReference is
-     *  false the ResourceManager will keep a hard reference to the resource
+     *  so it is not garbaged collected prematurely. If useWeakReference is
+     *  false, the ResourceManager keeps a hard reference to the resource
      *  bundle so it will not be garbage collected.
      *
-     *  When a Flex sub-application or module automatically adds its compiled
-     *  resource bundles to the ResourceManager, it calls addResourceBundle()
-     *  with useWeakReference set to true, to avoid becoming pinned in memory.
+     *
When a Flex sub-application or module automatically adds its compiled
+     *  resource bundles to the ResourceManager, it calls the addResourceBundle()
+     *  with useWeakReference set to true, to avoid becoming pinned in memory.
      *  If you create resource bundles at runtime in a sub-application or
      *  module, you should do the same. You then need to hold on to these
      *  resource bundles with a hard reference to prevent them from being
-     *  garbage-collected.
+     *  garbage collected.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -754,8 +754,31 @@
                       locale:String = null):Class;

     /**
-     *  Used only by classes which implement IFlexModuleFactory.
-     *
+    *  Creates instances of all ResourceBundle subclasses that were compiled into the SWF
+    *  and adds them to the ResourceManager.
+    *
+    *
For example, if the locales parameter is [ "en_US", "ja_JP" ]
+    *  and the bundleNames parameter is [ "core", "controls" ],
+    *  then four resource bundles will be installed.

+    *
+    *
This method is used only by classes that implement the IFlexModuleFactory interface.

+    *
+    *  @param applicationDomain  The ApplicationDomain that is used to look up the resource bundle
+    *  classes by name.
+    *
+    *  @param locales An Array of Strings that specify the locales for which the SWF was compiled.
+    *
+    *  @param bundleNames An Array of Strings that specify the names of the resource bundles
+    *  that were compiled into the SWF.
+    *
+    *  @param useWeakReference A flag that specifyies whether the resource bundles should be
+    *  intalled into the ResourceManager using a weak reference.
+    *
+    *  @return An Array of the ResourceBundle instances that were created
+    *  and added to the ResourceManager.
+     *
+     * @see mx.core.IFlexModuleFactory
+     *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
@@ -767,14 +790,28 @@
                                 bundleNames:Array /* of String */,
                                 useWeakReference:Boolean = false):Array;

-	/**
-	 *  Used only by classes which implement IFlexModuleFactory.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 3
-	 */
+    /**
+    *  Initializes the localeChain property of the ResourceManager
+    *  using an algorithm that compares the operating system's list of user-preferred
+    *  locales with the list of locales available in the SWF.
+    *
+    *
For example, if the user has indicated in the operating system that she
+    *  prefers French, and the SWF was compiled for the locales en_US, fr_FR, and de_DE,
+    *  then the localeChain will be set so that the first locale in it
+    *  is fr_FR.

+    *
+    *
This method is used only by classes that implement the IFlexModuleFactory interface.

+    *
+    *  @param  compiledLocales An Array of Strings specifying the locales
+    *  for which the SWF was compiled.
+    *
+     * @see mx.core.IFlexModuleFactory
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
     function initializeLocaleChain(compiledLocales:Array):void;
 }


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

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


Transferred from the Adobe Open Source Subversion Repository

Revision: 6637
Author:   cframpto@adobe.com
Date:     2009-05-05T13:30:10.480422Z

Log Message:
-----------
Implement proxy model from SkinnableDataGroup in TextBase.  When the textView part is loaded, store all the properties in the textView.  When the textView part is unloaded, store them back in TextBase.  This eliminates the duplicate set of properties that were getting out of sync.  Text is the one exception to this since we only want to extract the text from the textFlow when it is absolutely necessary.

Fix misnamed tlf internal variable so pasting text with restrict, maxChars or displayAsPassword properties doesn't RTE.

QE Notes: all TextArea and TextInput tests pass except
Gumbo_TextInput_widthInChars_property_negative (passed in my test case so I need help from QA with this one)
Gumbo_TextInput_textView_widthInChars_5 (text needs to be revised since expected answer should be 5)
Gumbo_TextInput_textView_widthInChars_25 (test needs to be revised since expected answer should be 25)

Doc Notes:
Bugs: SDK-19980
Reviewers: Gordon

Modified Paths:
--------------
<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/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/TextInput.as</path>

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

--- frameworks/projects/spark/src/spark/components/RichEditableText.as
+++ frameworks/projects/spark/src/spark/components/RichEditableText.as
@@ -782,7 +782,7 @@
     /**
      *  @private
      *  The default is true.
-     *  TODO! The default should be true.
+     *  TODO! The default should be true but the code needs to be fixed first.
      */
     private var _autoSize:Boolean = false;

@@ -1656,7 +1656,7 @@

         // If autoSize, the text flow is already composed (although there are
         // certain styles that require a recompose since the composition width
-        // and height matter).  Setting the composition size since it will
+        // and height matter).  Setting the composition size will
         // trigger a damage event.
         if (!_autoSize || recomposeForStyles())
         {
@@ -1917,7 +1917,20 @@
      */
     private function getSelectionManager():ISelectionManager
     {
-    	return SelectionManager(_inputManager.beginInteraction());
+        // This triggers a damage event if the interactionManager is
+        // changed.  Since changing the interactionManager doesn't change
+        // the text, there is no need to trigger the damage event.
+
+        _inputManager.removeEventListener(
+            DamageEvent.DAMAGE, inputManager_damageHandler);
+
+    	var selectionManager:SelectionManager =
+    	   SelectionManager(_inputManager.beginInteraction());
+
+        _inputManager.addEventListener(
+            DamageEvent.DAMAGE, inputManager_damageHandler);
+
+        return selectionManager;
     }

     /**
@@ -1934,7 +1947,10 @@
      */
     private function getEditManager():IEditManager
     {
-    	return EditManager(_inputManager.beginInteraction());
+        // This triggers a damage event if the interactionManager is
+        // changed.
+
+        return EditManager(_inputManager.beginInteraction());
     }

     /**
@@ -2392,7 +2408,7 @@

         selectionManager.setSelection(anchorPosition, activePosition);

-        // Update the display with the new selection.
+        // Refresh the selection.  This does not cause a damage event.
         selectionManager.refreshSelection();

         releaseSelectionManager();
@@ -2423,11 +2439,12 @@

         // If no selection, then it's an append.
          if (!editManager.hasSelection())
-            editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+            editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+
+        // Our damage handler should be active.  Inserting the text invokes
+        // our damage handler to invalidate the text, maybe the size, and
+        // the display list.
         editManager.insertText(text);
-
-        // Update TLF display.  This initiates the InsertTextOperation.
-        _inputManager.updateContainer();

         // All done with edit manager.
         releaseEditManager();
@@ -2461,10 +2478,11 @@

         // An append is an insert with the selection set to the end.
         editManager.setSelection(int.MAX_VALUE, int.MAX_VALUE);
+
+        // Our damage handler should be active.  Inserting the text invokes
+        // our damage handler to invalidate the text, maybe the size, and
+        // the display list.
         editManager.insertText(text);
-
-        // Update TLF display.  This initiates the InsertTextOperation.
-        _inputManager.updateContainer();

         // All done with edit manager.
         releaseEditManager();
@@ -2677,8 +2695,11 @@
             return;

         var textScrap:TextScrap = op.scrapToPaste();
+
+        // If copied/cut from displayAsPassword field the pastedText
+        // is '*' characters but this is correct.
         var pastedText:String = TextUtil.extractText(
-            tlf_internal::textScrap.textFlow);
+            textScrap.tlf_internal::textFlow);

         // We know it's an EditManager or we wouldn't have gotten here.
         var editManager:IEditManager = getEditManager();


Transferred from the Adobe Open Source Subversion Repository

Revision: 23167
Author:   chiedozi@adobe.com
Date:     2011-11-01T17:05:36.732777Z

Log Message:
-----------
Fixed an issue where child ViewNavigators in a TabbedViewNavigator were improperly initialized if the navigators property was used
Fixed a typo in ViewNavigator

QE notes:
Doc notes:
Bugs: SDK-31987
Reviewer: Evtim
Tests run: mustella-mobile, checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
+++ frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as
@@ -400,7 +400,10 @@
         var contentArray:Array = new Array();

         for each (var navigator:ViewNavigatorBase in value)
+        {
             contentArray.push(navigator);
+            setupNavigator(navigator);
+        }

         mxmlContent = contentArray;


improved performance of KeyFilter by caching values

Change-Id: I84a1036a193ffecf5b4985ab6ca4ba7c80087536

--- WeaveData/src/weave/data/KeySets/KeyFilter.as
+++ WeaveData/src/weave/data/KeySets/KeyFilter.as
@@ -39,17 +39,28 @@
 		public function KeyFilter()
 		{
 			includeMissingKeys.value = false;
-			includeMissingKeyTypes.value = true;
+			includeMissingKeyTypes.value = true;
+			filters.childListCallbacks.addImmediateCallback(this, cacheValues);
 		}

 		// option to include missing keys or not
-		public const includeMissingKeys:LinkableBoolean = newLinkableChild(this, LinkableBoolean);
-		public const includeMissingKeyTypes:LinkableBoolean = newLinkableChild(this, LinkableBoolean);
+		public const includeMissingKeys:LinkableBoolean = newLinkableChild(this, LinkableBoolean, cacheValues);
+		public const includeMissingKeyTypes:LinkableBoolean = newLinkableChild(this, LinkableBoolean, cacheValues);

 		public const included:KeySet = newLinkableChild(this, KeySet, handleIncludeChange);
 		public const excluded:KeySet = newLinkableChild(this, KeySet, handleExcludeChange);

 		public const filters:ILinkableHashMap = registerLinkableChild(this, new LinkableHashMap(IKeyFilter));
+
+		private var _includeMissingKeys:Boolean;
+		private var _includeMissingKeyTypes:Boolean;
+		private var _filters:Array;
+		private function cacheValues():void
+		{
+			_includeMissingKeys = includeMissingKeys.value;
+			_includeMissingKeyTypes = includeMissingKeyTypes.value;
+			_filters = filters.getObjects();
+		}

 		/**
 		 * This replaces the included and excluded keys in the filter with the parameters specified.
@@ -117,15 +128,15 @@
 		 */
 		public function containsKey(key:IQualifiedKey):Boolean
 		{
-			for each (var filter:IKeyFilter in filters.getObjects())
+			for each (var filter:IKeyFilter in _filters)
 				if (!filter.containsKey(key))
 					return false;

-			if (includeMissingKeys.value || (includeMissingKeyTypes.value && !_includedKeyTypeMap[key.keyType]))
+			if (_includeMissingKeys || (_includeMissingKeyTypes && !_includedKeyTypeMap[key.keyType]))
 			{
 				if (excluded.containsKey(key))
 					return false;
-				if (!includeMissingKeyTypes.value && _excludedKeyTypeMap[key.keyType])
+				if (!_includeMissingKeyTypes && _excludedKeyTypeMap[key.keyType])
 					return false;
 				return true;
 			}
@@ -134,7 +145,7 @@
 				if (included.containsKey(key))
 					return true;
 				// if includeMissingKeyTypes and keyType is missing
-				if (includeMissingKeyTypes.value && !_includedKeyTypeMap[key.keyType] && !_excludedKeyTypeMap[key.keyType])
+				if (_includeMissingKeyTypes && !_includedKeyTypeMap[key.keyType] && !_excludedKeyTypeMap[key.keyType])
 					return true;
 				return false;
 			}


changed MAX_SEG_BUFFER default value to 2

make sure liveEdge will be 3 segments by default (HLSIndexhHandler ->
get liveEdge adds 1 to the default MAX_SEG_BUFFER value)

--- HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
+++ HLSPlugin/src/com/kaltura/hls/manifest/HLSManifestParser.as
@@ -53,7 +53,7 @@
 		 * until 10 seconds have passed and another segment becomes available.
 		 * Please take this into account when setting these values.
 		 */
-		public static var MAX_SEG_BUFFER:int = 4;
+		public static var MAX_SEG_BUFFER:int = 2;

 		/**
 		 * This overrides the value of the EXT-X-TARGETDURATION from any manifest we encounter.