Transferred from the Adobe Open Source Subversion Repository

Revision: 18083
Author:   matamel@adobe.com
Date:     2010-10-08T14:06:40.868078Z

Log Message:
-----------
Bug: BLZ-582 - {server.name} doesn't get properly encoded when using IPv6 address
QA: Yes
Doc: No

Details: Made URLUtil smarter in its handling of square brackets with IPv6.

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/rpc/src/mx/utils/URLUtil.as

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

--- frameworks/projects/rpc/src/mx/utils/URLUtil.as
+++ frameworks/projects/rpc/src/mx/utils/URLUtil.as
@@ -11,717 +11,753 @@

 package mx.utils
 {
-
-import mx.messaging.config.LoaderConfig;
-
-/**
- *  The URLUtil class is a static class with methods for working with
- *  full and relative URLs within Flex.
- *
- *  @see mx.managers.BrowserManager
- *
- *  @langversion 3.0
- *  @playerversion Flash 9
- *  @playerversion AIR 1.1
- *  @productversion Flex 3
- */
-public class URLUtil
-{
-    //--------------------------------------------------------------------------
-    //
-    //  Constructor
-    //
-    //--------------------------------------------------------------------------
+
+    import mx.messaging.config.LoaderConfig;
+
     /**
-     *  @private
-     */
-    public function URLUtil()
-    {
-        super();
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    //  Class methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  Returns the domain and port information from the specified URL.
+     *  The URLUtil class is a static class with methods for working with
+     *  full and relative URLs within Flex.
      *
-     *  @param url The URL to analyze.
-     *  @return The server name and port of the specified URL.
+     *  @see mx.managers.BrowserManager
      *
      *  @langversion 3.0
      *  @playerversion Flash 9
      *  @playerversion AIR 1.1
      *  @productversion Flex 3
      */
-    public static function getServerNameWithPort(url:String):String
+    public class URLUtil
     {
-        // Find first slash; second is +1, start 1 after.
-        var start:int = url.indexOf("/") + 2;
-        var length:int = url.indexOf("/", start);
-        return length == -1 ? url.substring(start) : url.substring(start, length);
-    }
-
-    /**
-     *  Returns the server name from the specified URL.
-     *
-     *  @param url The URL to analyze.
-     *  @return The server name of the specified URL.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function getServerName(url:String):String
-    {
-        var sp:String = getServerNameWithPort(url);
-
-        // If IPv6 is in use, start looking after the square bracket.
-        var delim:int = sp.indexOf("]");
-        delim = (delim > -1)? sp.indexOf(":", delim) : sp.indexOf(":");
-
-        if (delim > 0)
-            sp = sp.substring(0, delim);
-        return sp;
-    }
-
-    /**
-     *  Returns the port number from the specified URL.
-     *
-     *  @param url The URL to analyze.
-     *  @return The port number of the specified URL.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function getPort(url:String):uint
-    {
-        var sp:String = getServerNameWithPort(url);
-        // If IPv6 is in use, start looking after the square bracket.
-        var delim:int = sp.indexOf("]");
-        delim = (delim > -1)? sp.indexOf(":", delim) : sp.indexOf(":");
-        var port:uint = 0;
-        if (delim > 0)
-        {
-            var p:Number = Number(sp.substring(delim + 1));
-            if (!isNaN(p))
-                port = int(p);
-        }
-
-        return port;
-    }
-
-    /**
-     *  Converts a potentially relative URL to a fully-qualified URL.
-     *  If the URL is not relative, it is returned as is.
-     *  If the URL starts with a slash, the host and port
-     *  from the root URL are prepended.
-     *  Otherwise, the host, port, and path are prepended.
-     *
-     *  @param rootURL URL used to resolve the URL specified by the url parameter, if url is relative.
-     *  @param url URL to convert.
-     *
-     *  @return Fully-qualified URL.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function getFullURL(rootURL:String, url:String):String
-    {
-        if (url != null && !URLUtil.isHttpURL(url))
-        {
-            if (url.indexOf("./") == 0)
-            {
-                url = url.substring(2);
-            }
-            if (URLUtil.isHttpURL(rootURL))
-            {
-                var slashPos:Number;
-
-                if (url.charAt(0) == '/')
-                {
-                    // non-relative path, "/dev/foo.bar".
-                    slashPos = rootURL.indexOf("/", 8);
-                    if (slashPos == -1)
-                        slashPos = rootURL.length;
+        //--------------------------------------------------------------------------
+        //
+        // Private Static Constants
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        private static const SQUARE_BRACKET_LEFT:String = "]";
+        private static const SQUARE_BRACKET_RIGHT:String = "[";
+        private static const SQUARE_BRACKET_LEFT_ENCODED:String = encodeURIComponent(SQUARE_BRACKET_LEFT);
+        private static const SQUARE_BRACKET_RIGHT_ENCODED:String = encodeURIComponent(SQUARE_BRACKET_RIGHT);
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+        /**
+         *  @private
+         */
+        public function URLUtil()
+        {
+            super();
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Returns the domain and port information from the specified URL.
+         *
+         *  @param url The URL to analyze.
+         *  @return The server name and port of the specified URL.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function getServerNameWithPort(url:String):String
+        {
+            // Find first slash; second is +1, start 1 after.
+            var start:int = url.indexOf("/") + 2;
+            var length:int = url.indexOf("/", start);
+            return length == -1 ? url.substring(start) : url.substring(start, length);
+        }
+
+        /**
+         *  Returns the server name from the specified URL.
+         *
+         *  @param url The URL to analyze.
+         *  @return The server name of the specified URL.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function getServerName(url:String):String
+        {
+            var sp:String = getServerNameWithPort(url);
+
+            // If IPv6 is in use, start looking after the square bracket.
+            var delim:int = URLUtil.indexOfLeftSquareBracket(sp);
+            delim = (delim > -1)? sp.indexOf(":", delim) : sp.indexOf(":");
+
+            if (delim > 0)
+                sp = sp.substring(0, delim);
+            return sp;
+        }
+
+        /**
+         *  Returns the port number from the specified URL.
+         *
+         *  @param url The URL to analyze.
+         *  @return The port number of the specified URL.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function getPort(url:String):uint
+        {
+            var sp:String = getServerNameWithPort(url);
+            // If IPv6 is in use, start looking after the square bracket.
+            var delim:int = URLUtil.indexOfLeftSquareBracket(sp);
+            delim = (delim > -1)? sp.indexOf(":", delim) : sp.indexOf(":");
+            var port:uint = 0;
+            if (delim > 0)
+            {
+                var p:Number = Number(sp.substring(delim + 1));
+                if (!isNaN(p))
+                    port = int(p);
+            }
+
+            return port;
+        }
+
+        /**
+         *  Converts a potentially relative URL to a fully-qualified URL.
+         *  If the URL is not relative, it is returned as is.
+         *  If the URL starts with a slash, the host and port
+         *  from the root URL are prepended.
+         *  Otherwise, the host, port, and path are prepended.
+         *
+         *  @param rootURL URL used to resolve the URL specified by the url parameter, if url is relative.
+         *  @param url URL to convert.
+         *
+         *  @return Fully-qualified URL.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function getFullURL(rootURL:String, url:String):String
+        {
+            if (url != null && !URLUtil.isHttpURL(url))
+            {
+                if (url.indexOf("./") == 0)
+                {
+                    url = url.substring(2);
+                }
+                if (URLUtil.isHttpURL(rootURL))
+                {
+                    var slashPos:Number;
+
+                    if (url.charAt(0) == '/')
+                    {
+                        // non-relative path, "/dev/foo.bar".
+                        slashPos = rootURL.indexOf("/", 8);
+                        if (slashPos == -1)
+                            slashPos = rootURL.length;
+                    }
+                    else
+                    {
+                        // relative path, "dev/foo.bar".
+                        slashPos = rootURL.lastIndexOf("/") + 1;
+                        if (slashPos <= 8)
+                        {
+                            rootURL += "/";
+                            slashPos = rootURL.length;
+                        }
+                    }
+
+                    if (slashPos > 0)
+                        url = rootURL.substring(0, slashPos) + url;
+                }
+            }
+
+            return url;
+        }
+
+        // Note: The following code was copied from Flash Remoting's
+        // NetServices client components.
+        // It is reproduced here to keep the services APIs
+        // independent of the deprecated NetServices code.
+        // Note that it capitalizes any use of URL in method or class names.
+
+        /**
+         *  Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.
+         *
+         *  @param url The URL to analyze.
+         *
+         *  @return true if the URL starts with "http://", "https://", or "rtmp://".
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function isHttpURL(url:String):Boolean
+        {
+            return url != null &&
+                (url.indexOf("http://") == 0 ||
+                    url.indexOf("https://") == 0);
+        }
+
+        /**
+         *  Determines if the URL uses the secure HTTPS protocol.
+         *
+         *  @param url The URL to analyze.
+         *
+         *  @return true if the URL starts with "https://".
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function isHttpsURL(url:String):Boolean
+        {
+            return url != null && url.indexOf("https://") == 0;
+        }
+
+        /**
+         *  Returns the protocol section of the specified URL.
+         *  The following examples show what is returned based on different URLs:
+         *
+         *

+         *  getProtocol("https://localhost:2700/") returns "https"
+         *  getProtocol("rtmp://www.myCompany.com/myMainDirectory/groupChatApp/HelpDesk") returns "rtmp"
+         *  getProtocol("rtmpt:/sharedWhiteboardApp/June2002") returns "rtmpt"
+         *  getProtocol("rtmp::1234/chatApp/room_name") returns "rtmp"
+         *

+         *
+         *  @param url String containing the URL to parse.
+         *
+         *  @return The protocol or an empty String if no protocol is specified.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function getProtocol(url:String):String
+        {
+            var slash:int = url.indexOf("/");
+            var indx:int = url.indexOf(":/");
+            if (indx > -1 && indx < slash)
+            {
+                return url.substring(0, indx);
+            }
+            else
+            {
+                indx = url.indexOf("::");
+                if (indx > -1 && indx < slash)
+                    return url.substring(0, indx);
+            }
+
+            return "";
+        }
+
+        /**
+         *  Replaces the protocol of the
+         *  specified URI with the given protocol.
+         *
+         *  @param uri String containing the URI in which the protocol
+         *  needs to be replaced.
+         *
+         *  @param newProtocol String containing the new protocol to use.
+         *
+         *  @return The URI with the protocol replaced,
+         *  or an empty String if the URI does not contain a protocol.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function replaceProtocol(uri:String,
+                                               newProtocol:String):String
+        {
+            return uri.replace(getProtocol(uri), newProtocol);
+        }
+
+        /**
+         *  Returns a new String with the port replaced with the specified port.
+         *  If there is no port in the specified URI, the port is inserted.
+         *  This method expects that a protocol has been specified within the URI.
+         *
+         *  @param uri String containing the URI in which the port is replaced.
+         *  @param newPort uint containing the new port to subsitute.
+         *
+         *  @return The URI with the new port.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function replacePort(uri:String, newPort:uint):String
+        {
+            var result:String = "";
+
+            // First, determine if IPv6 is in use by looking for square bracket
+            var indx:int = uri.indexOf("]");
+
+            // If IPv6 is not in use, reset indx to the first colon
+            if (indx == -1)
+                indx = uri.indexOf(":");
+
+            var portStart:int = uri.indexOf(":", indx+1);
+            var portEnd:int;
+
+            // If we have a port
+            if (portStart > -1)
+            {
+                portStart++; // move past the ":"
+                portEnd = uri.indexOf("/", portStart);
+                //@TODO: need to throw an invalid uri here if no slash was found
+                result = uri.substring(0, portStart) +
+                    newPort.toString() +
+                    uri.substring(portEnd, uri.length);
+            }
+            else
+            {
+                // Insert the specified port
+                portEnd = uri.indexOf("/", indx);
+                if (portEnd > -1)
+                {
+                    // Look to see if we have protocol://host:port/
+                    // if not then we must have protocol:/relative-path
+                    if (uri.charAt(portEnd+1) == "/")
+                        portEnd = uri.indexOf("/", portEnd + 2);
+
+                    if (portEnd > 0)
+                    {
+                        result = uri.substring(0, portEnd) +
+                            ":"+ newPort.toString() +
+                            uri.substring(portEnd, uri.length);
+                    }
+                    else
+                    {
+                        result = uri + ":" + newPort.toString();
+                    }
                 }
                 else
                 {
-                    // relative path, "dev/foo.bar".
-                    slashPos = rootURL.lastIndexOf("/") + 1;
-                    if (slashPos <= 8)
-                    {
-                        rootURL += "/";
-                        slashPos = rootURL.length;
-                    }
-                }
-
-                if (slashPos > 0)
-                    url = rootURL.substring(0, slashPos) + url;
-            }
-        }
-
-        return url;
-    }
-
-    // Note: The following code was copied from Flash Remoting's
-    // NetServices client components.
-    // It is reproduced here to keep the services APIs
-    // independent of the deprecated NetServices code.
-    // Note that it capitalizes any use of URL in method or class names.
-
-    /**
-     *  Determines if the URL uses the HTTP, HTTPS, or RTMP protocol.
-     *
-     *  @param url The URL to analyze.
-     *
-     *  @return true if the URL starts with "http://", "https://", or "rtmp://".
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function isHttpURL(url:String):Boolean
-    {
-        return url != null &&
-               (url.indexOf("http://") == 0 ||
-                url.indexOf("https://") == 0);
-    }
-
-    /**
-     *  Determines if the URL uses the secure HTTPS protocol.
-     *
-     *  @param url The URL to analyze.
-     *
-     *  @return true if the URL starts with "https://".
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function isHttpsURL(url:String):Boolean
-    {
-        return url != null && url.indexOf("https://") == 0;
-    }
-
-    /**
-     *  Returns the protocol section of the specified URL.
-     *  The following examples show what is returned based on different URLs:
-     *
-     *

-     *  getProtocol("https://localhost:2700/") returns "https"
-     *  getProtocol("rtmp://www.myCompany.com/myMainDirectory/groupChatApp/HelpDesk") returns "rtmp"
-     *  getProtocol("rtmpt:/sharedWhiteboardApp/June2002") returns "rtmpt"
-     *  getProtocol("rtmp::1234/chatApp/room_name") returns "rtmp"
-     *

-     *
-     *  @param url String containing the URL to parse.
-     *
-     *  @return The protocol or an empty String if no protocol is specified.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function getProtocol(url:String):String
-    {
-        var slash:int = url.indexOf("/");
-        var indx:int = url.indexOf(":/");
-        if (indx > -1 && indx < slash)
-        {
-            return url.substring(0, indx);
-        }
-        else
-        {
-            indx = url.indexOf("::");
-            if (indx > -1 && indx < slash)
-                return url.substring(0, indx);
-        }
-
-        return "";
-    }
-
-    /**
-     *  Replaces the protocol of the
-     *  specified URI with the given protocol.
-     *
-     *  @param uri String containing the URI in which the protocol
-     *  needs to be replaced.
-     *
-     *  @param newProtocol String containing the new protocol to use.
-     *
-     *  @return The URI with the protocol replaced,
-     *  or an empty String if the URI does not contain a protocol.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function replaceProtocol(uri:String,
-                                           newProtocol:String):String
-    {
-        return uri.replace(getProtocol(uri), newProtocol);
-    }
-
-    /**
-     *  Returns a new String with the port replaced with the specified port.
-     *  If there is no port in the specified URI, the port is inserted.
-     *  This method expects that a protocol has been specified within the URI.
-     *
-     *  @param uri String containing the URI in which the port is replaced.
-     *  @param newPort uint containing the new port to subsitute.
-     *
-     *  @return The URI with the new port.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function replacePort(uri:String, newPort:uint):String
-    {
-        var result:String = "";
-
-        // First, determine if IPv6 is in use by looking for square bracket
-        var indx:int = uri.indexOf("]");
-
-        // If IPv6 is not in use, reset indx to the first colon
-        if (indx == -1)
-            indx = uri.indexOf(":");
-
-        var portStart:int = uri.indexOf(":", indx+1);
-        var portEnd:int;
-
-        // If we have a port
-        if (portStart > -1)
-        {
-            portStart++; // move past the ":"
-            portEnd = uri.indexOf("/", portStart);
-            //@TODO: need to throw an invalid uri here if no slash was found
-            result = uri.substring(0, portStart) +
-                     newPort.toString() +
-                     uri.substring(portEnd, uri.length);
-        }
-        else
-        {
-            // Insert the specified port
-            portEnd = uri.indexOf("/", indx);
-            if (portEnd > -1)
-            {
-                // Look to see if we have protocol://host:port/
-                // if not then we must have protocol:/relative-path
-                if (uri.charAt(portEnd+1) == "/")
-                    portEnd = uri.indexOf("/", portEnd + 2);
-
-                if (portEnd > 0)
-                {
-                    result = uri.substring(0, portEnd) +
-                             ":"+ newPort.toString() +
-                             uri.substring(portEnd, uri.length);
+                    result = uri + ":"+ newPort.toString();
+                }
+            }
+
+            return result;
+        }
+
+        /**
+         *  Returns a new String with the port and server tokens replaced with
+         *  the port and server from the currently running application.
+         *
+         *  @param url String containing the SERVER_NAME_TOKEN and/or SERVER_NAME_PORT
+         *  which should be replaced by the port and server from the application.
+         *
+         *  @return The URI with the port and server replaced.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function replaceTokens(url:String):String
+        {
+            var loaderURL:String = LoaderConfig.url == null ? "" : LoaderConfig.url;
+
+            // if the LoaderConfig.url hasn't been configured yet we need to
+            // throw, informing the user that this value must be setup first
+            // TODO: add this back in after each new player build
+            //if (LoaderConfig.url == null)
+            //    trace("WARNING: LoaderConfig.url hasn't been initialized.");
+
+            // Replace {server.name}
+            if (url.indexOf(SERVER_NAME_TOKEN) > 0)
+            {
+                loaderURL = URLUtil.replaceEncodedSquareBrackets(loaderURL);
+                var loaderProtocol:String = URLUtil.getProtocol(loaderURL);
+                var loaderServerName:String = "localhost";
+                if (loaderProtocol.toLowerCase() != "file")
+                    loaderServerName = URLUtil.getServerName(loaderURL);
+
+                url = url.replace(SERVER_NAME_REGEX, loaderServerName);
+            }
+
+            // Replace {server.port} either with the loader's port, or
+            // remove it and the proceeding token if a port is not
+            // specified for the SWF Loader.
+            var portToken:int = url.indexOf(SERVER_PORT_TOKEN);
+            if (portToken > 0)
+            {
+                var loaderPort:uint = URLUtil.getPort(loaderURL);
+                if (loaderPort > 0)
+                {
+                    url = url.replace(SERVER_PORT_REGEX, loaderPort);
                 }
                 else
                 {
-                    result = uri + ":" + newPort.toString();
-                }
-            }
-            else
-            {
-                result = uri + ":"+ newPort.toString();
-            }
-        }
-
-        return result;
-    }
-
-    /**
-     *  Returns a new String with the port and server tokens replaced with
-     *  the port and server from the currently running application.
-     *
-     *  @param url String containing the SERVER_NAME_TOKEN and/or SERVER_NAME_PORT
-     *  which should be replaced by the port and server from the application.
-     *
-     *  @return The URI with the port and server replaced.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function replaceTokens(url:String):String
-    {
-        var loaderURL:String = LoaderConfig.url == null ? "" : LoaderConfig.url;
-
-        // if the LoaderConfig.url hasn't been configured yet we need to
-        // throw, informing the user that this value must be setup first
-        // TODO: add this back in after each new player build
-        //if (LoaderConfig.url == null)
-        //    trace("WARNING: LoaderConfig.url hasn't been initialized.");
-
-        // Replace {server.name}
-        if (url.indexOf(SERVER_NAME_TOKEN) > 0)
-        {
-            var loaderProtocol:String = URLUtil.getProtocol(loaderURL);
-            var loaderServerName:String = "localhost";
-            if (loaderProtocol.toLowerCase() != "file")
-                loaderServerName = URLUtil.getServerName(loaderURL);
-
-            url = url.replace(SERVER_NAME_REGEX, loaderServerName);
-        }
-
-        // Replace {server.port} either with the loader's port, or
-        // remove it and the proceeding token if a port is not
-        // specified for the SWF Loader.
-        var portToken:int = url.indexOf(SERVER_PORT_TOKEN);
-        if (portToken > 0)
-        {
-            var loaderPort:uint = URLUtil.getPort(loaderURL);
-            if (loaderPort > 0)
-            {
-                url = url.replace(SERVER_PORT_REGEX, loaderPort);
-            }
-            else
-            {
-                if (url.charAt(portToken - 1) == ":")
-                    url = url.substring(0, portToken - 1) + url.substring(portToken);
-
-                url = url.replace(SERVER_PORT_REGEX, "");
-            }
-        }
-
-        return url;
-    }
-
-    /**
-     * Tests whether two URI Strings are equivalent, ignoring case and
-     * differences in trailing slashes.
-     *
-     *  @param uri1 The first URI to compare.
-     *  @param uri2 The second URI to compare.
-     *
-     *  @return true if the URIs are equal. Otherwise, false.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function urisEqual(uri1:String, uri2:String):Boolean
-    {
-        if (uri1 != null && uri2 != null)
-        {
-            uri1 = StringUtil.trim(uri1).toLowerCase();
-            uri2 = StringUtil.trim(uri2).toLowerCase();
-
-            if (uri1.charAt(uri1.length - 1) != "/")
-                uri1 = uri1 + "/";
-
-            if (uri2.charAt(uri2.length - 1) != "/")
-                uri2 = uri2 + "/";
-        }
-
-        return uri1 == uri2;
-    }
-
-    /**
-     * Given a url, determines whether the url contains the server.name and
-     * server.port tokens.
-     *
-     * @return true if the url contains server.name and server.port tokens.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    public static function hasTokens(url:String):Boolean
-    {
-        if (url == null || url == "")
+                    if (url.charAt(portToken - 1) == ":")
+                        url = url.substring(0, portToken - 1) + url.substring(portToken);
+
+                    url = url.replace(SERVER_PORT_REGEX, "");
+                }
+            }
+
+            return url;
+        }
+
+        /**
+         * Tests whether two URI Strings are equivalent, ignoring case and
+         * differences in trailing slashes.
+         *
+         *  @param uri1 The first URI to compare.
+         *  @param uri2 The second URI to compare.
+         *
+         *  @return true if the URIs are equal. Otherwise, false.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function urisEqual(uri1:String, uri2:String):Boolean
+        {
+            if (uri1 != null && uri2 != null)
+            {
+                uri1 = StringUtil.trim(uri1).toLowerCase();
+                uri2 = StringUtil.trim(uri2).toLowerCase();
+
+                if (uri1.charAt(uri1.length - 1) != "/")
+                    uri1 = uri1 + "/";
+
+                if (uri2.charAt(uri2.length - 1) != "/")
+                    uri2 = uri2 + "/";
+            }
+
+            return uri1 == uri2;
+        }
+
+        /**
+         * Given a url, determines whether the url contains the server.name and
+         * server.port tokens.
+         *
+         * @return true if the url contains server.name and server.port tokens.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function hasTokens(url:String):Boolean
+        {
+            if (url == null || url == "")
+                return false;
+            if (url.indexOf(SERVER_NAME_TOKEN) > 0)
+                return true;
+            if (url.indexOf(SERVER_PORT_TOKEN) > 0)
+                return true;
             return false;
-        if (url.indexOf(SERVER_NAME_TOKEN) > 0)
-            return true;
-        if (url.indexOf(SERVER_PORT_TOKEN) > 0)
-            return true;
-        return false;
-    }
-
-    /**
-     * If the LoaderConfig.url property is not available, the replaceTokens() method will not
-     * replace the server name and port properties properly.
-     *
-     * @return true if the LoaderConfig.url property is not available. Otherwise, false.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function hasUnresolvableTokens():Boolean
-    {
-        return LoaderConfig.url != null;
-    }
-
-    /**
-     *  The pattern in the String that is passed to the replaceTokens() method that
-     *  is replaced by the application's server name.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static const SERVER_NAME_TOKEN:String = "{server.name}";
-
-    /**
-     *  The pattern in the String that is passed to the replaceTokens() method that
-     *  is replaced by the application's port.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static const SERVER_PORT_TOKEN:String = "{server.port}";
-
-    /**
-     *  Enumerates an object's dynamic properties (by using a for..in loop)
-     *  and returns a String. You typically use this method to convert an ActionScript object to a String that you then append to the end of a URL.
-     *  By default, invalid URL characters are URL-encoded (converted to the %XX format).
-     *
-     *
For example:
-     *

-     *  var o:Object = { name: "Alex", age: 21 };
-     *  var s:String = URLUtil.objectToString(o,";",true);
-     *  trace(s);
-     *

-     *  Prints "name=Alex;age=21" to the trace log.
-     *

-     *
-     *  @param object The object to convert to a String.
-     *  @param separator The character that separates each of the object's property:value pair in the String.
-     *  @param encodeURL Whether or not to URL-encode the String.
-     *
-     *  @return The object that was passed to the method.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function objectToString(object:Object, separator:String=';',
-                                encodeURL:Boolean = true):String
-    {
-        var s:String = internalObjectToString(object, separator, null, encodeURL);
-        return s;
-    }
-
-    private static function internalObjectToString(object:Object, separator:String, prefix:String, encodeURL:Boolean):String
-    {
-        var s:String = "";
-        var first:Boolean = true;
-
-        for (var p:String in object)
-        {
-            if (first)
-            {
-                first = false;
-            }
-            else
-                s += separator;
-
-            var value:Object = object[p];
-            var name:String = prefix ? prefix + "." + p : p;
-            if (encodeURL)
-                name = encodeURIComponent(name);
-
-            if (value is String)
-            {
-                s += name + '=' + (encodeURL ? encodeURIComponent(value as String) : value);
-            }
-            else if (value is Number)
-            {
-                value = value.toString();
+        }
+
+        /**
+         * If the LoaderConfig.url property is not available, the replaceTokens() method will not
+         * replace the server name and port properties properly.
+         *
+         * @return true if the LoaderConfig.url property is not available. Otherwise, false.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function hasUnresolvableTokens():Boolean
+        {
+            return LoaderConfig.url != null;
+        }
+
+        /**
+         *  The pattern in the String that is passed to the replaceTokens() method that
+         *  is replaced by the application's server name.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static const SERVER_NAME_TOKEN:String = "{server.name}";
+
+        /**
+         *  The pattern in the String that is passed to the replaceTokens() method that
+         *  is replaced by the application's port.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static const SERVER_PORT_TOKEN:String = "{server.port}";
+
+        /**
+         *  Enumerates an object's dynamic properties (by using a for..in loop)
+         *  and returns a String. You typically use this method to convert an ActionScript object to a String that you then append to the end of a URL.
+         *  By default, invalid URL characters are URL-encoded (converted to the %XX format).
+         *
+         *
For example:
+         *

+         *  var o:Object = { name: "Alex", age: 21 };
+         *  var s:String = URLUtil.objectToString(o,";",true);
+         *  trace(s);
+         *

+         *  Prints "name=Alex;age=21" to the trace log.
+         *

+         *
+         *  @param object The object to convert to a String.
+         *  @param separator The character that separates each of the object's property:value pair in the String.
+         *  @param encodeURL Whether or not to URL-encode the String.
+         *
+         *  @return The object that was passed to the method.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function objectToString(object:Object, separator:String=';',
+                                              encodeURL:Boolean = true):String
+        {
+            var s:String = internalObjectToString(object, separator, null, encodeURL);
+            return s;
+        }
+
+        private static function indexOfLeftSquareBracket(value:String):int
+        {
+            var delim:int = value.indexOf(SQUARE_BRACKET_LEFT);
+            if (delim == -1)
+                delim = value.indexOf(SQUARE_BRACKET_LEFT_ENCODED);
+            return delim;
+        }
+
+        private static function internalObjectToString(object:Object, separator:String, prefix:String, encodeURL:Boolean):String
+        {
+            var s:String = "";
+            var first:Boolean = true;
+
+            for (var p:String in object)
+            {
+                if (first)
+                {
+                    first = false;
+                }
+                else
+                    s += separator;
+
+                var value:Object = object[p];
+                var name:String = prefix ? prefix + "." + p : p;
                 if (encodeURL)
-                    value = encodeURIComponent(value as String);
-
-                s += name + '=' + value;
-            }
-            else if (value is Boolean)
-            {
-                s += name + '=' + (value ? "true" : "false");
-            }
-            else
-            {
-                if (value is Array)
-                {
-                    s += internalArrayToString(value as Array, separator, name, encodeURL);
-                }
-                else // object
-                {
-                    s += internalObjectToString(value, separator, name, encodeURL);
-                }
-            }
-        }
-        return s;
-    }
-
-    private static function internalArrayToString(array:Array, separator:String, prefix:String, encodeURL:Boolean):String
-    {
-        var s:String = "";
-        var first:Boolean = true;
-
-        var n:int = array.length;
-        for (var i:int = 0; i < n; i++)
-        {
-            if (first)
-            {
-                first = false;
-            }
-            else
-                s += separator;
-
-            var value:Object = array[i];
-            var name:String = prefix + "." + i;
-            if (encodeURL)
-                name = encodeURIComponent(name);
-
-            if (value is String)
-            {
-                s += name + '=' + (encodeURL ? encodeURIComponent(value as String) : value);
-            }
-            else if (value is Number)
-            {
-                value = value.toString();
+                    name = encodeURIComponent(name);
+
+                if (value is String)
+                {
+                    s += name + '=' + (encodeURL ? encodeURIComponent(value as String) : value);
+                }
+                else if (value is Number)
+                {
+                    value = value.toString();
+                    if (encodeURL)
+                        value = encodeURIComponent(value as String);
+
+                    s += name + '=' + value;
+                }
+                else if (value is Boolean)
+                {
+                    s += name + '=' + (value ? "true" : "false");
+                }
+                else
+                {
+                    if (value is Array)
+                    {
+                        s += internalArrayToString(value as Array, separator, name, encodeURL);
+                    }
+                    else // object
+                    {
+                        s += internalObjectToString(value, separator, name, encodeURL);
+                    }
+                }
+            }
+            return s;
+        }
+
+        private static function replaceEncodedSquareBrackets(value:String):String
+        {
+            var rightIndex:int = value.indexOf(SQUARE_BRACKET_RIGHT_ENCODED);
+            if (rightIndex > -1)
+            {
+                value = value.replace(SQUARE_BRACKET_RIGHT_ENCODED, SQUARE_BRACKET_RIGHT);
+                var leftIndex:int = value.indexOf(SQUARE_BRACKET_LEFT_ENCODED);
+                if (leftIndex > -1)
+                    value = value.replace(SQUARE_BRACKET_LEFT_ENCODED, SQUARE_BRACKET_LEFT);
+            }
+            return value;
+        }
+
+        private static function internalArrayToString(array:Array, separator:String, prefix:String, encodeURL:Boolean):String
+        {
+            var s:String = "";
+            var first:Boolean = true;
+
+            var n:int = array.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                if (first)
+                {
+                    first = false;
+                }
+                else
+                    s += separator;
+
+                var value:Object = array[i];
+                var name:String = prefix + "." + i;
                 if (encodeURL)
-                    value = encodeURIComponent(value as String);
-
-                s += name + '=' + value;
-            }
-            else if (value is Boolean)
-            {
-                s += name + '=' + (value ? "true" : "false");
-            }
-            else
-            {
-                if (value is Array)
-                {
-                    s += internalArrayToString(value as Array, separator, name, encodeURL);
-                }
-                else // object
-                {
-                    s += internalObjectToString(value, separator, name, encodeURL);
-                }
-            }
-        }
-        return s;
-    }
-
-    /**
-     *  Returns an object from a String. The String contains name=value pairs, which become dynamic properties
-     *  of the returned object. These property pairs are separated by the specified separator.
-     *  This method converts Numbers and Booleans, Arrays (defined by "[]"),
-     *  and sub-objects (defined by "{}"). By default, URL patterns of the format %XX are converted
-     *  to the appropriate String character.
-     *
-     *
For example:
-     *

-     *  var s:String = "name=Alex;age=21";
-     *  var o:Object = URLUtil.stringToObject(s, ";", true);
-     *

-     *
-     *  Returns the object: { name: "Alex", age: 21 }.
-     *

-     *
-     *  @param string The String to convert to an object.
-     *  @param separator The character that separates name=value pairs in the String.
-     *  @param decodeURL Whether or not to decode URL-encoded characters in the String.
-     *
-     *  @return The object containing properties and values extracted from the String passed to this method.
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 9
-     *  @playerversion AIR 1.1
-     *  @productversion Flex 3
-     */
-    public static function stringToObject(string:String, separator:String = ";",
-                                decodeURL:Boolean = true):Object
-    {
-        var o:Object = {};
-
-        var arr:Array = string.split(separator);
-
-        // if someone has a name or value that contains the separator
-        // this will not work correctly, nor will it work well if there are
-        // '=' or '.' in the name or value
-
-        var n:int = arr.length;
-        for (var i:int = 0; i < n; i++)
-        {
-            var pieces:Array = arr[i].split('=');
-            var name:String = pieces[0];
-            if (decodeURL)
-                name = decodeURIComponent(name);
-
-            var value:Object = pieces[1];
-            if (decodeURL)
-                value = decodeURIComponent(value as String);
-
-            if (value == "true")
-                value = true;
-            else if (value == "false")
-                value = false;
-            else
-            {
-                var temp:Object = int(value);
-                if (temp.toString() == value)
-                    value = temp;
+                    name = encodeURIComponent(name);
+
+                if (value is String)
+                {
+                    s += name + '=' + (encodeURL ? encodeURIComponent(value as String) : value);
+                }
+                else if (value is Number)
+                {
+                    value = value.toString();
+                    if (encodeURL)
+                        value = encodeURIComponent(value as String);
+
+                    s += name + '=' + value;
+                }
+                else if (value is Boolean)
+                {
+                    s += name + '=' + (value ? "true" : "false");
+                }
                 else
                 {
-                    temp = Number(value)
+                    if (value is Array)
+                    {
+                        s += internalArrayToString(value as Array, separator, name, encodeURL);
+                    }
+                    else // object
+                    {
+                        s += internalObjectToString(value, separator, name, encodeURL);
+                    }
+                }
+            }
+            return s;
+        }
+
+        /**
+         *  Returns an object from a String. The String contains name=value pairs, which become dynamic properties
+         *  of the returned object. These property pairs are separated by the specified separator.
+         *  This method converts Numbers and Booleans, Arrays (defined by "[]"),
+         *  and sub-objects (defined by "{}"). By default, URL patterns of the format %XX are converted
+         *  to the appropriate String character.
+         *
+         *
For example:
+         *

+         *  var s:String = "name=Alex;age=21";
+         *  var o:Object = URLUtil.stringToObject(s, ";", true);
+         *

+         *
+         *  Returns the object: { name: "Alex", age: 21 }.
+         *

+         *
+         *  @param string The String to convert to an object.
+         *  @param separator The character that separates name=value pairs in the String.
+         *  @param decodeURL Whether or not to decode URL-encoded characters in the String.
+         *
+         *  @return The object containing properties and values extracted from the String passed to this method.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 9
+         *  @playerversion AIR 1.1
+         *  @productversion Flex 3
+         */
+        public static function stringToObject(string:String, separator:String = ";",
+                                              decodeURL:Boolean = true):Object
+        {
+            var o:Object = {};
+
+            var arr:Array = string.split(separator);
+
+            // if someone has a name or value that contains the separator
+            // this will not work correctly, nor will it work well if there are
+            // '=' or '.' in the name or value
+
+            var n:int = arr.length;
+            for (var i:int = 0; i < n; i++)
+            {
+                var pieces:Array = arr[i].split('=');
+                var name:String = pieces[0];
+                if (decodeURL)
+                    name = decodeURIComponent(name);
+
+                var value:Object = pieces[1];
+                if (decodeURL)
+                    value = decodeURIComponent(value as String);
+
+                if (value == "true")
+                    value = true;
+                else if (value == "false")
+                    value = false;
+                else
+                {
+                    var temp:Object = int(value);
                     if (temp.toString() == value)
                         value = temp;
-                }
-            }
-
-            var obj:Object = o;
-
-            pieces = name.split('.');
-            var m:int = pieces.length;
-            for (var j:int = 0; j < m - 1; j++)
-            {
-                var prop:String = pieces[j];
-                if (obj[prop] == null && j < m - 1)
-                {
-                    var subProp:String = pieces[j + 1];
-                    var idx:Object = int(subProp);
-                    if (idx.toString() == subProp)
-                        obj[prop] = [];
                     else
-                        obj[prop] = {};
-                }
-                obj = obj[prop];
-            }
-            obj[pieces[j]] = value;
-        }
-
-        return o;
+                    {
+                        temp = Number(value)
+                        if (temp.toString() == value)
+                            value = temp;
+                    }
+                }
+
+                var obj:Object = o;
+
+                pieces = name.split('.');
+                var m:int = pieces.length;
+                for (var j:int = 0; j < m - 1; j++)
+                {
+                    var prop:String = pieces[j];
+                    if (obj[prop] == null && j < m - 1)
+                    {
+                        var subProp:String = pieces[j + 1];
+                        var idx:Object = int(subProp);
+                        if (idx.toString() == subProp)
+                            obj[prop] = [];
+                        else
+                            obj[prop] = {};
+                    }
+                    obj = obj[prop];
+                }
+                obj[pieces[j]] = value;
+            }
+
+            return o;
+        }
+
+        // Reusable reg-exp for token replacement. The . means any char, so this means
+        // we should handle server.name and server-name, etc...
+        private static const SERVER_NAME_REGEX:RegExp = new RegExp("\\{server.name\\}", "g");
+        private static const SERVER_PORT_REGEX:RegExp = new RegExp("\\{server.port\\}", "g");
     }
-
-    // Reusable reg-exp for token replacement. The . means any char, so this means
-    // we should handle server.name and server-name, etc...
-    private static const SERVER_NAME_REGEX:RegExp = new RegExp("\\{server.name\\}", "g");
-    private static const SERVER_PORT_REGEX:RegExp = new RegExp("\\{server.port\\}", "g");
-}
-
-}
+
+}


BugFix: target is undefined

BugFix: target is undefined

target is aliased by the variable named target in the for loop higher up in the function. as3 is function scoped not block scoped.

--- src/aze/motion/EazeTween.as
+++ src/aze/motion/EazeTween.as
@@ -299,7 +299,7 @@
 					configureTarget(target, newState, duration, reversed);
 				}
 			} else {
-				configureTarget(target, newState, duration, reversed);
+				configureTarget(this.target, newState, duration, reversed);
 			}

 		}


changed override removeChild function to just trace the error

--- WeaveUISpark/src/weave/ui/BasicLinkableLayoutManager.as
+++ WeaveUISpark/src/weave/ui/BasicLinkableLayoutManager.as
@@ -16,6 +16,7 @@
 package weave.ui
 {
 	import flash.display.DisplayObject;
+	import flash.system.Capabilities;
 	import flash.utils.Dictionary;

 	import mx.core.IVisualElement;
@@ -42,7 +43,13 @@

 		override public function removeChild(child:DisplayObject):DisplayObject
 		{
-			return removeElement(child as IVisualElement) as DisplayObject;
+			try {
+				return super.removeChild(child);
+			} catch (e:Error) {
+				if (Capabilities.isDebugger)
+					trace(e.getStackTrace());
+			}
+			return null;
 		}

 		private var _idToComponent:Object = {}; // String -> IVisualElement


Transferred from the Adobe Open Source Subversion Repository

Revision: 16701
Author:   chiedozi@adobe.com
Date:     2010-06-28T17:56:43.150926Z

Log Message:
-----------
Fixed a RTE that occurred when you launched a MobileApplication for the first time with session caching enabled.

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/core/managers/PersistenceManager.as</path>

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

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -618,8 +618,11 @@

                     if (persistenceManager.enabled)
                     {
-                        navigator.selectedIndex = persistenceManager.getProperty("selectedSection") as Number;
+                        var selectedSection:Number = persistenceManager.getProperty("selectedSection") as Number;

+                        if (selectedSection && selectedSection > 0 && selectedSection < savedSections.length)
+                            navigator.selectedIndex = selectedSection;
+
                         if (navigator.tabBar)
                             navigator.tabBar.selectedIndex = navigator.selectedIndex;
                     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 20073
Author:   rfrishbe@adobe.com
Date:     2011-02-02T22:32:18.438038Z

Log Message:
-----------
Fixing up TextArea ScrollBar thumbs so that they are an appropriate minimum size.

QE notes: -
Doc notes:
Bugs: SDK-29175
Reviewer: Eric Day
Tests run: checkintests
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaVScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaHScrollBarThumbSkin.as
@@ -1,10 +1,39 @@
 package spark.skins.mobile
 {
 import mx.core.DPIClassification;
+import mx.core.mx_internal;

+use namespace mx_internal;

 public class TextAreaHScrollBarThumbSkin extends HScrollBarThumbSkin
 {
+    //--------------------------------------------------------------------------
+    //
+    //  Class constants
+    //
+    //--------------------------------------------------------------------------
+
+    // These constants are also accessed from HScrollBarSkin
+    mx_internal static const PADDING_BOTTOM_320DPI:int = 8;
+    mx_internal static const PADDING_HORIZONTAL_320DPI:int = 12;
+    mx_internal static const PADDING_BOTTOM_240DPI:int = 6;
+    mx_internal static const PADDING_HORIZONTAL_240DPI:int = 6;
+    mx_internal static const PADDING_BOTTOM_DEFAULTDPI:int = 4;
+    mx_internal static const PADDING_HORIZONTAL_DEFAULTDPI:int = 6;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+    /**
+     *  Constructor.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
+     */
     public function TextAreaHScrollBarThumbSkin()
     {
         super();
@@ -14,20 +43,20 @@
         {
             case DPIClassification.DPI_320:
             {
-                paddingBottom = 8;
-                paddingHorizontal = 12;
+                paddingBottom = PADDING_BOTTOM_320DPI;
+                paddingHorizontal = PADDING_HORIZONTAL_320DPI;
                 break;
             }
             case DPIClassification.DPI_240:
             {
-                paddingBottom = 6;
-                paddingHorizontal = 6;
+                paddingBottom = PADDING_BOTTOM_240DPI;
+                paddingHorizontal = PADDING_HORIZONTAL_240DPI;
                 break;
             }
             default:
             {
-                paddingBottom = 4;
-                paddingHorizontal = 6;
+                paddingBottom = PADDING_BOTTOM_DEFAULTDPI;
+                paddingHorizontal = PADDING_HORIZONTAL_DEFAULTDPI;
                 break;
             }
         }


Transferred from the Adobe Open Source Subversion Repository

Revision: 789
Author:   mhorn@adobe.com
Date:     2008-03-12T17:27:25.160912Z

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/MenuBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/HRule.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>

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

--- frameworks/projects/mx/src/mx/controls/MenuBar.as
+++ frameworks/projects/mx/src/mx/controls/MenuBar.as
@@ -351,7 +351,7 @@
     //--------------------------------------------------------------------------

     /**
-     *  Constructor
+     *  Constructor.
      */
     public function MenuBar()
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 7036
Author:   jimurphy@adobe.com
Date:     2009-05-18T16:23:35.783417Z

Log Message:
-----------
Merged 3.x revisions 6955,6995,6997-7002 -> trunk

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Application.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/RichTextEditor.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ColorPicker.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ToolTipBorder.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/SchemaMarshaller.as</path>

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


replace class Version by core.version

replace class Version by core.version

--- src/com/google/analytics/core/BrowserInfo.as
+++ src/com/google/analytics/core/BrowserInfo.as
@@ -22,12 +22,10 @@
 {
     import com.google.analytics.utils.Environment;
     import com.google.analytics.utils.Variables;
-    import com.google.analytics.utils.Version;
     import com.google.analytics.v4.Configuration;
-
-    /**
-     * The BrowserInfo class.
-     */
+
+    import core.version;
+
     public class BrowserInfo
     {
         private var _config:Configuration;
@@ -97,7 +95,7 @@
         {
             if( _config.detectFlash )
             {
-                var v:Version = _info.flashVersion;
+                var v:version = _info.flashVersion;
                 return v.major+"."+v.minor+" r"+v.build;
             }


minor fixes

minor fixes

--- hidapi/hidapi_ane/src/com/hidapi/HidDeviceInfo.as
+++ hidapi/hidapi_ane/src/com/hidapi/HidDeviceInfo.as
@@ -7,7 +7,7 @@
 {
     /**
      * HID device descriptor
-     * its public because instances are created in dll.
+     * its public because instances are created in native code.
      * @private
      */
     public class HidDeviceInfo implements IHIDDeviceInfo


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

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

 package mx.charts.series.renderData
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22564
Author:   tkraikit@adobe.com
Date:     2011-09-14T19:50:07.656843Z

Log Message:
-----------
Update ASDoc "@productversion Flex 4.5.2" => "@productversion Flex 4.6"

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/LabelItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/OnDemandDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DateSpinnerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/graphics/BitmapScaleMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ContentBackgroundAppearance.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/FlexVersion.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ArrowDirection.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/FormatPattern.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentNavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/CalloutArrow.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutButton.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/YearProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/calendarClasses/DateSelectorDisplayMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledBackButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListScrollerSkin.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/ScrollSnappingMode.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultTransparentActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateAndTimeProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutViewNavigatorSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/CalloutPosition.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/Scroller.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImageSource.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/DataGroup.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/SkinnablePopUpContainer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SplitViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/Callout.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/collections/NumericDataProvider.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreenImage.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/calendarClasses/DateSpinnerItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerList.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/DateSpinner.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/CalendarDate.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/CalloutSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/DefaultBeveledActionButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/SpinnerListItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/globalization/supportClasses/DateTimeFormatterEx.as</path>

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

--- frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as
+++ frameworks/projects/mobiletheme/src/spark/skins/mobile/SpinnerListContainerSkin.as
@@ -35,7 +35,7 @@
  *
  *  @langversion 3.0
  *  @playerversion AIR 3
- *  @productversion Flex 4.5.2
+ *  @productversion Flex 4.6
  */
 public class SpinnerListContainerSkin extends MobileSkin
 {
@@ -49,7 +49,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 *
 	 */
 	public function SpinnerListContainerSkin()
@@ -108,7 +108,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var borderThickness:Number;

@@ -117,7 +117,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var cornerRadius:Number;

@@ -126,7 +126,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var selectionIndicatorHeight:Number;

@@ -135,7 +135,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var borderClass:Class;

@@ -144,7 +144,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var selectionIndicatorClass:Class;

@@ -153,7 +153,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var shadowClass:Class;

@@ -162,7 +162,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var border:InteractiveObject;

@@ -171,7 +171,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var selectionIndicator:InteractiveObject;

@@ -180,7 +180,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var shadow:InteractiveObject;

@@ -189,7 +189,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	protected var contentGroupMask:Sprite;

@@ -205,7 +205,7 @@
 	 *
 	 *  @langversion 3.0
 	 *  @playerversion AIR 3
-	 *  @productversion Flex 4.5.2
+	 *  @productversion Flex 4.6
 	 */
 	public var contentGroup:Group;


Transferred from the Adobe Open Source Subversion Repository

Revision: 21584
Author:   aaltman@adobe.com
Date:     2011-07-15T22:40:24.389074Z

Log Message:
-----------
Plumbed soft keyboard hint properties from SkinnableTextBase to StageText.
Fixed some excessive padding around StageText.
Added a style to control when prompt text disappears from text controls.
Changed prompt to be a non-StageText to fix z-order issues.
Added a workaround for the lack of a StageText "enter" event (only works on Android).

QE notes: The fix for SDK-30728 is only a partial workaround. It still does not work on iOS.
Doc notes:
Bugs: SDK-30781 - iOS: SoftKeyboard hints don't appear when StageText is used on iPodTouch, and iPad2
SDK-30740 - StageText: Prompt displays over content.
SDK-30737 - SoftKeyboard does not appears on the first tap on TextInput
SDK-30736 - Text prompt disappears when text got focus
SDK-30728 - "Enter" key does not work correctly in StageText
Reviewer: aharui
Tests run: 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/supportClasses/StyleableStageText.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/StageTextSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextAreaSkin.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/core/ISoftKeyboardHintClient.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/StageTextInputSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -41,6 +41,7 @@
 import spark.components.TextSelectionHighlighting;
 import spark.core.IDisplayText;
 import spark.core.IEditableText;
+import spark.core.ISoftKeyboardHintClient;
 import spark.events.TextOperationEvent;

 use namespace mx_internal;
@@ -123,6 +124,17 @@
  *  @productversion Flex 4
  */
 [Style(name="focusColor", type="uint", format="Color", inherit="yes", theme="spark, mobile")]
+
+/**
+ *  Controls the visibility of prompt text for this component when it is empty
+ *  and focused.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 10.2
+ *  @playerversion AIR 2.5
+ *  @productversion Flex 4.5.2
+ */
+[Style(name="showPromptWhenFocused", type="Boolean", inherit="yes", theme="mobile")]

 //--------------------------------------
 //  Events
@@ -317,6 +329,26 @@
      *  @private
      */
     private static const WIDTH_IN_CHARS_PROPERTY_FLAG:uint = 1 << 14;
+
+    /**
+     *  @private
+     */
+    private static const AUTO_CAPITALIZE_FLAG:uint = 1 << 15;
+
+    /**
+     *  @private
+     */
+    private static const AUTO_CORRECT_FLAG:uint = 1 << 16;
+
+    /**
+     *  @private
+     */
+    private static const RETURN_KEY_LABEL_FLAG:uint = 1 << 17;
+
+    /**
+     *  @private
+     */
+    private static const SOFT_KEYBOARD_TYPE_FLAG:uint = 1 << 18;

     /**
      *  @private
@@ -1334,6 +1366,228 @@
         invalidateSkinState();
      }

+    //----------------------------------
+    //  Mobile soft-keyboard hints
+    //----------------------------------
+
+    //----------------------------------
+    //  autoCapitalize
+    //----------------------------------
+
+    /**
+     *  Hint indicating what captialization behavior soft keyboards should
+     *  use.
+     *
+     *  Supported values are defined in flash.text.AutoCapitalize:
+     *      "none" - no automatic capitalization
+     *      "word" - capitalize the first letter following any space or
+     *          punctuation
+     *      "sentence" - captitalize the first letter following any period
+     *      "all" - capitalize every letter
+     *
+     *
For the Desktop theme, this is not supported.

+     *
+     *  @default "none"
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get autoCapitalize():String
+    {
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (softKeyboardClient)
+            return softKeyboardClient.autoCapitalize;
+
+        var v:* = textDisplay ? undefined : textDisplayProperties.autoCapitalize;
+        return (v === undefined) ? "none" : v;
+    }
+
+    public function set autoCapitalize(value:String):void
+    {
+        if (textDisplay)
+        {
+            var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+            if (softKeyboardClient)
+                softKeyboardClient.autoCapitalize = value;
+            textDisplayProperties = BitFlagUtil.update(
+                uint(textDisplayProperties),
+                AUTO_CAPITALIZE_FLAG, true);
+        }
+        else
+        {
+            textDisplayProperties.autoCapitalize = value;
+        }
+
+        // Generate an UPDATE_COMPLETE event.
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  autoCorrect
+    //----------------------------------
+
+    /**
+     *  Hint indicating whether a soft keyboard should use its auto-correct
+     *  behavior, if supported.
+     *
For the Desktop theme, this is not supported.

+     *
+     *  @default false
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3.0
+     *  @productversion Flex 4.5.2
+     */
+    public function get autoCorrect():Boolean
+    {
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (softKeyboardClient)
+            return softKeyboardClient.autoCorrect;
+
+        var v:* = textDisplay ? undefined : textDisplayProperties.autoCorrect;
+        return (v === undefined) ? false : v;
+    }
+
+    public function set autoCorrect(value:Boolean):void
+    {
+        if (textDisplay)
+        {
+            var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+            if (softKeyboardClient)
+                softKeyboardClient.autoCorrect = value;
+            textDisplayProperties = BitFlagUtil.update(
+                uint(textDisplayProperties),
+                AUTO_CORRECT_FLAG, true);
+        }
+        else
+        {
+            textDisplayProperties.autoCorrect = value;
+        }
+
+        // Generate an UPDATE_COMPLETE event.
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  returnKeyLabel
+    //----------------------------------
+
+    /**
+     *  Hint indicating what label should be displayed for the return key on
+     *  soft keyboards.
+     *
+     *  Supported values are defined in flash.text.ReturnKeyLabel:
+     *      "default" - default icon or label text
+     *      "done" - icon or label text indicating completed text entry
+     *      "go" - icon or label text indicating that an action should start
+     *      "next" - icon or label text indicating a move to the next field
+     *      "search" - icon or label text indicating that the entered text
+     *          should be searched for
+     *
+     *
For the Desktop theme, this is not supported.

+     *
+     *  @default "default"
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3.0
+     *  @productversion Flex 4.5.2
+     */
+    public function get returnKeyLabel():String
+    {
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (softKeyboardClient)
+            return softKeyboardClient.returnKeyLabel;
+
+        var v:* = textDisplay ? undefined : textDisplayProperties.returnKeyLabel;
+        return (v === undefined) ? "default" : v;
+    }
+
+    public function set returnKeyLabel(value:String):void
+    {
+        if (textDisplay)
+        {
+            var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+            if (softKeyboardClient)
+                softKeyboardClient.returnKeyLabel = value;
+            textDisplayProperties = BitFlagUtil.update(
+                uint(textDisplayProperties),
+                RETURN_KEY_LABEL_FLAG, true);
+        }
+        else
+        {
+            textDisplayProperties.returnKeyLabel = value;
+        }
+
+        // Generate an UPDATE_COMPLETE event.
+        invalidateProperties();
+    }
+
+    //----------------------------------
+    //  softKeyboardType
+    //----------------------------------
+
+    /**
+     *  Hint indicating what kind of soft keyboard should be displayed for
+     *  this component.
+     *
+     *  Supported values are defined in flash.text.SoftKeyboardType:
+     *      "default" - the default keyboard
+     *      "punctuation" - puts the keyboard into punctuation/symbol entry
+     *          mode
+     *      "url" - present soft keys appropriate for URL entry, such as a
+     *          specialized key that inserts '.com'
+     *      "number" - puts the keyboard into numeric keypad mode
+     *      "contact" - puts the keyboard into a mode appropriate for
+     *          entering contact information
+     *      "email" - puts the keyboard into e-mail addres entry mode, which
+     *          may make it easier to enter '@' or '.com'
+     *
+     *
For the Desktop theme, this is not supported.

+     *
+     *  @default "default"
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3.0
+     *  @productversion Flex 4.5.2
+     */
+    public function get softKeyboardType():String
+    {
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (softKeyboardClient)
+            return softKeyboardClient.softKeyboardType;
+
+        var v:* = textDisplay ? undefined : textDisplayProperties.softKeyboardType;
+        return (v === undefined) ? "default" : v;
+    }
+
+    public function set softKeyboardType(value:String):void
+    {
+        if (textDisplay)
+        {
+            var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+            if (softKeyboardClient)
+                softKeyboardClient.softKeyboardType = value;
+            textDisplayProperties = BitFlagUtil.update(
+                uint(textDisplayProperties),
+                SOFT_KEYBOARD_TYPE_FLAG, true);
+        }
+        else
+        {
+            textDisplayProperties.softKeyboardType = value;
+        }
+
+        // Generate an UPDATE_COMPLETE event.
+        invalidateProperties();
+    }
+
     //--------------------------------------------------------------------------
     //
     //  Overridden methods
@@ -1489,7 +1743,10 @@
      */
     override protected function getCurrentSkinState():String
     {
-        if (focusManager && focusManager.getFocus() != focusManager.findFocusManagerComponent(this) &&
+        var showPromptWhenFocused:Boolean = getStyle("showPromptWhenFocused");
+
+        if ((showPromptWhenFocused ||
+            focusManager && focusManager.getFocus() != focusManager.findFocusManagerComponent(this)) &&
             prompt != null && prompt != "")
         {
             if (text.length == 0)
@@ -1990,6 +2247,40 @@
                 uint(newTextDisplayProperties),
                 WIDTH_IN_CHARS_PROPERTY_FLAG, true);
         }
+
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (textDisplayProperties.autoCapitalize !== undefined && softKeyboardClient)
+        {
+            softKeyboardClient.autoCapitalize = textDisplayProperties.autoCapitalize;
+            newTextDisplayProperties = BitFlagUtil.update(
+                uint(newTextDisplayProperties),
+                AUTO_CAPITALIZE_FLAG, true);
+        }
+
+        if (textDisplayProperties.autoCorrect !== undefined && softKeyboardClient)
+        {
+            softKeyboardClient.autoCorrect = textDisplayProperties.autoCorrect;
+            newTextDisplayProperties = BitFlagUtil.update(
+                uint(newTextDisplayProperties),
+                AUTO_CORRECT_FLAG, true);
+        }
+
+        if (textDisplayProperties.returnKeyLabel !== undefined && softKeyboardClient)
+        {
+            softKeyboardClient.returnKeyLabel = textDisplayProperties.returnKeyLabel;
+            newTextDisplayProperties = BitFlagUtil.update(
+                uint(newTextDisplayProperties),
+                RETURN_KEY_LABEL_FLAG, true);
+        }
+
+        if (textDisplayProperties.softKeyboardType !== undefined && softKeyboardClient)
+        {
+            softKeyboardClient.softKeyboardType = textDisplayProperties.softKeyboardType;
+            newTextDisplayProperties = BitFlagUtil.update(
+                uint(newTextDisplayProperties),
+                SOFT_KEYBOARD_TYPE_FLAG, true);
+        }

         // Switch from storing properties to bit mask of stored properties.
         textDisplayProperties = newTextDisplayProperties;
@@ -2086,6 +2377,32 @@
             WIDTH_IN_CHARS_PROPERTY_FLAG) && richEditableText)
         {
             newTextDisplayProperties.widthInChars = richEditableText.widthInChars;
+        }
+
+        var softKeyboardClient:ISoftKeyboardHintClient = textDisplay as ISoftKeyboardHintClient;
+
+        if (BitFlagUtil.isSet(uint(textDisplayProperties),
+            AUTO_CAPITALIZE_FLAG) && softKeyboardClient)
+        {
+            newTextDisplayProperties.autoCapitalize = softKeyboardClient.autoCapitalize;
+        }
+
+        if (BitFlagUtil.isSet(uint(textDisplayProperties),
+            AUTO_CORRECT_FLAG) && softKeyboardClient)
+        {
+            newTextDisplayProperties.autoCorrect = softKeyboardClient.autoCorrect;
+        }
+
+        if (BitFlagUtil.isSet(uint(textDisplayProperties),
+            RETURN_KEY_LABEL_FLAG) && softKeyboardClient)
+        {
+            newTextDisplayProperties.returnKeyLabel = softKeyboardClient.returnKeyLabel;
+        }
+
+        if (BitFlagUtil.isSet(uint(textDisplayProperties),
+            SOFT_KEYBOARD_TYPE_FLAG) && softKeyboardClient)
+        {
+            newTextDisplayProperties.softKeyboardType = softKeyboardClient.softKeyboardType;
         }

         // Switch from storing bit mask to storing properties.
@@ -2261,6 +2578,13 @@
         // The text component has changed.  Generate an UPDATE_COMPLETE event.
         invalidateDisplayList();

+        // We may have gone from empty to non-empty or vice-versa. This should
+        // cause the prompt to show or hide.
+        if (prompt != null && prompt != "" && skin &&
+            (skin.currentState.indexOf("WithPrompt") != -1 && text.length != 0 ||
+            skin.currentState.indexOf("WithPrompt") == -1 && text.length == 0))
+            invalidateSkinState();
+
         // Redispatch the event that came from the RichEditableText.
         dispatchEvent(event);
     }


Increment version to 2.5.1

Increment version to 2.5.1

Fix chrome 48 beacons

--- src/org/openvv/OVVAsset.as
+++ src/org/openvv/OVVAsset.as
@@ -102,7 +102,7 @@
          * Hold OVV version. Will past to JavaScript as well $ovv.version
          */

-        public static const RELEASE_VERSION: String = "2.5";
+        public static const RELEASE_VERSION: String = "2.5.1";

         ////////////////////////////////////////////////////////////


Fixed MAnagedObjectId package

Fixed MAnagedObjectId package

--- src/Modi/ManagedObjectId.as
+++ src/Modi/ManagedObjectId.as
@@ -6,7 +6,7 @@
  * Copyright 2012. Vjekoslav Krajacic, Tomislav Podhraski
  */

-package Modi.classes
+package Modi
 {
 	import Modi.ManagedObject;


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

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


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

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

 package mx.events
 {


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

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

 package mx.skins.halo
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 13038
Author:   hneelu@adobe.com
Date:     2009-12-17T09:45:13.816497Z

Log Message:
-----------
Reverting P4 changes made for automation project.

Modified Paths:
--------------
228 paths were modified

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

--- frameworks/projects/automation/src/mx/automation/delegates/DragManagerAutomationImpl.as
+++ frameworks/projects/automation/src/mx/automation/delegates/DragManagerAutomationImpl.as
@@ -191,7 +191,8 @@
 			var p:Point;

 			// code modified to avoid the usage of getAutomationChildAt in a loop.
-			var childList:Array = delegate.getAutomationChildren();
+			//var childList:Array = delegate.getAutomationChildren();
+			var childList:Array =  Automation.automationManager2.getAutomationChildrenArray(delegate);
 			var n:int = childList ? childList.length:0;
 			for (var i:int = 0; i < n; ++i)
 			{
@@ -504,7 +505,8 @@
 				var maxY:int = 0;
 				// code modified below to avoid the usage of numAutomationChildren and
 				// getAutomationChildAt in a loop
-				var childList:Array = delegate.getAutomationChildren();
+				//var childList:Array = delegate.getAutomationChildren();
+				var childList:Array =  Automation.automationManager2.getAutomationChildrenArray(delegate);
 				var numAChildCount:int =  childList ? childList.length :0 ;

 				// if (realTarget is DisplayObjectContainer &&delegate.numAutomationChildren != 0)


Fix anonymous rooms; more JID escaping fallout

git-svn-id: c197267f952b24206666de142881703007ca05d5@10626 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/jivesoftware/xiff/conference/Room.as
+++ src/org/jivesoftware/xiff/conference/Room.as
@@ -1148,7 +1148,7 @@
 	  		else if( aPresence.type != Presence.UNAVAILABLE_TYPE )
 	  		{
 		 		// We didn't know about this occupant yet, so we add them, then let everyone know that we did.
-		 		addItem( new RoomOccupant(userNickname, aPresence.show, item.affiliation, item.role, item.jid.unescaped, this) );
+		 		addItem( new RoomOccupant(userNickname, aPresence.show, item.affiliation, item.role, item.jid ? item.jid.unescaped : null, this) );

 				e = new RoomEvent(RoomEvent.USER_JOIN);
 				e.nickname = userNickname;


Include the room's JID in a Room's item data. This helps clients to correlate room occupants with the rooms they occupy (for example when a moderator kicks a user from the client). Also, when a user is kicked we only dispatch USER_KICKED, and not USER_DEPARTED in addition.

git-svn-id: c197267f952b24206666de142881703007ca05d5@9840 b35dd754-fafc-0310-a699-88a17e54d16e

--- src/org/jivesoftware/xiff/conference/Room.as
+++ src/org/jivesoftware/xiff/conference/Room.as
@@ -1057,6 +1057,13 @@
 		        	if( aPresence.type == Presence.UNAVAILABLE_TYPE ) {
 						//trace("Room: updateRoomRoster: leaving room: " + userNickname);

+						var user:MUCUserExtension = aPresence.getAllExtensionsByNS(MUCUserExtension.NS)[0];
+						if (user.statusCode == 307) {
+							// User left as a result of a kick, so no need to dispatch a USER_DEPARTURE event as we already dispatched USER_KICKED
+							removeItemAt(i);
+							return;
+						}
+
                         // Notify listeners that a user has left the room
 		           		e = new RoomEvent(RoomEvent.USER_DEPARTURE);
 		            	e.nickname = userNickname
@@ -1089,7 +1096,8 @@

 		private function addToRoomRoster( nickname:String, show:String, affiliation:String, role:String, jid:String ):void
 		{
-			addItem({nickname:nickname, show:show, affiliation:affiliation, role:role, jid:jid});
+			// Here we add roomJid:myJID to facilitate clients in correlating room occupants with rooms.
+			addItem({nickname:nickname, show:show, affiliation:affiliation, role:role, jid:jid, roomJid:myJID});
 		}

 		/**


now using async task w/ immediate priority for unbusy trigger

Change-Id: I63598d67a0a0dfdd9f3cb0e523390e0b6d72d75e

--- WeaveCore/src/weave/core/SessionManager.as
+++ WeaveCore/src/weave/core/SessionManager.as
@@ -694,7 +694,6 @@
 		private const _d2dTaskOwner:Dictionary2D = new Dictionary2D(false, true); // task cannot use weak pointer because it may be a function
 		private const _dBusyTraversal:Dictionary = new Dictionary(true); // ILinkableObject -> Boolean
 		private const _aBusyTraversal:Array = [];
-		private var _unbusyTriggerInitialized:Boolean = false;
 		private const _dUnbusyTriggerCounts:Dictionary = new Dictionary(true); // ILinkableObject -> int
 		private const _dUnbusyStackTraces:Dictionary = new Dictionary(true); // ILinkableObject -> String

@@ -748,12 +747,6 @@
 			if (!dOwner)
 				return;

-			if (!_unbusyTriggerInitialized)
-			{
-				WeaveAPI.StageUtils.addEventCallback(Event.ENTER_FRAME, null, unbusyTrigger);
-				_unbusyTriggerInitialized = true;
-			}
-
 			delete _d2dTaskOwner.dictionary[taskToken];
 			nextOwner: for (var owner:* in dOwner)
 			{
@@ -766,6 +759,7 @@

 				// when there are no more tasks, check later to see if callbacks trigger
 				_dUnbusyTriggerCounts[owner] = getCallbackCollection(owner).triggerCounter;
+				WeaveAPI.StageUtils.startTask(null, unbusyTrigger, WeaveAPI.TASK_PRIORITY_IMMEDIATE);

 				if (debugBusyTasks)
 				{
@@ -778,11 +772,14 @@
 		/**
 		 * Called the frame after an owner's last busy task is unassigned.
 		 * Triggers callbacks if they have not been triggered since then.
-		 */
-		private function unbusyTrigger():void
+		 */
+		private function unbusyTrigger(stopTime:int):Number
 		{
 			var owner:*;
 			do {
+				if (getTimer() > stopTime)
+					return 0;
+
 				owner = null;
 				for (owner in _dUnbusyTriggerCounts)
 				{
@@ -810,6 +807,8 @@
 					cc.triggerCallbacks();
 				}
 			} while (owner);
+
+			return 1;
 		}

 		/**


Fix: selected records count not updated correctly

--- collect-client/src/main/flex/org/openforis/collect/presenter/DataImportPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/DataImportPresenter.as
@@ -440,7 +440,11 @@
 		protected function selectAllConflictingRecords(event:DataImportEvent):void {
 			_allConflictingRecordsSelected = ! _allConflictingRecordsSelected;
 			view.allConflictingRecordsSelected = _allConflictingRecordsSelected;
-			view.selectedConflictingRecordsCount = _summary.conflictingRecords.length;
+			if (_allConflictingRecordsSelected) {
+				view.selectedConflictingRecordsCount = _summary.conflictingRecords.length;
+			} else {
+				view.selectedConflictingRecordsCount = 0;
+			}
 			setItemsSelected(_summary.conflictingRecords, _allConflictingRecordsSelected);
 		}