Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

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

--- frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as
+++ frameworks/projects/spark/src/spark/styles/metadata/BasicInheritingTextStyles.as
@@ -11,191 +11,381 @@

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#alignmentBaseline
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="alignmentBaseline", type="String", enumeration="useDominantBaseline,roman,ascent,descent,ideographicTop,ideographicCenter,ideographicBottom", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#baselineShift
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="baselineShift", type="Object", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#breakOpportunity
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="breakOpportunity", type="String", enumeration="auto,all,any,none", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#cffHinting
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="cffHinting", type="String", enumeration="horizontalStem,none", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#color
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="color", type="uint", format="Color", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#digitCase
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="digitCase", type="String", enumeration="default,lining,oldStyle", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#digitWidth
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="digitWidth", type="String", enumeration="default,proportional,tabular", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#direction
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="direction", type="String", enumeration="ltr,rtl", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#dominantBaseline
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="dominantBaseline", type="String", enumeration="auto,roman,ascent,descent,ideographicTop,ideographicCenter,ideographicBottom", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontFamily
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="fontFamily", type="String", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontLookup
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="fontLookup", type="String", enumeration="device,embeddedCFF", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontSize
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="fontSize", type="Number", format="Length", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontStyle
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="fontStyle", type="String", enumeration="normal,italic", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#fontWeight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="fontWeight", type="String", enumeration="normal,bold", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#justificationRule
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="justificationRule", type="String", enumeration="auto,space,eastAsian", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#justificationStyle
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="justificationStyle", type="String", enumeration="auto,prioritizeLeastAdjustment,pushInKinsoku,pushOutOnly", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#kerning
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="kerning", type="String", enumeration="on,off,auto", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#ligatureLevel
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="ligatureLevel", type="String", enumeration="common,uncommon,exotic,minimum", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineBreak
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="lineBreak", type="String", enumeration="toFit,explicit", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineHeight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="lineHeight", type="Object", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#lineThrough
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="lineThrough", type="Boolean", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#locale
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="locale", type="String", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingBottom
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="paddingBottom", type="Number", format="Length", inherit="no")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingLeft
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="paddingLeft", type="Number", format="Length", inherit="no")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingRight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="paddingRight", type="Number", format="Length", inherit="no")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#paddingTop
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="paddingTop", type="Number", format="Length", inherit="no")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#renderingMode
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="renderingMode", type="String", enumeration="cff,normal", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlign
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textAlign", type="String", enumeration="start,end,left,right,center,justify", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlignLast
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textAlignLast", type="String", enumeration="start,end,left,right,center,justify", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textAlpha
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textAlpha", type="Number", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textDecoration
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textDecoration", type="String", enumeration="none,underline", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textJustify
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textJustify", type="String", enumeration="interWord,distribute", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#textRotation
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="textRotation", type="String", enumeration="auto,rotate0,rotate90,rotate180,rotate270", inherit="yes")]

 /**
  *  Space added to the advance after each character, as a percentage of the current point size. Percentages can be negative,
  *  to bring characters closer together. The default value is 0.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="tracking", type="Object", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#trackingLeft
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="trackingLeft", type="Object", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#trackingRight
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="trackingRight", type="Object", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#typographicCase
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="typographicCase", type="String", enumeration="default,title,caps,smallCaps,uppercase,lowercase,capsAndSmallCaps", inherit="yes")]

 /**
  *  @copy flashx.textLayout.formats.ITextLayoutFormat#verticalAlign
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10
+ *  @playerversion AIR 1.5
+ *  @productversion Flex 4
  */
 [Style(name="verticalAlign", type="String", enumeration="top,middle,bottom,justify", inherit="no")]


Change 20070809-maxcarlson-5 by maxcarlson@plastik on 2007-08-09 20:53:23 PDT
    in /Users/maxcarlson/openlaszlo/trunk
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix SOLO media loading to be consistent with data

New Features:

Bugs Fixed: LPP-4462 - When running a SOLO SWF in an HTML file located in a different directory than the SWF, data requests are made relative to SWF, not HTML file

Technical Reviewer: hminsky
QA Reviewer: promanik
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:  This change won't affect any of the default wrappers, because all the generated wrappers load the main SWF from the same path as the HTML.

Tests: See LPP-4462.  Change loadtest.lzx to use consistent URLS for the media and data loads

    <handler name="oninit">
        img.setSource("img.jpg");
        dsTestData.setSrc("testdata.xml");
        dsTestData.doRequest();
    </handler>

recompile the SOLO file (http://localhost:8080/trunk/my-apps/kathrynloadtest/loadtest/loadtest.lzx?lzproxied=false) then run the html wrapper (http://localhost:8080/trunk/my-apps/kathrynloadtest/loadtest.html).  Notice that the media and data load from a consistent path.  Running in the dev console with proxied on and off works as well.

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

--- WEB-INF/lps/lfc/services/LzLoadQueue.as
+++ WEB-INF/lps/lfc/services/LzLoadQueue.as
@@ -323,7 +323,7 @@
 LzLoadQueue.loadMovieProxiedOrDirect = function (loadobj) {
     var reqstr;
     if ( !loadobj.proxied ) {
-        reqstr = loadobj.reqobj.url;
+        reqstr = _root.LzBrowser.toAbsoluteURL(loadobj.reqobj.url, false);
     } else {

         delete loadobj.proxied;


Transferred from the Adobe Open Source Subversion Repository

Revision: 12966
Author:   dloverin@adobe.com
Date:     2009-12-15T18:59:54.493877Z

Log Message:
-----------
Fix sub-applications loading RSLs into the wrong application domain.

projects/framework/src/mx/controls/SWFLoader.as
Fix loading sub-applications as well. Load sub-applications into a child application domain of their parent.

projects/framework/src/mx/core/CrossDomainRSLItem.as
projects/framework/src/mx/core/FlexModuleFactory.as
projects/framework/src/mx/core/RSLItem.as
projects/framework/src/mx/managers/SystemManager.as
    Pass a module factory from SystemManager and FlexModuleFactory to CrossDomainRSLItem/RSLItem. Use the moduleFactory to find the application domain of the app/modules loading the RSLs. Use this application domain to load RSLs into.

projects/framework/src/mx/modules/ModuleLoader.as
    “currentDomain” is never null so remove null check.

projects/airframework/src/mx/managers/WindowedSystemManager.as
    Added a info().currentDomain object to WindowedSystemManager.

QE notes: None.
Doc notes: None.
Bugs: SDK-24698
Reviewer: Alex
Tests run: checkintests, MarshallPlan, Modules
Is noteworthy for integration: no

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/FlexModuleFactory.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/modules/ModuleLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/RSLItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/CrossDomainRSLItem.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -1131,7 +1131,9 @@
      */
     public function info():Object
     {
-        return {};
+        return {
+            currentDomain: ApplicationDomain.currentDomain
+        };
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 18195
Author:   doug.lee@ssbbartgroup.com
Date:     2010-10-18T17:36:36.597920Z

Log Message:
-----------
AccImpl and UIComponentAccProps updates to support Spark Form and form-related components.
Summary of changes:
	- The ASDoc description of how fields in a Form are named is updated to match the code, in that FormHeading text is only included in field names for fields inside a FormItem at this time.
	- Field naming rules applied to Spark components similarly as to MX components.
	- FormItem elements that are incorporated into the field name are not given MSAA objects of their own, to avoid redundancy.
	- tabIndex on FormHeading Label fixed to equal FormHeading tabIndex, so assistive technology can properly position the header among elements (this also affects MX FormHeadings).
	- AccImpl.updateFormItemString() renamed to determineFormItemString() to better reflect its purpose.
	- Some code is better commented.
	- Some spacing corrections.

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

Modified Paths:
--------------
<path kind="dir" action="M">/private/flex/sdk/branches/hero_private</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/accessibility/AccImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as</path>

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

--- frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as
+++ frameworks/projects/framework/src/mx/accessibility/UIComponentAccProps.as
@@ -44,13 +44,13 @@
     //--------------------------------------------------------------------------

     /**
-	 *  Enables accessibility in the UIComponent class.
-	 *
-	 *
This method is called by application startup code
-	 *  that is autogenerated by the MXML compiler.
-	 *  Afterwards, when instances of UIComponent are initialized,
-	 *  their accessibilityProperties property
-	 *  will be set to an instance of this class.

+     *  Enables accessibility in the UIComponent class.
+     *
+     *
This method is called by application startup code
+     *  that is autogenerated by the MXML compiler.
+     *  Afterwards, when instances of UIComponent are initialized,
+     *  their accessibilityProperties property
+     *  will be set to an instance of this class.

      *
      *  @langversion 3.0
      *  @playerversion Flash 9
@@ -65,9 +65,9 @@

     /**
      *  @private
-	 *  Creates a UIComponent's AccessibilityProperties object.
-	 *  This method is called from UIComponent's
-	 *  initializeAccessibility() method.
+     *  Creates a UIComponent's AccessibilityProperties object.
+     *  This method is called from UIComponent's
+     *  initializeAccessibility() method.
      */
     mx_internal static function createAccessibilityImplementation(
                                             component:UIComponent):void
@@ -76,6 +76,68 @@
             new UIComponentAccProps(component);
     }

+    /**
+     *  @private
+     *  Determines whether a component should avoid producing MSAA information
+     *  directly.  Components that are represented otherwise, such as
+     *  a form field's Required Field indicator (which causes "Required field"
+     *  to be included in the field's accessible name) should be made silent
+     *  in this way.
+     *
+     *  @param component The component to check.
+     *
+     *  @return true if this component should be silent.
+     */
+    mx_internal static function componentShouldBeSilent(component:UIComponent):Boolean
+    {
+        // All tests below require Group to exist and to be under a FormItem.
+        var groupClass:Class = Class(AccImpl.getDefinition(
+            "spark.components.Group", component.moduleFactory
+        ));
+        if (!groupClass)
+            return false;
+        var formItem:UIComponent = AccImpl.findMatchingAncestor(component, AccImpl.isFormItem);
+        if (!formItem)
+            return false;
+
+        // This catches labels for FormItem fields,
+        // and also one object related to the Required Field indicator.
+        // TODO:  We might want to silence all Group components under a FormItem,
+        // but this theory remains to be tested and so is not implemented here.
+        // component.parent should be a FormItem skin (possibly a custom one),
+        // so the parent of that should be the FormItem.
+        // The try/catch block prevents an RTE if
+        // component.parent.parent doesn't exist.
+        try
+        {
+            if (component is groupClass
+            && component.parent.parent === formItem)
+                return true;
+        }
+        catch (e:Error)
+        {
+        }
+
+        // This catches the Required Field graphic itself.
+        // Sought structure: Image in Group in skin in FormItem.
+        var imageClass:Class = Class(AccImpl.getDefinition(
+            "spark.components.Image", component.moduleFactory
+        ));
+        if (!imageClass)
+            return false;
+        try
+        {
+        if (component is imageClass && component.parent is groupClass
+        && component.parent.parent.parent === formItem)
+            return true;
+        }
+        catch (e:Error)
+        {
+        }
+
+        return false;
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Constructor
@@ -117,42 +179,94 @@
                 shortcut = component.accessibilityProperties.shortcut;
         }

-        var scrollBarClass:Class = Class(AccImpl.getDefinition("mx.controls.scrollClasses.ScrollBar", master.moduleFactory));
-        if (scrollBarClass && master is scrollBarClass)
+        if (AccImpl.getMatchingDefinition(master,
+            AccImpl.getDefinitions("ScrollBar", master.moduleFactory)
+        ))
         {
             silent = true;
             return;
         }

-        var formItemLabelClass:Class = Class(AccImpl.getDefinition("mx.controls.FormItemLabel", master.moduleFactory));
-        if (formItemLabelClass && master is formItemLabelClass)
-        {
+        if (isFormItemLabel(master))
+        {
+            // TODO:  Why is name set here?  Is this name used somewhere?
             name = AccImpl.getFormName(master);
             silent = true;
-        }
-        else
-        {
-            var formName:String = AccImpl.getFormName(master);
-
-            if (formName && formName.length != 0)
-                name = formName + name;
-
-            if (master.toolTip && master.toolTip.length != 0)
-                if (!component.accessibilityProperties || (component.accessibilityProperties && !component.accessibilityProperties.name))
+            return;
+        }
+
+        // Silence various subparts of Spark forms besides FormItem labels.
+        if (componentShouldBeSilent(component))
+        {
+            // We can't set silent=true or whole FormItems and their fields
+            // will disappear from MSAA, but if we set name="", the Player
+            // will filter out these items for us.
+            name = "";
+            return;
+        }
+
+        // In complex layouts, the text of a FormHeading might not appear
+        // where it should for assistive technology, because the FormHeading's
+        // tabIndex does not also get applied to the text item.
+        // That is fixed here when the FormHeading is being constructed.
+        if (AccImpl.isFormHeading(master) && master.tabIndex > 0)
+        {
+            // Spark-specific solution.
+            try
             {
-                oldToolTip = " " + master.toolTip;
-                name += oldToolTip;
+                if (Object(master).labelDisplay.tabIndex == -1)
+                    Object(master).labelDisplay.tabIndex = master.tabIndex;
             }
-
-            if (master.errorString && master.errorString.length != 0)
+            catch (e:Error)
             {
-                oldErrorString = " " + master.errorString;
-                name += oldErrorString;
             }
-
-            master.addEventListener("toolTipChanged", eventHandler);
-            master.addEventListener("errorStringChanged", eventHandler);
-        }
+            // TODO:  Not solved for MX even though the problem does apply there.
+        }
+
+        var formName:String = AccImpl.getFormName(master);
+        if (formName && formName.length != 0)
+            name = formName + name;
+
+        if (master.toolTip && master.toolTip.length != 0)
+            if (!component.accessibilityProperties || (component.accessibilityProperties && !component.accessibilityProperties.name))
+        {
+            oldToolTip = " " + master.toolTip;
+            name += oldToolTip;
+        }
+
+        if (master.errorString && master.errorString.length != 0)
+        {
+            oldErrorString = " " + master.errorString;
+            name += oldErrorString;
+        }
+
+        master.addEventListener("toolTipChanged", eventHandler);
+        master.addEventListener("errorStringChanged", eventHandler);
+    }
+
+    /**
+     *  @private
+     *  Determines whether a component is a formItem label (Spark or MX).
+     *
+     *  @param component The component to check.
+     *
+     *  @return true if this is a label for a formItem.
+     */
+    protected function isFormItemLabel(component:UIComponent):Boolean
+    {
+        // This handles Spark labels on forms.
+        var thisName:String = master.name;
+        if (thisName == "labelDisplay"
+            || thisName == "sequenceLabelDisplay"
+            || thisName == "helpContentGroup"
+            || thisName == "errorTextDisplay"
+        )
+            return true;
+
+        // This handles MX FormItemLabel objects.
+        return Boolean(AccImpl.getMatchingDefinition(master,
+            AccImpl.getDefinitions("FormItemLabel", master.moduleFactory)
+        ));
     }

     //--------------------------------------------------------------------------
@@ -236,7 +350,7 @@
                 }

                 Accessibility.updateProperties();
-				break;
+                break;
             }

             case "toolTipChanged":
@@ -265,7 +379,7 @@
                 }

                 Accessibility.updateProperties();
-				break;
+                break;
             }
         }
     }


Transferred from the Adobe Open Source Subversion Repository

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

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

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

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -0,0 +1,432 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2008 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package flex.component
+{
+
+import flex.events.FlexEvent;
+import flex.events.ItemExistenceChangedEvent;
+
+import mx.events.IndexChangedEvent;
+
+/**
+ *  Dispatched when the selection is going to change. Calling preventDefault()
+ *  on the event will prevent the selection from changing.
+ */
+[Event(name="selectionChanging", type="mx.events.IndexChangedEvent")]
+
+/**
+ *  Dispatched after the selection has changed.
+ */
+[Event(name="selectionChanged", type="mx.events.IndexChangedEvent")]
+
+/**
+ *  The Selector class is the base class for all components that support
+ *  selection.
+ */
+public class Selector extends ItemsComponent
+{
+    include "../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constants
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Constant representing the value "no selection".
+     */
+    protected static const NO_SELECTION:int = -1;
+
+    /**
+     *  @private
+     *  Constant representing no proposed selection.
+     */
+    protected static const NO_PROPOSED_SELECTION:int = -2;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function Selector()
+    {
+    	addEventListener(FlexEvent.CONTENT_CHANGING, contentChangingHandler);
+    	addEventListener(FlexEvent.CONTENT_CHANGED, contentChangedHandler);
+		addEventListener(ItemExistenceChangedEvent.ITEM_ADD, itemAddedHandler);
+		addEventListener(ItemExistenceChangedEvent.ITEM_REMOVE, itemRemovedHandler);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var doingWholesaleChanges:Boolean = false;
+
+	//----------------------------------
+	//  selectedIndex
+	//----------------------------------
+
+	/**
+	 *  @private
+	 *  The proposed selected index. This is a temporary variable that is
+	 *  used until the selected index is committed.
+	 */
+	private var _proposedSelectedIndex:int = NO_PROPOSED_SELECTION;
+
+	/**
+	 *  @private
+	 *  Flag that is set when the selectedIndex has been adjusted due to
+	 *  items being added or removed. When this flag is true, the value
+	 *  of the selectedIndex has changed, but the actual selected item
+	 *  is the same. This flag is cleared in commitProperties().
+	 */
+	private var selectedIndexAdjusted:Boolean = false;
+
+	/**
+	 *  @private
+	 *  Internal storage for the selectedIndex property.
+	 */
+	private var _selectedIndex:int = NO_SELECTION;
+
+   /**
+     *  The 0-based index of the selected item, or -1 if no item is selected.
+     *  Setting the selectedIndex property de-selects the currently selected
+     *  item and selects the item at the specified index.
+     *
+     *  The value of selectedIndex is always pinned between -1 and
+     *  (numItems - 1). If items at a lower index than selectedIndex are
+     *  removed from the component, the selected index is adjusted downward
+     *  accordingly. If the selected item is removed, selected index is
+     *  set to -1 (if requireSelection = false or there are no remaining items)
+     *  or 0 (if requireSelection = true and there is at least one item).
+     *
+     *  @default -1
+     */
+    [Bindable("selectionChanged")]
+    public function get selectedIndex():int
+    {
+    	if (_proposedSelectedIndex != NO_PROPOSED_SELECTION)
+    		return _proposedSelectedIndex;
+
+    	return _selectedIndex;
+    }
+
+    public function set selectedIndex(value:int):void
+    {
+    	if (value == selectedIndex)
+    		return;
+
+		_proposedSelectedIndex = value;
+		invalidateProperties();
+    }
+
+    //----------------------------------
+    //  selectedItem
+    //----------------------------------
+
+   /**
+     *  The item that is currently selected. Setting the selectedItem property
+     *  de-selects the currently selected item and selects the specified item.
+     *
+     *  Setting selectedItem to an item that is not in this component results in
+     *  no selection, and selectedItem being set to undefined. If the selected
+     *  item is removed, the selected item is set to undefined (if requireSelection
+     *  = false or there are no remaining items) or the first item (if
+     *  requireSelection = true and there is at least one item).
+     *
+     *  @default undefined
+     */
+    [Bindable("selectionChanged")]
+    public function get selectedItem():*
+    {
+        return getItemAt(selectedIndex);
+    }
+
+    public function set selectedItem(value:*):void
+    {
+        selectedIndex = getItemIndex(value);
+    }
+
+    //----------------------------------
+    //  requiresSelection
+    //----------------------------------
+
+    /**
+     *  @private
+     *  Storage for the requiresSelection property.
+     */
+    private var _requiresSelection:Boolean = false;
+
+    /**
+     *  @private
+     *  Flag that is set when requiresSelection has changed.
+     */
+    private var requiresSelectionChanged:Boolean = false;
+
+    /**
+     *  Specifies whether an item must always be selected.
+     *  If the value is true, the selectedIndex property will always be
+     *  set to a value between 0 and (numItems - 1), or -1 if there are
+     *  no items.
+     *
+     *  @default false
+     */
+    [Bindable]
+    public function get requiresSelection():Boolean
+    {
+        return _requiresSelection;
+    }
+
+    public function set requiresSelection(value:Boolean):void
+    {
+        if (value == _requiresSelection)
+        	return;
+
+        _requiresSelection = value;
+
+        // We only need to update if the value is changing
+        // from false to true
+        if (value == true)
+        {
+            requiresSelectionChanged = true;
+            invalidateProperties();
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+    	var changedSelection:Boolean = false;
+
+        super.commitProperties();
+
+        if (requiresSelectionChanged)
+        {
+            requiresSelectionChanged = false;
+
+            if (requiresSelection &&
+                    selectedIndex == NO_SELECTION &&
+                    numItems > 0)
+            {
+            	// Set the proposed selected index here to make sure
+            	// commitSelectedIndex() is called below.
+                _proposedSelectedIndex = 0;
+            }
+        }
+
+        if (_proposedSelectedIndex != NO_PROPOSED_SELECTION)
+            changedSelection = commitSelectedIndex();
+
+        // If the selectedIndex has been adjusted to account for items that
+        // have been added or removed, send out a "selectionChanged" event so
+        // any bindings to selectedIndex are updated correctly.
+        if (selectedIndexAdjusted)
+        {
+            selectedIndexAdjusted = false;
+            if (!changedSelection)
+            {
+	            var e:IndexChangedEvent = new IndexChangedEvent("selectionChanged");
+	            e.oldIndex = selectedIndex;
+	            e.newIndex = selectedIndex;
+	            dispatchEvent(e);
+            }
+        }
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Called when an item is selected or de-selected. Subclasses must override
+     *  this method to display the selection.
+     */
+    protected function itemSelected(item:Object, selected:Boolean):void
+    {
+        // Subclasses must override this method to display the selection.
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Private Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Called to commit the pending selected index. This method dispatches
+     *  the "selectionChanging" event, and if the event is not cancelled,
+     *  commits the selection change and then dispatches the "selectionChanged"
+     *  event.
+     *
+     *  Returns true if the selection was committed, or false if the selection
+     *  was cancelled.
+     */
+    private function commitSelectedIndex():Boolean
+    {
+        // Step 1: make sure the proposed selected index is in range.
+        var maxIndex:int = numItems - 1;
+        var oldIndex:int = _selectedIndex;
+
+        if (_proposedSelectedIndex < NO_SELECTION)
+            _proposedSelectedIndex = NO_SELECTION;
+        if (_proposedSelectedIndex > maxIndex)
+            _proposedSelectedIndex = maxIndex;
+        if (requiresSelection && _proposedSelectedIndex == NO_SELECTION && numItems > 0)
+            return false;
+
+        // Step 2: dispatch the "selectionChanging" event. If preventDefault() is called
+        // on this event, the selection change will be cancelled.
+        var e:IndexChangedEvent = new IndexChangedEvent("selectionChanging", false, true);
+        e.oldIndex = _selectedIndex;
+        e.newIndex = _proposedSelectedIndex;
+        if (!dispatchEvent(e))
+        {
+            // The event was cancelled. Cancel the selection change and return.
+            _proposedSelectedIndex = NO_PROPOSED_SELECTION;
+            return false;
+        }
+
+        // Step 3: commit the selection change
+        if (_selectedIndex != NO_SELECTION)
+        	itemSelected(getItemAt(_selectedIndex), false);
+        if (_proposedSelectedIndex != NO_SELECTION)
+        	itemSelected(getItemAt(_proposedSelectedIndex), true);
+        _selectedIndex = _proposedSelectedIndex;
+        _proposedSelectedIndex = NO_PROPOSED_SELECTION;
+
+        // Step 4: dispatch the "selectionChanged" event
+        e = new IndexChangedEvent("selectionChanged");
+        e.oldIndex = oldIndex;
+        e.newIndex = _selectedIndex;
+        dispatchEvent(e);
+
+        return true;
+     }
+
+    /**
+     *  Adjusts the selected index to account for items being added to or
+     *  removed from this component. This method adjusts the selected index
+     *  value and sends a "selectionChanged" event. It does NOT send
+     *  "selectionChanging" or allow the cancellation of the selection. It
+     *  also does not call itemSelected(), since the same item is selected -
+     *  the only thing that has changed is the index of the item.
+     *
+     *  A "selectionChanged" event is sent in the next call to
+     *  commitProperties(). The "selectionChanging" event is not sent when
+     *  the selectedIndex is adjusted.
+     */
+    protected function adjustSelectedIndex(newIndex:int):void
+    {
+        if (_proposedSelectedIndex != NO_PROPOSED_SELECTION)
+            _proposedSelectedIndex = newIndex;
+        else
+            _selectedIndex = newIndex;
+        selectedIndexAdjusted = true;
+        invalidateProperties();
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Event Handlers
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Called when an item has been added to this component.
+     */
+    protected function itemAddedHandler(event:ItemExistenceChangedEvent):void
+    {
+        if (selectedIndex == NO_SELECTION || doingWholesaleChanges)
+            return;
+
+        var itemIndex:int = getItemIndex(event.relatedObject);
+
+        // If an item is added before the selected item, bump up our
+        // selected index backing variable.
+        if (itemIndex <= selectedIndex)
+            adjustSelectedIndex(selectedIndex + 1);
+    }
+
+    /**
+     *  @private
+     *  Called when an item has been removed from this component.
+     */
+    protected function itemRemovedHandler(event:ItemExistenceChangedEvent):void
+    {
+        if (selectedIndex == NO_SELECTION || doingWholesaleChanges)
+            return;
+
+        var itemIndex:int = getItemIndex(event.relatedObject);
+
+        // If the selected item is being removed, clear the selection (or
+        // reset to the first item if requiresSelection is true)
+        if (itemIndex == selectedIndex)
+        {
+            if (requiresSelection && numItems > 0)
+                selectedIndex = 0;
+            else
+                selectedIndex = -1;
+        }
+        else if (itemIndex < selectedIndex)
+        {
+            // An item below the selected index has been removed, bump
+            // the selected index backing variable.
+            adjustSelectedIndex(selectedIndex - 1);
+        }
+    }
+
+    /**
+     *  @private
+     */
+    private function contentChangingHandler(event:FlexEvent):void
+    {
+    	doingWholesaleChanges = true;
+    }
+
+    /**
+     *  @private
+     */
+    private function contentChangedHandler(event:FlexEvent):void
+    {
+    	doingWholesaleChanges = false;
+
+    	if (selectedIndex >= 0 && selectedIndex < numItems)
+    	   itemSelected(getItemAt(selectedIndex), true);
+    	else
+    	   selectedIndex = -1;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 5912
Author:   cframpto@adobe.com
Date:     2009-04-03T19:18:48.131864Z

Log Message:
-----------
-Redo clipping.
-Shared display object containers used if text not being clipped and container is BasicLayout
-SimpleText will recycle text lines if the player supports it (>= Argo)
-SimpleText now supports truncation.  -1 means fill box and truncate if overflow.  0 mean no truncation.  >0 is the number of lines to keep before truncating.

There is one issue with textLines being composed with x=0 and textWidth=-number which isn't reflected in the bounding box for either SimpleText or RichText so the text isn't clipped properly.  (kerning=on and trackingLeft=-10 demonstrates this).

QE Notes:
Doc Notes:
Bugs:
Reviewers: will be Gordon

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/supportClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/primitives/SimpleText.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -19,8 +19,7 @@
 import flash.geom.Rectangle;
 import flash.text.engine.TextLine;

-import flashx.textLayout.formats.LineBreak;
-
+import mx.core.IVisualElementContainer;
 import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.resources.IResourceManager;
@@ -32,6 +31,7 @@
 import mx.utils.NameUtil;

 import spark.components.Group;
+import spark.layout.BasicLayout;

 /**
  *  The base class for GraphicElements such as TextBox and TextGraphic
@@ -81,6 +81,7 @@
     {
         super();

+        // This is for mirroring, not the text direction.
         dir = "ltr";

 		var resourceManager:IResourceManager = ResourceManager.getInstance();
@@ -135,13 +136,21 @@
     /**
      *  @private
      */
-    mx_internal var stylesChanged:Boolean = false;
-
-    /**
-     *  @private
-     *  Cache this since it accessed for every display list update.
-     */
-    mx_internal var lineBreakToFit:Boolean = true;
+    mx_internal var invalidateCompose:Boolean = true;
+
+    /**
+     *  @private
+     *  The offset applied to each textLine.x so that it is positioned
+     *  correctly in the display object container.
+     */
+    private var _lastDrawX:Number = 0;
+
+    /**
+     *  @private
+     *  The offset applied to each textLine.y so that it is positioned
+     *  correctly in the display object container.
+     */
+    private var _lastDrawY:Number = 0;

     /**
      *  @private
@@ -181,21 +190,36 @@
 			   mx_internal::textLines[0].y : 0;
     }

-    //----------------------------------
-    //  needsDisplayObject
-    //----------------------------------
-
-    // TODO!!! Always return a DisplayObject for now.
-    // We need to optimize this later.
-
-    /**
-     *  @private
-     */
-    override public function canDrawToShared(sharedDisplayObject:DisplayObject):Boolean
-    {
-        return false;
-    }
-
+    /**
+     *  @private
+     */
+    private var displayObjectChanged:Boolean;
+
+    /**
+     *  @private
+     */
+    override public function set displayObject(value:DisplayObject):void
+    {
+        if (displayObject == value)
+            return;
+
+        // There is an exisiting d.o. so this element is either being moved
+        // to a different container (value != null) or it is being removed
+        // (value == null).
+        if (displayObject)
+        {
+            // If there was a scroll rect remove it before we lose the reference
+            // to the display object.
+            mx_internal::clip(false, 0, 0);
+
+            displayObjectChanged = true;
+            invalidateProperties();
+        }
+
+        super.displayObject = value;
+
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Properties: ISimpleStyleClient
@@ -484,6 +508,8 @@
     	{
     		_truncation = value;

+            mx_internal::invalidateCompose = true;
+
     		invalidateSize();
     		invalidateDisplayList();
     	}
@@ -491,10 +517,74 @@

     //--------------------------------------------------------------------------
     //
+    //  Overridden methods: GraphicElement - to implement shared display objects
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     */
+    override public function canDrawToShared(sharedDisplayObject:DisplayObject):Boolean
+    {
+        if (!super.canDrawToShared(sharedDisplayObject))
+            return false;
+
+        // Make sure it is a container that will work for sharing text.
+        return isDisplayObjectShareable(sharedDisplayObject);
+    }
+
+    /**
+     *  @private
+     */
+    override public function closeSequence():Boolean
+    {
+        if (super.closeSequence())
+            return true;
+
+        return !isDisplayObjectShareable(displayObject);
+
+    }
+
+    /**
+     *  @private
+     *  Can't share any group that does automatic placement of display objects.
+     *  We're using a backdoor into the code since text isn't an IVisualElement
+     *  and  can't be directly managed.
+     */
+    private function isDisplayObjectShareable(displayObj:DisplayObject):Boolean
+    {
+        return (displayObj is Group &&
+                Group(displayObj).layout != null &&
+                Group(displayObj).layout is BasicLayout);
+    }
+
+    //--------------------------------------------------------------------------
+    //
     //  Overridden methods: GraphicElement
     //
     //--------------------------------------------------------------------------

+    /**
+     *  @private
+     */
+    override protected function commitProperties():void
+    {
+        super.commitProperties();
+
+        if (displayObjectChanged)
+        {
+            // If there is a container, move any existing text to it, otherwise
+            // remove the text from the previous container.
+            mx_internal::removeTextLines();
+            if (drawnDisplayObject)
+                mx_internal::addTextLines(drawnDisplayObject);
+            else
+                mx_internal::textLines.length = 0;
+
+            displayObjectChanged = false;
+        }
+    }
+
     /**
      *  @private
      */
@@ -535,14 +625,9 @@
         // as we may have messed up the text lines.
         invalidateDisplayList();

-        // If width/height not explicitly set, put on next pixel boundary for
-        // crisp edges.  This should not impact isOverset which was calculated
-        // with the pre-adjusted bounds values.  If explcitly set, use it so
-        // that a recomposition can possibily be avoided in updateDisplayList().
-        if (mx_internal::bounds.width != explicitWidth)
-            mx_internal::bounds.width = Math.ceil(mx_internal::bounds.width);
-        if (mx_internal::bounds.height != explicitHeight)
-            mx_internal::bounds.height = Math.ceil(mx_internal::bounds.height);
+        // Put on next pixel boundary for crisp edges.
+        mx_internal::bounds.width = Math.ceil(mx_internal::bounds.width);
+        mx_internal::bounds.height = Math.ceil(mx_internal::bounds.height);

         // If the measured height is not affected, then constrained
         // width measurement is not neccessary.
@@ -561,7 +646,7 @@
         // optimize the double measure scheme for text reflow.
         _measuredTextLineCount = mx_internal::textLines.length;

-        //trace("measure", measuredWidth, measuredHeight);
+        //trace(id, drawnDisplayObject.name, "measure", measuredWidth, measuredHeight);
     }

     /**
@@ -589,7 +674,7 @@
             return;

         // No reflow for explicit lineBreak
-        if (!mx_internal::lineBreakToFit)
+        if (getStyle("lineBreak") == "explicit")
             return;

         // If we don't measure
@@ -633,8 +718,8 @@
     override protected function updateDisplayList(unscaledWidth:Number,
                                                   unscaledHeight:Number):void
     {
-        //trace(updateDisplayList", unscaledWidth, unscaledHeight);
-
+        //trace(id, drawnDisplayObject.name, "updateDisplayList", unscaledWidth, unscaledHeight);
+
         super.updateDisplayList(unscaledWidth, unscaledHeight);

         // The updateDisplayList() method of a GraphicElement can get called
@@ -647,21 +732,23 @@
         // composed.

         var compose:Boolean = false;
-        var forceClip:Boolean = false;
-
-        // If the styles changed or composition hasn't been done, then compose.
-        if (mx_internal::stylesChanged || isNaN(mx_internal::bounds.height))
+        var clipText:Boolean = false;
+
+        // ToDo: optimize for right-to-left text so compose isn't always done
+        // when height or width changes.
+        if (mx_internal::invalidateCompose)
         {
             compose = true;
         }
         else if (unscaledHeight != mx_internal::bounds.height)
         {
             // Height changed.
-            if (unscaledHeight > mx_internal::bounds.height &&
-                mx_internal::isOverset)
+            if ((unscaledHeight > mx_internal::bounds.height &&
+                mx_internal::isOverset) ||
+                getStyle("blockProgression") != "tb")
             {
                 // More height is needed and it's possible there is more text
-                // since it didn't all fit before.
+                // since it didn't all fit before.
                 compose = true;
             }
             else if (composeOnHeightChange())
@@ -670,49 +757,65 @@
                 // text is positioned correctly for the new size.
                 compose = true;
             }
-            else
+            else (unscaledHeight < mx_internal::bounds.height)
             {
-                // Don't need to recompose but need to clip since the text is
-                // a different shape than what was composed.
-                forceClip = true;
+                // Don't need to recompose but need to clip since not all the
+                // height is needed.
+                clipText = true;
             }
         }

         // Width changed.
         if (!compose && unscaledWidth != mx_internal::bounds.width)
         {
-            if (mx_internal::lineBreakToFit || composeOnWidthChange())
+            if (getStyle("lineBreak") == "toFit" ||
+                composeOnWidthChange() ||
+                getStyle("blockProgression") != "tb")
             {
                 // Width changed and toFit line breaks or the styles
                 // require a recompose if the width changes.
                 compose = true;
             }
-            else if (unscaledWidth > mx_internal::bounds.width &&
-                     mx_internal::isOverset)
+            else if (unscaledWidth < mx_internal::bounds.width)
             {
-                // Explicit line breaks so compose only if more width is needed
-                // and there is more text to compose.
-                compose = true;
-            }
-            else
-            {
-                // Don't need to recompose but need to clip since the text is
-                // a different shape than what was composed.
-                forceClip = true;
+                // Explicit line breaks.  Don't need to recompose but need to
+                // clip since the not all the width is needed.
+                clipText = true;
             }
         }

+        // Compose will add the new text lines to the display object container.
+        // Otherwise, if the text is in a shared container, make sure the
+        // position of the lines has remained the same.
         if (compose)
             composeTextLines(unscaledWidth, unscaledHeight);
-
-        // Only force the clip if compose wasn't just done.
-        forceClip = !compose && forceClip;
-
-        //trace("udl", "compose", compose, "clip", mx_internal::isOverset || forceClip);
-
-        mx_internal::clip(unscaledWidth, unscaledHeight, forceClip);
-    }
+        else if (shareIndex != -1)
+            mx_internal::adjustTextLines();

+        // If the text is overset it always has to be clipped (as well as if
+        // it is being clipped to reduce the size to avoid a recomposition).
+        if (mx_internal::isOverset)
+            clipText = true;
+
+        // We need to clip this text and it is in a container with other
+        // display objects.  Setting alwaysCreateDisplayObject to true will
+        // cause the display objects to be reassigned so that we get one of
+        // our own.  updateDisplayList() will be called with the new display
+        // object.  Once it's in it's own display object leave it there.
+        if (clipText)
+        {
+            mx_internal::alwaysCreateDisplayObject = true;
+            if (shareIndex > 0)
+                return;
+        }
+
+        //trace(id, drawnDisplayObject.name, "udl", "compose", compose, "clip",
+        //      clipText, "bounds", mx_internal::bounds);
+
+        // Set the scrollRect used for clipping appropriately.
+        mx_internal::clip(clipText, unscaledWidth, unscaledHeight);
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Methods: ISimpleStyleClient
@@ -730,14 +833,8 @@
     public function styleChanged(styleProp:String):void
     {
         StyleProtoChain.styleChanged(this, styleProp);
-
-        if (styleProp == "lineBreak")
-        {
-            mx_internal::lineBreakToFit =
-                (getStyle("lineBreak") == LineBreak.TO_FIT);
-        }
-
-        mx_internal::stylesChanged = true;
+
+        mx_internal::invalidateCompose = true;
     }

     //--------------------------------------------------------------------------
@@ -912,9 +1009,7 @@
      */
     public function stylesInitialized():void
     {
-        mx_internal::lineBreakToFit =
-            (getStyle("lineBreak") == LineBreak.TO_FIT);
-        mx_internal::stylesChanged = true;
+        mx_internal::invalidateCompose = true;
     }

     /**
@@ -939,6 +1034,9 @@
      */
     protected function composeOnHeightChange():Boolean
     {
+        if (truncation != 0 && getStyle("lineBreak") == "toFit")
+            return true;
+
         return false;
     }

@@ -948,6 +1046,9 @@
      */
     protected function composeOnWidthChange():Boolean
     {
+        if (truncation != 0 && getStyle("lineBreak") == "toFit")
+            return true;
+
         return false;
     }

@@ -964,29 +1065,41 @@
 	 *  @private
 	 *  Adds the TextLines created by composeTextLines()
      *  to a specified DisplayObjectContainer.
-	 *  Sets the isOverset flag to indicate whether they require clipping.
 	 */
 	mx_internal function addTextLines(container:DisplayObjectContainer,
-								  index:int = 0):void
+								      index:int = 0):void
 	{
 		var n:int = mx_internal::textLines.length;
-		for (var i:int = n - 1; i >= 0; i--)
+        if (n == 0)
+            return;
+
+        for (var i:int = n - 1; i >= 0; i--)
 		{
 			var textLine:TextLine = TextLine(mx_internal::textLines[i]);
-			container.addChildAt(textLine, index);
+
+            //trace(container.name, "addTextLines", textLine.x, textLine.y, drawX, drawY);
+
+            textLine.x += drawX;
+            textLine.y += drawY;
+
+			if (container is IVisualElementContainer)
+                IVisualElementContainer(container).mx_internal::$addChildAt(textLine, index);
+			else
+                container.addChildAt(textLine, index);
 		}

-		var r:Rectangle = container.getBounds(container);
-		mx_internal::isOverset = !mx_internal::bounds.containsRect(r);
-
-	    //trace("bounds", mx_internal::bounds, "r", r, mx_internal::isOverset);
+		// If these lines went into a shared container these need to be saved
+		// so that the lines can be moved to another container without being
+		// recomposed.  If the container isn't shared they will be 0,0.
+		_lastDrawX = drawX;
+		_lastDrawY = drawY;
 	}

 	/**
 	 *  @private
 	 *  Removes the TextLines created by composeTextLines()
      *  from whatever container they were added to, and frees them.
-	 *  Empties the textLines Array.
+	 *  This does not empty the textLines Array.
 	 */
 	mx_internal function removeTextLines():void
 	{
@@ -1002,13 +1115,87 @@
 		for (var i:int = 0; i < n; i++)
 		{
 			var textLine:TextLine = TextLine(mx_internal::textLines[i]);
-			container.removeChild(textLine);
+            if (container is IVisualElementContainer)
+                IVisualElementContainer(container).mx_internal::$removeChild(textLine);
+            else
+                container.removeChild(textLine);
+
+            // Reset x and y to be relative to 0,0.
+            textLine.x -= _lastDrawX;
+            textLine.y -= _lastDrawY;
 		}
-
-		mx_internal::textLines.length = 0;
+
+		_lastDrawX = 0;
+		_lastDrawY = 0;
 	}

     /**
+     *  @private
+     *  If the text lines are in a shared container then x and y have to be
+     *  adjusted if offsets.x, offsets.y, layoutX or layoutY changes.  When
+     *  these are changed, our updateDisplayList() is called but if we don't
+     *  recompose we may need to adjust the position of the text lines.
+     */
+    mx_internal function adjustTextLines():void
+    {
+        var n:int = mx_internal::textLines.length;
+        if (n == 0)
+            return;
+
+        // Are there any adjustments to be made?
+        if (_lastDrawX == drawX && _lastDrawY == drawY)
+            return;
+
+        for (var i:int = 0; i < n; i++)
+        {
+            var textLine:TextLine = TextLine(mx_internal::textLines[i]);
+
+            textLine.x +=  drawX - _lastDrawX;
+            textLine.y += drawY - _lastDrawY;
+        }
+
+        _lastDrawX = drawX;
+        _lastDrawY = drawY;
+    }
+
+    /**
+     *  @private
+     *  Does the bounds of the contents rectangle fit within the bounds
+     *  of the composition rectangle?
+     */
+    mx_internal function isTextOverset(composeWidth:Number,
+                                       composeHeight:Number):Boolean
+    {
+        // The composition bounds available for text placement.
+        var compositionRect:Rectangle = new Rectangle(0, 0,
+                                                      composeWidth,
+                                                      composeHeight);
+
+        // Add in a half-pixel slop factor to the throw-away rectangle (do
+        // not modify mx_internal::bounds).  This covers the case where the
+        // y (textLine.y - textLine.ascent) is slightly less than 0 because of
+        // rounding errors.
+        compositionRect.inflate(0.25, 0.25);
+
+        // The bounds of the composed text.
+        var contentRect:Rectangle = mx_internal::bounds;
+
+        // Does the text fit totally within the composition area?  This is
+        // a Rectangle.contains but allows for composition width and/or height
+        // to be NaN.
+        var isOverset:Boolean = (contentRect.top < compositionRect.top ||
+                                 contentRect.left < compositionRect.left ||
+                                 (!isNaN(compositionRect.bottom) &&
+                                 contentRect.bottom > compositionRect.bottom) ||
+                                 (!isNaN(compositionRect.right) &&
+                                 contentRect.right > compositionRect.right));
+
+        //trace(id, drawnDisplayObject.name, "bounds", contentRect, "overset", isOverset);
+
+        return isOverset;
+    }
+
+     /**
 	 *  Use scrollRect to clip overset lines.
 	 *  But don't read or write scrollRect if you can avoid it,
 	 *  because this causes Player 10.0 to allocate memory.
@@ -1020,11 +1207,11 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    mx_internal function clip(w:Number, h:Number, forceClip:Boolean=false):void
+    mx_internal function clip(clipText:Boolean, w:Number, h:Number):void
 	{
-        if (mx_internal::isOverset || forceClip)
+        if (clipText)
         {
-            var r:Rectangle = displayObject.scrollRect;
+            var r:Rectangle = drawnDisplayObject.scrollRect;
             if (r)
             {
             	r.x = 0;
@@ -1036,12 +1223,12 @@
             {
             	r = new Rectangle(0, 0, w, h);
             }
-            displayObject.scrollRect = r;
+            drawnDisplayObject.scrollRect = r;
             mx_internal::hasScrollRect = true;
         }
         else if (mx_internal::hasScrollRect)
         {
-            displayObject.scrollRect = null;
+            drawnDisplayObject.scrollRect = null;
             mx_internal::hasScrollRect = false;
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3672
Author:   clucier@adobe.com
Date:     2008-10-15T23:54:51.581066Z

Log Message:
-----------
Removing the commonly used getUnqualifiedClassName out of the less commonly used utility class to reduce SWF size for the general case.
Reviewer: Gordon
QE: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/OrderedObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/NameUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -20,7 +20,7 @@
 import mx.styles.IStyleClient;
 import mx.styles.StyleManager;
 import mx.styles.StyleProtoChain;
-import mx.utils.ObjectUtil;
+import mx.utils.NameUtil;

 /**
  *  Documentation is not currently available.
@@ -141,7 +141,7 @@
      */
     public function get className():String
     {
-        return ObjectUtil.getUnqualifiedClassName(this);
+        return NameUtil.getUnqualifiedClassName(this);
     }

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


fixed bug with parsing object with circular references ( issue #18 http://code.google.com/p/fabrication/issues/detail?id=18 )

--- src/org/puremvc/as3/multicore/utilities/fabrication/logging/FabricationLogger.as
+++ src/org/puremvc/as3/multicore/utilities/fabrication/logging/FabricationLogger.as
@@ -79,7 +79,7 @@
             var infoObject:Object = {};
             infoObject.fabrication = fabricationName;
             infoObject.id = fabrication.id;
-            infoObject.config = parseObject( fabrication.config );
+            infoObject.config = parseObject(fabrication.config);
             action.infoObject = infoObject;
             logAction(action);
         }
@@ -112,7 +112,7 @@
          */
         public function logProxyRegistration(proxy:IProxy):void
         {
-            if (!isFrameworkInstanceFlow( proxy )) {
+            if (!isFrameworkInstanceFlow(proxy)) {
                 var action:Action = new Action();
                 var proxyName:String = proxy.getProxyName();
                 action.actorName = "Proxy: " + proxyName;
@@ -157,12 +157,11 @@
                 var interceptorClassName:String = getClassName(interceptorClass);
                 var action:Action = new Action();
                 action.actorName = "Interceptor: " + interceptorClassName;
-                ;
                 action.message = " [ " + interceptorClassName + " ] interceptor has been registered";
                 action.message += " for notification [ " + notificationName + " ]";
                 action.type = ActionType.INTERCEPTOR_REGISTERED;
                 if (parameters) {
-                    action.infoObject = { interceptorClass:interceptorClassName, parameters:parseObject( parameters ) };
+                    action.infoObject = { interceptorClass:interceptorClassName, parameters:parseObject(parameters) };
                 }
                 logAction(action);
             }
@@ -176,14 +175,9 @@
          */
         public function logRouteNotificationAction(notification:TransportNotification):void
         {
-            //            var senderIsProxy:Boolean = sender is IProxy;
-            //            var senderIsMediator:Boolean = sender is IMediator;
-            //            var senderName:String = ( senderIsProxy ? ( sender as IProxy).getProxyName() : senderIsMediator ? ( sender as IMediator ).getMediatorName() : "command" );
             var action:Action = new Action();
             var notificationName:String = notification.getName();
             action.actorName = "Notification: " + notificationName;
-            //            action.message = ( senderIsProxy ? " proxy" : " mediator" ) + " [ ";
-            //            action.message += senderName + " ]";
             action.message = " Notification [ " + notificationName + " ] has been routed";
             if (notification.getTo())
                 action.message += " to [ " + notification.getTo() + " ]";
@@ -193,20 +187,6 @@
             notificationObject.body = parseObject(notification.getBody());
             notificationObject.type = notification.getType();
             var flowInfoObject:Object = {};
-            //            var senderObject:Object = {};
-            /*if (senderIsProxy) {
-             var proxy:IProxy = sender as IProxy;
-             senderObject.proxyName = proxy.getProxyName();
-             senderObject.data = proxy.getData();
-             senderObject = retreieveProps(proxy, senderObject);
-             flowInfoObject.proxy = senderObject;
-             }
-             else if (senderIsMediator) {
-             var mediator:IMediator = sender as IMediator;
-             senderObject.mediatorName = mediator.getMediatorName();
-             senderObject.viewComponent = mediator.getViewComponent();
-             flowInfoObject.mediator = senderObject;
-             }*/
             flowInfoObject = notificationObject;
             action.infoObject = flowInfoObject;
             logAction(action);
@@ -219,94 +199,21 @@
          */
         public function logSendNotificationAction(notification:INotification):void
         {
-            //            var senderIsProxy:Boolean = sender is IProxy;
-            //            var senderIsMediator:Boolean = sender is IMediator;
-            //            var senderName:String = ( senderIsProxy ? ( sender as IProxy).getProxyName() : senderIsMediator ? ( sender as IMediator ).getMediatorName() : "command" );
             var action:Action = new Action();
             var notificationName:String = notification.getName();
             action.actorName = "Notification: " + notificationName;
-            //            action.message = " " + ( senderIsProxy ? " proxy" : " mediator" ) + " [ ";
-            //            action.message += senderName + " ]";
             action.message = " Notification [ " + notificationName + " ] has been sent";
             action.type = ActionType.NOTIFICATION_SENT;
             var notificationObject:Object = {};
             notificationObject.name = notificationName;
-            notificationObject.body = parseObject( notification.getBody() );
+            notificationObject.body = parseObject(notification.getBody());
             notificationObject.type = notification.getType();
-            //            notificationObject = retreieveProps(notificationObject, notificationObject);
             var flowInfoObject:Object = {};
-            //            var senderObject:Object = {};
-            //            if (senderIsProxy) {
-            //                var proxy:IProxy = sender as IProxy;
-            //                senderObject.proxyName = proxy.getProxyName();
-            //                senderObject.data = proxy.getData();
-            //                senderObject = retreieveProps(proxy, senderObject);
-            //                flowInfoObject.proxy = senderObject;
-            //            }
-            //            else if (senderIsMediator) {
-            //                var mediator:IMediator = sender as IMediator;
-            //                senderObject.mediatorName = mediator.getMediatorName();
-            //                senderObject.viewComponent = mediator.getViewComponent();
-            //                flowInfoObject.mediator = senderObject;
-            //            }
             flowInfoObject = notificationObject;
             action.infoObject = flowInfoObject;
             logAction(action);
         }

-        //        public function logServiceCall(proxy:IProxy, message:Object, eventArgs:Array = null):void
-        //        {
-        //            var action:Action = new Action();
-        //            action.actorName = proxy.getProxyName();
-        //            action.message = " service call by [ " + proxy.getProxyName() + " ]";
-        //            action.type = ActionType.SERVICE_CALL;
-        //            var callObject:Object = {};
-        //            var proxyObject:Object = {};
-        //            proxyObject.proxyName = proxy.getProxyName();
-        //            proxyObject.data = proxy.getData();
-        //            proxyObject = retreieveProps(proxy, proxy);
-        //            callObject.proxy = proxy;
-        //            callObject.callMessage = message;
-        //            if (eventArgs)
-        //                callObject.eventArgs = eventArgs;
-        //            action.infoObject = callObject;
-        //            logAction(action);
-        //        }
-
-        //        public function logServiceResponse(proxy:IProxy, result:Object):void
-        //        {
-        //            var action:Action = new Action();
-        //            action.actorName = proxy.getProxyName();
-        //            action.message = " response for call by [ " + proxy.getProxyName() + " ]";
-        //            action.type = ActionType.SERVICE_CALL;
-        //            var callObject:Object = {};
-        //            var proxyObject:Object = {};
-        //            proxyObject.proxyName = proxy.getProxyName();
-        //            proxyObject.data = proxy.getData();
-        //            proxyObject = retreieveProps(proxy, proxy);
-        //            callObject.proxy = proxy;
-        //            callObject.result = result;
-        //            action.infoObject = callObject;
-        //            logAction(action);
-        //        }
-
-        //        public function logServiceFault(proxy:IProxy, fault:Object):void
-        //        {
-        //            var action:Action = new Action();
-        //            action.actorName = proxy.getProxyName();
-        //            action.message = " fault for call by [ " + proxy.getProxyName() + " ]";
-        //            action.type = ActionType.SERVICE_CALL;
-        //            var callObject:Object = {};
-        //            var proxyObject:Object = {};
-        //            proxyObject.proxyName = proxy.getProxyName();
-        //            proxyObject.data = proxy.getData();
-        //            proxyObject = retreieveProps(proxy, proxy);
-        //            callObject.proxy = proxy;
-        //            callObject.fault = fault;
-        //            action.infoObject = callObject;
-        //            logAction(action);
-        //            frameworkError("fault on call for [ " + fault.toString() + " ]");
-        //        }

         /**
@@ -370,7 +277,7 @@

         private function parseObject(input:*):Object
         {
-            if( null == input ) return null;
+            if (null == input) return null;

             var output:Object = [];
             if (input is Array) {
@@ -398,8 +305,17 @@

             else {

+                var ob:Object;
                 for (var elementName:String in input) {

+                    ob = input[elementName];
+                    if (ob == input)
+                        continue;
+                    for (var elementName2:String in ob) {
+
+                        if (ob[elementName2] == input)
+                            continue;
+                    }
                     output[elementName] = parseObject(input[elementName])

                 }


348 inProgress var wasn't being used

348 inProgress var wasn't being used

--- raw/src/org/yellcorp/lib/net/URLXMLLoader.as
+++ raw/src/org/yellcorp/lib/net/URLXMLLoader.as
@@ -26,7 +26,6 @@
 [Event(name="xmlParseError", type="org.yellcorp.lib.events.XMLParseErrorEvent")]
 public class URLXMLLoader extends URLLoader
 {
-    private var inProgress:Boolean;
     private var privateLoader:URLLoader;

     public function URLXMLLoader(request:URLRequest = null)
@@ -125,8 +124,6 @@

     private function listen(loader:URLLoader):void
     {
-        inProgress = true;
-
         loader.addEventListener(HTTPStatusEvent.HTTP_STATUS, dispatchEvent);
         loader.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
         loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
@@ -137,8 +134,6 @@

     private function unlisten(loader:URLLoader):void
     {
-        inProgress = false;
-
         loader.removeEventListener(HTTPStatusEvent.HTTP_STATUS, dispatchEvent);
         loader.removeEventListener(SecurityErrorEvent.SECURITY_ERROR, onError);
         loader.removeEventListener(IOErrorEvent.IO_ERROR, onError);


Transferred from the Adobe Open Source Subversion Repository

Revision: 3670
Author:   gosmith@adobe.com
Date:     2008-10-15T23:26:37.608871Z

Log Message:
-----------
The interaction of the 'text' and 'content' properties is now working as intended. If you set one and wait for the updateComplete event, you can now get the other. (In the meantime, the other is null.) If you set both at the same time, 'content' wins.

Also, setting the 'text' or the 'content' of a TextView now causes the selection range to be reset to (-1, -1), which means "no selection".

Reviewer: Deepa
Bugs: SDK-16035, SDK-16359, SDK-17307
QA: Please test the interaction of the 'text' and 'content' properties in TextGraphic, TextView, and TextArea.
Doc: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/TextGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/TextView.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -18,6 +18,7 @@

 import mx.components.TextView;
 import mx.components.baseClasses.FxComponent;
+import mx.core.mx_internal;
 import mx.events.FlexEvent;
 import mx.events.TextOperationEvent;
 import mx.managers.IFocusManagerComponent;
@@ -78,7 +79,7 @@
     /**
      *  @private
      *  If true, pass calls to drawFocus() up to the parent.
-     *  This is used when a TextInput is part of a composite control
+     *  This is used when a component is part of a composite control
      *  like NumericStepper or ComboBox;
      */
     mx_internal var parentDrawsFocus:Boolean = false;
@@ -169,22 +170,22 @@
 	/**
 	 *  @private
 	 */
-	private var _text:String = "";
-
-	/**
-	 *  @private
-	 */
-	private var textChanged:Boolean = false;
+	mx_internal var _text:String = "";
+
+	/**
+	 *  @private
+	 */
+	mx_internal var textChanged:Boolean = false;

 	[Bindable("change")]
 	[Bindable("textChanged")]

 	/**
-	 *  The text String displayed by this TextInput.
+	 *  The text String displayed by this component.
 	 */
 	public function get text():String
 	{
-		return _text;
+		return mx_internal::_text;
 	}

 	/**
@@ -192,11 +193,11 @@
 	 */
 	public function set text(value:String):void
 	{
-		if (value == _text)
+		if (value == mx_internal::_text)
 			return;

-		_text = value;
-		textChanged = true;
+		mx_internal::_text = value;
+		mx_internal::textChanged = true;

 		invalidateProperties();

@@ -211,7 +212,7 @@

 	/**
 	 *  The TextView that must be present
-	 *  in any skin assigned to this TextInput.
+	 *  in any skin assigned to this component.
 	 */
 	public var textView:TextView;

@@ -223,16 +224,16 @@

 	/**
 	 *  @private
-	 *  Pushes various TextInput properties down into the TextView.
+	 *  Pushes various properties down into the TextView.
 	 */
     override protected function commitProperties():void
 	{
 		super.commitProperties();

-		if (textChanged)
+		if (mx_internal::textChanged)
 		{
-			textView.text = _text;
-			textChanged = false;
+			textView.text = mx_internal::_text;
+			mx_internal::textChanged = false;
 		}
 	}

@@ -247,7 +248,7 @@
 		{
 			// Start listening for various events from the TextView.

-			textView.addEventListener(SelectionEvent.SELECTION_CHANGE,
+            textView.addEventListener(SelectionEvent.SELECTION_CHANGE,
 									  textView_selectionChangeHandler);

 			textView.addEventListener("changing",
@@ -260,7 +261,7 @@
                                       textView_enterHandler);

             // Set the initial text value
-            textView.text = _text;
+            textView.text = mx_internal::_text;
 		}
 	}

@@ -378,7 +379,7 @@
         // So if this component is in that state when it takes focus,
         // it changes the selection to (0, 0).
         if (selectionAnchorPosition == -1 && selectionActivePosition == -1)
-            setSelection(0, 0);
+            setSelection(int.MAX_VALUE, int.MAX_VALUE);

         super.focusInHandler(event);
     }
@@ -411,7 +412,7 @@
 	private function textView_changeHandler(event:TextOperationEvent):void
 	{
 		// Update our storage variable for the text string.
-		_text = textView.text;
+		mx_internal::_text = textView.text;

 		// Redispatch the event that came from the TextView.
 		dispatchEvent(event);
@@ -428,7 +429,7 @@
 		var newEvent:Event = event.clone();
 		dispatchEvent(newEvent);

-		// If the event dispatched from this TextInput is canceled,
+		// If the event dispatched from this component is canceled,
 		// cancel the one from the TextView, which will prevent
 		// the editing operation from being processed.
 		if (newEvent.isDefaultPrevented())


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

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

 package mx.accessibility
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 4009
Author:   jimurphy@adobe.com
Date:     2008-11-04T15:10:34.970681Z

Log Message:
-----------
Merged alpha_gumbo revisions 3929,3936-3937,3945,3956,3971,3986,3994,4002,4006 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/CompositeEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/BitmapGraphic.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/EffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/FxRotate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon.png</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/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffectInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon_small.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/ParallelInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/StrokedElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/Effect.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</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/ResizeMode.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_container_icon.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/effects/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/effects/IEffect.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/components/baseClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/utilities/src/flash_component_icon_small.png</path>

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

--- frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/TweenEffectInstance.as
@@ -191,7 +191,7 @@
   	 *  @param playheadTime The position, in milliseconds, between 0
 	 *  and the value of the duration property.
   	 */
-	public function seek(playheadTime:Number):void
+    override public function seek(playheadTime:Number):void
 	{
 		if (tween)
 			tween.seek(playheadTime);


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

--- frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as
+++ frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2011 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.
 //
 ////////////////////////////////////////////////////////////////////////////////
 package spark.components


Bug 650835 addendum: increase the inner loop in order for test to work reliably in the player (r=cpeyer)

--- test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
+++ test/acceptance/mmgc/pauseForGCIfCollectionImminent.as
@@ -64,7 +64,7 @@
     var hits = 0;
     var a = [];
     for (var i = 0; i < 1000; i++) {
-        for (var j = 0; j < 1000; j++)
+        for (var j = 0; j < 4000; j++)
         a[0] = 3.14159 + i * j; // compute a Number and store it in a * location to box it
         var before = System.totalMemory - System.freeMemory;
         System.pauseForGCIfCollectionImminent(f);