Transferred from the Adobe Open Source Subversion Repository

Revision: 3035
Author:   jvroom@adobe.com
Date:     2008-08-29T06:18:11.275196Z

Log Message:
-----------
* Added HTTPMultiService component - refactored the guts of HTTPService into a new
class AbstractOperation which HTTPService now wraps.

* Moved concurrency and showBusyCursor classes up to the mx.rpc level from mx.rpc.mxml.
Partly this improves consistency and partly because it is awkward to implement them
with the wrapping design in the subclass.  This does introduce a new dependency on
CursorManager in mx.rpc.HTTPService, though I think that should turn into a "runtime binding"
so we remove the compile time binding altogether.

* Added managers, operationManager, resultType, resultElementType, properties to the
AbstractService and AbstractInvoker classes.  These are used to improve the metadata information
on these operations for better tooling in the future, and to allow management services to
tie into the service infrastructure.

* AsyncToken gets a default parameter for its constructor so it can be used in MXML.

* Moved endpoint property up from the MXML to the regular mx.rpc version to improve consistency

The blazeds RPC tests passed unfortunately I had problems getting the RPC tests in the sdk branch
to build and run so let me know if you see any problems on those.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/mxml/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/Operation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPMultiService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/mxml/HTTPService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AbstractInvoker.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/SerializationFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/Operation.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/AbstractOperation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/remoting/RemoteObject.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/soap/mxml/WebService.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/AsyncToken.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/http/Operation.as</path>

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

--- frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as
+++ frameworks/projects/rpc/src/mx/rpc/http/HTTPService.as
@@ -12,32 +12,14 @@
 package mx.rpc.http
 {

-import flash.utils.getQualifiedClassName;
-import flash.xml.XMLDocument;
-import flash.xml.XMLNode;
-
 import mx.core.mx_internal;
-import mx.collections.ArrayCollection;
-import mx.logging.ILogger;
-import mx.logging.Log;
 import mx.messaging.ChannelSet;
-import mx.messaging.channels.DirectHTTPChannel;
 import mx.messaging.config.LoaderConfig;
+import mx.messaging.events.MessageEvent;
 import mx.messaging.messages.IMessage;
-import mx.messaging.messages.HTTPRequestMessage;
-import mx.resources.IResourceManager;
-import mx.resources.ResourceManager;
 import mx.rpc.AbstractInvoker;
-import mx.rpc.AsyncDispatcher;
 import mx.rpc.AsyncRequest;
 import mx.rpc.AsyncToken;
-import mx.rpc.Fault;
-import mx.rpc.events.FaultEvent;
-import mx.rpc.xml.SimpleXMLDecoder;
-import mx.rpc.xml.SimpleXMLEncoder;
-import mx.utils.ObjectProxy;
-import mx.utils.ObjectUtil;
-import mx.utils.StringUtil;
 import mx.utils.URLUtil;

 use namespace mx_internal;
@@ -97,9 +79,12 @@
     public function HTTPService(rootURL:String = null, destination:String = null)
     {
         super();
+
+        operation = new AbstractOperation();

-        asyncRequest = new AsyncRequest();
-        makeObjectsBindable = true;
+        operation.makeObjectsBindable = true;
+
+        operation._rootURL = rootURL;

         // If the SWF was loaded via HTTPS, we'll use the DefaultHTTPS destination by default
         if (destination == null)
@@ -114,11 +99,8 @@
             asyncRequest.destination = destination;
             useProxy = true;
         }
-
-        _log = Log.getLogger("mx.rpc.http.HTTPService");
-    }
-
-
+    }
+
     //--------------------------------------------------------------------------
     //
     // Constants
@@ -196,35 +178,28 @@
      */
     public static const ERROR_ENCODING:String = "Client.CouldNotEncode";

-    //--------------------------------------------------------------------------
-    //
-    // Variables
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  A shared direct Http channelset used for service instances that do not use the proxy.
-     */
-    private static var _directChannelSet:ChannelSet;
-
-    /**
-     *  @private
-     *  Logger
-     */
-    private var _log:ILogger;
-
-    /**
-     *  @private
-     */
-    private var resourceManager:IResourceManager =
-                                    ResourceManager.getInstance();
-
-    //--------------------------------------------------------------------------
-    //
-    // Properties
-    //
-    //--------------------------------------------------------------------------
+
+    /**
+     * Propagate event listeners down to the operation since it is firing some of the
+     * events.
+     */
+    override public function addEventListener(type:String, listener:Function,
+        useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
+    {
+        operation.addEventListener(type, listener, useCapture, priority, useWeakReference);
+        super.addEventListener(type, listener, useCapture, priority, useWeakReference);
+    }
+
+    mx_internal var operation:AbstractOperation;
+
+    override mx_internal function set asyncRequest(ar:AsyncRequest):void
+    {
+        operation.asyncRequest = ar;
+    }
+    override mx_internal function get asyncRequest():AsyncRequest
+    {
+        return operation.asyncRequest;
+    }

     //----------------------------------
     //  channelSet
@@ -261,7 +236,36 @@
      *  like a normal HTTP POST with name-value pairs. application/xml send
      *  requests as XML.
      */
-    public var contentType:String = CONTENT_TYPE_FORM;
+    public function get contentType():String
+    {
+        return operation.contentType;
+    }
+    public function set contentType(c:String):void
+    {
+        operation.contentType = c;
+    }
+
+    [Inspectable(enumeration="multiple,single,last", defaultValue="multiple", category="General")]
+    /**
+     * Value that indicates how to handle multiple calls to the same service. The default
+     * value is multiple. The following values are permitted:
+     *

+     *
multiple Existing requests are not cancelled, and the developer is
+     * responsible for ensuring the consistency of returned data by carefully
+     * managing the event stream. This is the default value.

+     *
single Only a single request at a time is allowed on the operation;
+     * multiple requests generate a fault.

+     *
last Making a request cancels any existing request.

+     *

+     */
+    public function get concurrency():String
+    {
+        return operation.concurrency;
+    }
+    public function set concurrency(c:String):void
+    {
+        operation.concurrency = c;
+    }

     //----------------------------------
     //  destination
@@ -288,6 +292,20 @@
         asyncRequest.destination = value;
     }

+    [Inspectable(defaultValue="true", category="General")]
+    /**
+     * When this value is true, anonymous objects returned are forced to bindable objects.
+     */
+    override public function get makeObjectsBindable():Boolean
+    {
+        return operation.makeObjectsBindable;
+    }
+
+    override public function set makeObjectsBindable(b:Boolean):void
+    {
+        operation.makeObjectsBindable = b;
+    }
+
     //----------------------------------
     //  headers
     //----------------------------------
@@ -297,7 +315,14 @@
      *  Custom HTTP headers to be sent to the third party endpoint. If multiple headers need to
      *  be sent with the same name the value should be specified as an Array.
      */
-    public var headers:Object = {};
+    public function get headers():Object
+    {
+        return operation.headers;
+    }
+    public function set headers(r:Object):void
+    {
+        operation.headers = r;
+    }

     //----------------------------------
     //  method
@@ -309,7 +334,14 @@
      *  OPTIONS, PUT, TRACE and DELETE.
      *  Lowercase letters are converted to uppercase letters. The default value is GET.
      */
-    public var method:String = HTTPRequestMessage.GET_METHOD;
+    public function get method():String
+    {
+        return operation.method;
+    }
+    public function set method(m:String):void
+    {
+        operation.method = m;
+    }

     //----------------------------------
     //  request
@@ -320,42 +352,14 @@
      *  Object of name-value pairs used as parameters to the URL. If
      *  the contentType property is set to application/xml, it should be an XML document.
      */
-    public var request:Object = {};
-
-    //----------------------------------
-    //  requestTimeout
-    //----------------------------------
-
-    [Inspectable(category="General")]
-
-    /**
-     *  Provides access to the request timeout in seconds for sent messages.
-     *  A value less than or equal to zero prevents request timeout.
-     */
-    public function get requestTimeout():int
-    {
-        return asyncRequest.requestTimeout;
-    }
-
-    /**
-     *  @private
-     */
-    public function set requestTimeout(value:int):void
-    {
-        if (asyncRequest.requestTimeout != value)
-        {
-            asyncRequest.requestTimeout = value;
-        }
-    }
-
-    //----------------------------------
-    //  resultFormat
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _resultFormat:String = RESULT_FORMAT_OBJECT;
+    public function get request():Object
+    {
+        return operation.request;
+    }
+    public function set request(r:Object):void
+    {
+        operation.request = r;
+    }

     [Inspectable(enumeration="object,array,xml,flashvars,text,e4x", defaultValue="object", category="General")]
     /**
@@ -388,47 +392,16 @@
      */
     public function get resultFormat():String
     {
-        return _resultFormat;
-    }
-
-    /**
-     *  @private
-     */
-    public function set resultFormat(value:String):void
-    {
-        switch (value)
-        {
-            case RESULT_FORMAT_OBJECT:
-            case RESULT_FORMAT_ARRAY:
-            case RESULT_FORMAT_XML:
-            case RESULT_FORMAT_E4X:
-            case RESULT_FORMAT_TEXT:
-            case RESULT_FORMAT_FLASHVARS:
-            {
-                break;
-            }
-
-            default:
-            {
-                var message:String = resourceManager.getString(
-                    "rpc", "invalidResultFormat",
-                    [ value, RESULT_FORMAT_OBJECT, RESULT_FORMAT_ARRAY,
-                      RESULT_FORMAT_XML, RESULT_FORMAT_E4X,
-                      RESULT_FORMAT_TEXT, RESULT_FORMAT_FLASHVARS ]);
-                throw new ArgumentError(message);
-            }
-        }
-        _resultFormat = value;
+        return operation.resultFormat;
+    }
+    public function set resultFormat(rf:String):void
+    {
+        operation.resultFormat = rf;
     }

     //----------------------------------
     //  rootURL
     //----------------------------------
-
-    /**
-     *  @private
-     */
-    mx_internal var _rootURL:String;

     /**
      *  The URL that the HTTPService object should use when computing relative URLs.
@@ -440,30 +413,52 @@
      */
     public function get rootURL():String
     {
-        if (_rootURL == null)
-        {
-            _rootURL = LoaderConfig.url;
-        }
-        return _rootURL;
-    }
-
-    /**
-     *  @private
-     */
-    public function set rootURL(value:String):void
-    {
-        _rootURL = value;
-    }
-
-    //----------------------------------
-    //  url
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _url:String;
-
+        return operation.rootURL;
+    }
+    public function set rootURL(ru:String):void
+    {
+        operation.rootURL = ru;
+    }
+
+    //----------------------------------
+    //  showBusyCursor
+    //----------------------------------
+
+    [Inspectable(defaultValue="false", category="General")]
+    /**
+    * If true, a busy cursor is displayed while a service is executing. The default
+    * value is false.
+    */
+    public function get showBusyCursor():Boolean
+    {
+        return operation.showBusyCursor;
+    }
+
+    public function set showBusyCursor(sbc:Boolean):void
+    {
+        operation.showBusyCursor = sbc;
+    }
+
+    //----------------------------------
+    //  serializationFilter
+    //----------------------------------
+
+    /**
+     * Provides an adapter which controls the process of converting the HTTP response body into
+     * ActionScript objects and/or turning the parameters or body into the contentType, URL, and
+     * and post body of the HTTP request.  This can also be set indirectly by setting the
+     * resultFormat by registering a SerializationFilter using the static method:
+     * SerializationFilter.registerFilterForResultFormat("formatName", filter)
+     */
+    public function get serializationFilter():SerializationFilter
+    {
+        return operation.serializationFilter;
+    }
+    public function set serializationFilter(s:SerializationFilter):void
+    {
+        operation.serializationFilter = s;
+    }
+
     [Inspectable(defaultValue="undefined", category="General")]
     /**
      *  Location of the service. If you specify the url and a non-default destination,
@@ -471,26 +466,13 @@
      */
     public function get url():String
     {
-        return _url;
-    }
-
-    /**
-     *  @private
-     */
-    public function set url(value:String):void
-    {
-        _url = value;
-    }
-
-    //----------------------------------
-    //  useProxy
-    //----------------------------------
-
-    /**
-     *  @private
-     */
-    private var _useProxy:Boolean = false;
-
+        return operation.url;
+    }
+    public function set url(u:String):void
+    {
+        operation.url = u;
+    }
+
     [Inspectable(defaultValue="false", category="General")]
     /**
      *  Specifies whether to use the Flex proxy service. The default value is false. If you
@@ -502,29 +484,11 @@
      */
     public function get useProxy():Boolean
     {
-        return _useProxy;
-    }
-
-    /**
-     *  @private
-     */
-    public function set useProxy(value:Boolean):void
-    {
-        if (value != _useProxy)
-        {
-            _useProxy = value;
-            var dcs:ChannelSet = getDirectChannelSet();
-            if (!useProxy)
-            {
-                if (dcs != asyncRequest.channelSet)
-                    asyncRequest.channelSet = dcs;
-            }
-            else
-            {
-                if (asyncRequest.channelSet == dcs)
-                    asyncRequest.channelSet = null;
-            }
-        }
+        return operation.useProxy;
+    }
+    public function set useProxy(u:Boolean):void
+    {
+        operation.useProxy = u;
     }

     //----------------------------------
@@ -565,9 +529,15 @@
  return myObj;
 }

-
-     */
-    public var xmlDecode:Function;
+     */
+    public function get xmlDecode():Function
+    {
+        return operation.xmlDecode;
+    }
+    public function set xmlDecode(u:Function):void
+    {
+        operation.xmlDecode = u;
+    }

     //----------------------------------
     //  xmlEncode
@@ -609,7 +579,54 @@

      */
-    public var xmlEncode:Function;
+    public function get xmlEncode():Function
+    {
+        return operation.xmlEncode;
+    }
+    public function set xmlEncode(u:Function):void
+    {
+        operation.xmlEncode = u;
+    }
+
+    [Bindable("resultForBinding")]
+    /**
+     *  The result of the last invocation.
+     */
+    override public function get lastResult():Object
+    {
+        return operation.lastResult;
+    }
+
+    override public function clearResult(fireBindingEvent:Boolean = true):void
+    {
+        operation.clearResult(fireBindingEvent);
+    }
+
+    //----------------------------------
+    //  requestTimeout
+    //----------------------------------
+
+    [Inspectable(category="General")]
+
+    /**
+     *  Provides access to the request timeout in seconds for sent messages.
+     *  A value less than or equal to zero prevents request timeout.
+     */
+    public function get requestTimeout():int
+    {
+        return asyncRequest.requestTimeout;
+    }
+
+    /**
+     *  @private
+     */
+    public function set requestTimeout(value:int):void
+    {
+        if (asyncRequest.requestTimeout != value)
+        {
+            asyncRequest.requestTimeout = value;
+        }
+    }

     //--------------------------------------------------------------------------
     //
@@ -644,127 +661,7 @@
         if (parameters == null)
             parameters = request;

-        var paramsToSend:Object;
-        var token:AsyncToken;
-        var fault:Fault;
-        var faultEvent:FaultEvent;
-        var msg:String;
-
-         if (contentType == CONTENT_TYPE_XML)
-         {
-            if (!(parameters is XMLNode) && !(parameters is XML))
-            {
-                if (xmlEncode != null)
-                {
-                    var funcEncoded:Object = xmlEncode(parameters);
-                    if (null == funcEncoded)
-                    {
-                        token = new AsyncToken(null);
-                        msg = resourceManager.getString(
-                            "rpc", "xmlEncodeReturnNull");
-                        fault = new Fault(ERROR_ENCODING, msg);
-                        faultEvent = FaultEvent.createEvent(fault, token);
-                        new AsyncDispatcher(dispatchRpcEvent, [faultEvent], 10);
-                        return token;
-                    }
-                    else if (!(funcEncoded is XMLNode))
-                    {
-                        token = new AsyncToken(null);
-                        msg = resourceManager.getString(
-                            "rpc", "xmlEncodeReturnNoXMLNode");
-                        fault = new Fault(ERROR_ENCODING, msg);
-                        faultEvent = FaultEvent.createEvent(fault, token);
-                        new AsyncDispatcher(dispatchRpcEvent, [faultEvent], 10);
-                        return token;
-                    }
-                    else
-                    {
-                        paramsToSend = XMLNode(funcEncoded).toString();
-                    }
-                }
-                else
-                {
-                    var encoder:SimpleXMLEncoder = new SimpleXMLEncoder(null);
-                    var xmlDoc:XMLDocument = new XMLDocument();
-
-                    //right now there is a wasted <encoded> wrapper tag
-                    //call.appendChild(encoder.encodeValue(parameters));
-                    var childNodes:Array = encoder.encodeValue(parameters, new QName(null, "encoded"), new XMLNode(1, "top")).childNodes.concat();
-                    for (var i:int = 0; i < childNodes.length; ++i)
-                        xmlDoc.appendChild(childNodes[i]);
-
-                    paramsToSend = xmlDoc.toString();
-                }
-            }
-            else
-            {
-                paramsToSend = XML(parameters).toXMLString();
-            }
-        }
-        else if (contentType == CONTENT_TYPE_FORM)
-        {
-            paramsToSend = {};
-            var val:Object;
-
-            //get all dynamic and all concrete properties from the parameters object
-            var classinfo:Object = ObjectUtil.getClassInfo(parameters);
-
-            for each (var p:* in classinfo.properties)
-            {
-                val = parameters[p];
-                if (val != null)
-                {
-                    if (val is Array)
-                        paramsToSend[p] = val;
-                    else
-                        paramsToSend[p] = val.toString();
-                }
-            }
-        }
-        else
-        {
-            paramsToSend = parameters;
-        }
-
-        var message:HTTPRequestMessage = new HTTPRequestMessage();
-        if (useProxy)
-        {
-            if (url && url != '')
-            {
-                message.url = URLUtil.getFullURL(rootURL, url);
-            }
-
-        }
-        else
-        {
-            if (!url)
-            {
-                token = new AsyncToken(null);
-                msg = resourceManager.getString(
-                    "rpc", "urlNotSpecified");
-                fault = new Fault(ERROR_URL_REQUIRED, msg);
-                faultEvent = FaultEvent.createEvent(fault, token);
-                new AsyncDispatcher(dispatchRpcEvent, [faultEvent], 10);
-                return token;
-            }
-
-            if (!useProxy)
-            {
-                var dcs:ChannelSet = getDirectChannelSet();
-                if (dcs != asyncRequest.channelSet)
-                    asyncRequest.channelSet = dcs;
-            }
-
-            message.url = url;
-        }
-
-        message.contentType = contentType;
-        message.method = method.toUpperCase();
-        if (contentType == CONTENT_TYPE_XML && message.method == HTTPRequestMessage.GET_METHOD)
-            message.method = HTTPRequestMessage.POST_METHOD;
-        message.body = paramsToSend;
-        message.httpHeaders = headers;
-        return invoke(message);
+        return operation.sendBody(parameters);
     }

     /**
@@ -813,206 +710,11 @@
         asyncRequest.setRemoteCredentials(remoteUsername, remotePassword, charset);
     }

-    //--------------------------------------------------------------------------
-    //
-    // Internal Methods
-    //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     */
-    override mx_internal function processResult(message:IMessage, token:AsyncToken):Boolean
-    {
-        var body:Object = message.body;
-
-        _log.info("Decoding HTTPService response");
-        _log.debug("Processing HTTPService response message:\n{0}", message);
-
-        if ((body == null) || ((body != null) && (body is String) && (StringUtil.trim(String(body)) == "")))
-        {
-            _result = body;
-            return true;
-        }
-        else if (body is String)
-        {
-            if (resultFormat == RESULT_FORMAT_XML || resultFormat == RESULT_FORMAT_OBJECT
-                    || resultFormat == RESULT_FORMAT_ARRAY)
-            {
-                //old XML style
-                var tmp:Object = new XMLDocument();
-                XMLDocument(tmp).ignoreWhite = true;
-                try
-                {
-                    XMLDocument(tmp).parseXML(String(body));
-                }
-                catch(parseError:Error)
-                {
-                    var fault:Fault = new Fault(ERROR_DECODING, parseError.message);
-                    dispatchRpcEvent(FaultEvent.createEvent(fault, token, message));
-                    return false;
-                }
-
-                if (resultFormat == RESULT_FORMAT_OBJECT || resultFormat == RESULT_FORMAT_ARRAY)
-                {
-                    var decoded:Object;
-                    var msg:String;
-                    if (xmlDecode != null)
-                    {
-                        decoded = xmlDecode(tmp);
-                        if (decoded == null)
-                        {
-                            msg = resourceManager.getString(
-                                "rpc", "xmlDecodeReturnNull");
-                            var fault1:Fault = new Fault(ERROR_DECODING, msg);
-                            dispatchRpcEvent(FaultEvent.createEvent(fault1, token, message));
-                        }
-                    }
-                    else
-                    {
-                        var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(makeObjectsBindable);
-
-                        decoded = decoder.decodeXML(XMLNode(tmp));
-
-                        if (decoded == null)
-                        {
-                            msg = resourceManager.getString(
-                                "rpc", "defaultDecoderFailed");
-                            var fault2:Fault = new Fault(ERROR_DECODING, msg);
-                            dispatchRpcEvent(FaultEvent.createEvent(fault2, token, message));
-                        }
-                    }
-
-                    if (decoded == null)
-                    {
-                        return false;
-                    }
-
-                    if (makeObjectsBindable && (getQualifiedClassName(decoded) == "Object"))
-                    {
-                        decoded = new ObjectProxy(decoded);
-                    }
-                    else
-                    {
-                        decoded = decoded;
-                    }
-
-                    if (resultFormat == RESULT_FORMAT_ARRAY)
-                    {
-                        decoded = decodeArray(decoded);
-                    }
-
-                    _result = decoded;
-                }
-                else
-                {
-                    if (tmp.childNodes.length == 1)
-                    {
-                        tmp = tmp.firstChild;
-                    }
-                    _result = tmp;
-                }
-            }
-            else if (resultFormat == RESULT_FORMAT_E4X)
-            {
-                try
-                {
-                    _result = new XML(String(body));
-                }
-                catch(error:Error)
-                {
-                    var fault3:Fault = new Fault(ERROR_DECODING, error.message);
-                    dispatchRpcEvent(FaultEvent.createEvent(fault3, token, message));
-                    return false;
-                }
-            }
-            else if (resultFormat == RESULT_FORMAT_FLASHVARS)
-            {
-                _result = decodeParameterString(String(body));
-            }
-            else //if only we could assert(theService.resultFormat == "text")
-            {
-                _result = body;
-            }
-        }
-        else
-        {
-            if (resultFormat == RESULT_FORMAT_ARRAY)
-            {
-                body = decodeArray(body);
-            }
-
-            _result = body;
-        }
-
-        return true;
-    }
-
-    //--------------------------------------------------------------------------
-    //
-    // Private Methods
-    //
-    //--------------------------------------------------------------------------
-
-    private function decodeArray(o:Object):Object
-    {
-        var a:Array;
-
-        if (o is Array)
-        {
-            a = o as Array;
-        }
-        else if (o is ArrayCollection)
-        {
-            return o;
-        }
-        else
-        {
-            a = [];
-            a.push(o);
-        }
-
-        if (makeObjectsBindable)
-        {
-            return new ArrayCollection(a);
-        }
-        else
-        {
-            return a;
-        }
-    }
-
-    private function decodeParameterString(source:String):Object
-    {
-        var trimmed:String = StringUtil.trim(source);
-        var params:Array = trimmed.split('&');
-        var decoded:Object = {};
-        for (var i:int = 0; i<params.length; i++)
-        {
-            var param:String = params[i];
-            var equalsIndex:int = param.indexOf('=');
-            if (equalsIndex != -1)
-            {
-                var name:String = unescape(param.substr(0, equalsIndex));
-                name = name.split('+').join(' ');
-                var value:String = unescape(param.substr(equalsIndex+1));
-                value = value.split('+').join(' ');
-                decoded[name] = value;
-            }
-        }
-        return decoded;
-    }
-
-    private function getDirectChannelSet():ChannelSet
-    {
-        if (_directChannelSet == null)
-        {
-            var dcs:ChannelSet = new ChannelSet();
-            dcs.addChannel(new DirectHTTPChannel("direct_http_channel"));
-            _directChannelSet = dcs;
-        }
-        return _directChannelSet;
-    }
+    override public function cancel(id:String = null):AsyncToken
+    {
+        return operation.cancel(id);
+    }
+
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3528
Author:   gruehle@adobe.com
Date:     2008-10-09T00:10:59.153602Z

Log Message:
-----------
New Spark skins for Gumbo components. The wireframe skins will be re-packaged into a theme in a future checkin.

The default font for all Gumbo components is Arial 12 normal weight. In order to avoid conflict with the default font for Halo components, the Gumbo text styles are defined on three type selectors: FxButton, FxTextBase, and FxTextBox. If you want to change the default font for Gumbo components, you'll need to change it in all three selectors. This is a temporary solution until we have Spark skins for our Halo components.

This checkin also includes a workaround for SDK-17222. The workaround is to include a reference to FxHScrollBar and FxVScrollBar in FxTextArea, and a reference to FxScroller in FxList. This is a temporary workaround that will be removed when the bug is fixed.

Note: the files in the flex4test project have not been updated for the rename. This checkin does not resolve that issue.

Bugs: SDK-16302, SDK-16297, SDK-16444, SDK-16629, SDK-16779, SDK-16052
QE: These skins are the current definition of the spark look and feel. There are some discrepancies with the XD specs that XD will be resolving (eg all fonts are Arial 12)

Modified Paths:
--------------
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxDefaultItemRenderer.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollBarDownButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/SpinnerDownArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVScrollBarSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/ScrollLeftArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxListSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHSliderTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollBarUpButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/SpinnerUpArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxSpinnerIncrButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/ScrollDownArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHScrollBarThumbSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/RadioDot.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/ScrollRightArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVSliderTrackSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/ScrollUpArrow.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextInputSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxNumericStepperSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxSpinnerDecrButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVScrollBarThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/tests/flex4/flex4test_testScript.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/defaults.css</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollBarRightButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxTextAreaSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxToggleButtonSkin.mxml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/assets/CheckMark.png</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxSpinnerSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHScrollBarTrackSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxCheckBoxSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxScrollBarLeftButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHSliderSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHSliderThumbSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxRadioButtonSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxHScrollBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/skins/spark/FxVScrollBarTrackSkin.mxml</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -14,11 +14,10 @@
 import flash.display.DisplayObject;
 import flash.events.MouseEvent;

+import mx.components.baseClasses.FxListBase;
+import mx.core.ClassFactory;
 import mx.events.ItemExistenceChangedEvent;
 import mx.skins.spark.FxDefaultItemRenderer;
-
-import mx.core.ClassFactory;
-import mx.components.baseClasses.FxListBase;

 /**
  *  The List class.
@@ -27,6 +26,9 @@
 {
     include "../core/Version.as";

+    // Force a dependency on scroller to work around bug SDK-17222
+    private static var scrollerDep:FxScroller;
+
     //--------------------------------------------------------------------------
     //
     //  Constants


Transferred from the Adobe Open Source Subversion Repository

Revision: 11028
Author:   egeorgie@adobe.com
Date:     2009-10-20T18:05:44.603962Z

Log Message:
-----------
Drag and Drop - add dragging support from Halo containers to Spark containers

- ListBase has been beefed up with the new Spark drag and drop format

QE notes: Drag drop from Halo to Spark ready for testing.
Doc notes: None
Bugs: None
Reviewer: Deepa
Tests run: checkintests, mustella (ListDragDrop, List)
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -1180,7 +1180,7 @@
         dragSource.addHandler(copySelectedItemsForDragDrop, "orderedItems");

         // Calculate the index of the focus item within the vector
-        // of ordered items returned for the "sourceOrderedItems" format.
+        // of ordered items returned for the "orderedItems" format.
         var caretIndex:int = 0;
         var draggedIndices:Vector.<int> = selectedIndices;
         var count:int = draggedIndices.length;
@@ -1193,7 +1193,7 @@
     }

     /**
-     *  @private.
+     *  @private
      */
     private function copySelectedItemsForDragDrop():Vector.<Object>
     {


Transferred from the Adobe Open Source Subversion Repository

Revision: 8011
Author:   aharui@adobe.com
Date:     2009-06-19T20:49:34.415568Z

Log Message:
-----------
Need null check when renderers are virtual

QE Notes: None
Doc Notes: None
Bugs: SDK-21910
Reviewer: szeto
tests: checkintests

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

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -783,7 +783,8 @@
             if (caretIndex >= 0)
             {
                 currentRenderer = dataGroup.getElementAt(caretIndex) as IItemRenderer;
-                currentRenderer.showsCaret = false;
+                if (currentRenderer)
+                    currentRenderer.showsCaret = false;
             }

             // Check to see if we're deselecting the currently selected item


Ensure the keyframe has a ref attribute before modifying it

--- exporter/src/main/as/flump/export/BetwixtPublisher.as
+++ exporter/src/main/as/flump/export/BetwixtPublisher.as
@@ -11,6 +11,7 @@
 import flump.bytesToXML;
 import flump.xfl.XflLibrary;
 import flump.xfl.XflMovie;
+import flump.xfl.XmlConverter;

 import com.threerings.util.Log;

@@ -75,7 +76,9 @@
                 movieXml.@authoredDevice = authoredDevice.name();
                 movieXml.@name = prefix + movieXml.@name;
                 for each (var kf :XML in movieXml..kf) {
-                    kf.@ref = prefix + kf.@ref;
+                    if (new XmlConverter(kf).hasAttr("ref")) {
+                        kf.@ref = prefix + kf.@ref;
+                    }
                 }
                 xml.appendChild(movieXml);
             }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

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

--- frameworks/projects/charts/src/mx/charts/HLOCChart.as
+++ frameworks/projects/charts/src/mx/charts/HLOCChart.as
@@ -0,0 +1,342 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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
+{
+
+import mx.charts.chartClasses.CartesianChart;
+import mx.charts.chartClasses.DataTip;
+import mx.charts.chartClasses.DataTransform;
+import mx.charts.chartClasses.Series;
+import mx.charts.series.HLOCSeries;
+import mx.charts.styles.HaloDefaults;
+import mx.core.mx_internal;
+import mx.graphics.SolidColor;
+import mx.graphics.Stroke;
+import mx.styles.CSSStyleDeclaration;
+import mx.core.IFlexModuleFactory;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Specifies a ratio of how wide to draw the HLOC lines
+ *  relative to the horizontal axis's category widths,
+ *  as a percentage in the range of 0 to 1.
+ *  A value of 1 uses the entire space, while a value of 0.6
+ *  uses 60% of the category's available space.
+ *  The actual element width used is the smaller of the
+ *  columnWidthRatio property and the
+ *  maxColumnWidth property.
+ *  Multiple element series divide this space proportionally.
+ *  The default value is 0.65.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="columnWidthRatio", type="Number", inherit="no")]
+
+/**
+ *  Specifies how wide to draw the HLOC lines, in pixels.
+ *  The actual width used is the smaller of this property
+ *  and the columnWidthRatio property.
+ *  Multiple HLOC series divide this space proportionally.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+[Style(name="maxColumnWidth", type="Number", format="Length", inherit="no")]
+
+//--------------------------------------
+//  Other metadata
+//--------------------------------------
+
+[DefaultBindingProperty(destination="dataProvider")]
+
+[DefaultTriggerEvent("itemClick")]
+
+[IconFile("HLOCChart.png")]
+
+/**
+ *  The HLOCChart (High Low Open Close) control represents financial data as a series of elements
+ *  representing the high, low, closing, and optionally opening values
+ *  of a data series.
+ *  The top and bottom of the vertical line in each element
+ *  represent the high and low values for the datapoint.
+ *  The right-facing tick represents the closing values,
+ *  and the left tick represents the opening value if one was specified.
+ *
+ *
An HLOCChart control expects its series property
+ *  to contain an Array of HLOCSeries objects.

+ *
+ *  @mxml
+ *
+ *  The <mx:HLOCChart> tag inherits all the properties
+ *  of its parent classes and adds the following properties:

+ *
+ *

+ *  <mx:HLOCChart
+ *    Styles
+ *    columnWidthRatio=".65"
+ *    maxColumnWidth="No default"
+ *  />
+ *

+ *
+ *  @see mx.charts.series.HLOCSeries
+ *
+ *  @includeExample examples/HLOCChartExample.mxml
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class HLOCChart extends CartesianChart
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class initialization
+	//
+	//--------------------------------------------------------------------------
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private static var INVALIDATING_STYLES:Object =
+	{
+		columnWidthRatio: 1,
+		maxColumnWidth: 1
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	public function HLOCChart()
+	{
+		super();
+
+		dataTipMode = "single";
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Variables
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private var _moduleFactoryInitialized:Boolean = false;
+
+	/**
+	 *  @private
+	 */
+	private var _perSeriesColumnWidthRatio:Number;
+
+	/**
+	 *  @private
+	 */
+	private var _perSeriesMaxColumnWidth:Number;
+
+	/**
+	 *  @private
+	 */
+	private var _leftOffset:Number;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	private function initStyles():Boolean
+	{
+		HaloDefaults.init(styleManager);
+
+		var hlocChartStyle:CSSStyleDeclaration =
+			HaloDefaults.createSelector("mx.charts.HLOCChart", styleManager);
+
+		var hlocChartSeriesStyles:Array /* of Object */ = [];
+
+		hlocChartStyle.defaultFactory = function():void
+		{
+			this.axisColor = 0xD5DEDD;
+			this.chartSeriesStyles = hlocChartSeriesStyles;
+			this.columnWidthRatio = 0.65;
+			this.dataTipRenderer = DataTip;
+			this.fill = new SolidColor(0xFFFFFF, 0);
+			this.calloutStroke = new Stroke(0x888888,2);
+			this.fontSize = 10;
+			this.horizontalAxisStyleName = "blockCategoryAxis";
+			this.secondHorizontalAxisStyleName = "blockCategoryAxis";
+			this.secondVerticalAxisStyleName = "blockNumericAxis";
+			this.textAlign = "left";
+			this.verticalAxisStyleName = "blockNumericAxis";
+			this.horizontalAxisStyleNames = ["blockCategoryAxis"];
+			this.verticalAxisStyleNames = ["blockNumericAxis"];
+		}
+
+		var n:int = HaloDefaults.defaultColors.length;
+		for (var i:int = 0; i < n; i++)
+		{
+			var styleName:String = "haloHLOCSeries"+i;
+			hlocChartSeriesStyles[i] = styleName;
+
+			var o:CSSStyleDeclaration =
+				HaloDefaults.createSelector("." + styleName, styleManager);
+
+			var f:Function = function(o:CSSStyleDeclaration, stroke:Stroke,
+									  tickStroke:Stroke):void
+			{
+				o.defaultFactory = function():void
+				{
+					this.closeTickStroke = tickStroke;
+					this.openTickStroke = tickStroke;
+					this.stroke = stroke;
+					this.hlocColor = stroke.color;
+				}
+			}
+
+			f(o, new Stroke(HaloDefaults.defaultColors[i], 0, 1),
+				new Stroke(HaloDefaults.defaultColors[i], 2, 1,
+					false, "normal", "none"));
+		}
+
+		return true;
+	}
+
+
+	/**
+	 *  @inheritDoc
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 9
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 3
+	 */
+	override public function set moduleFactory(factory:IFlexModuleFactory):void
+	{
+		super.moduleFactory = factory;
+
+		if (_moduleFactoryInitialized)
+			return;
+
+		_moduleFactoryInitialized = true;
+
+		// our style settings
+		initStyles();
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function styleChanged(styleProp:String):void
+	{
+		if (styleProp == null || INVALIDATING_STYLES[styleProp] != undefined)
+			invalidateSeries();
+
+		super.styleChanged(styleProp);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: ChartBase
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function customizeSeries(seriesGlyph:Series, i:uint):void
+	{
+		var series:HLOCSeries = seriesGlyph as HLOCSeries;
+		if (series)
+		{
+			if (!isNaN(_perSeriesColumnWidthRatio))
+				series.columnWidthRatio = _perSeriesColumnWidthRatio;
+
+			if (!isNaN(_perSeriesMaxColumnWidth))
+				series.maxColumnWidth = _perSeriesMaxColumnWidth;
+
+			series.offset = _leftOffset + i * _perSeriesColumnWidthRatio;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function applySeriesSet(seriesSet:Array /* of Series */,
+											   transform:DataTransform):Array /* of Series */
+	{
+		var columnWidthRatio:Number = getStyle("columnWidthRatio");
+		var maxColumnWidth:Number = getStyle("maxColumnWidth");
+
+		_perSeriesColumnWidthRatio = columnWidthRatio / seriesSet.length;
+		_perSeriesMaxColumnWidth = maxColumnWidth / seriesSet.length;
+
+		_leftOffset = (1 - columnWidthRatio) / 2 +
+					  _perSeriesColumnWidthRatio / 2 - 0.5;
+
+		return super.applySeriesSet(seriesSet, transform);
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: CartesianChart
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function initSecondaryMode():void
+	{
+		super.initSecondaryMode();
+
+		if (!secondVerticalAxis)
+			secondVerticalAxis = new LinearAxis();
+
+		if (!secondVerticalAxisRenderer)
+			secondVerticalAxisRenderer = new AxisRenderer();
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 9715
Author:   aharui@adobe.com
Date:     2009-08-27T21:20:28.280781Z

Log Message:
-----------
Introduce tabFocusEnabled to IFocusManagerComponent.  This replaces tabEnabled as the way to remove a component from the tabbing loop.  tabEnabled should be set to true for any component that can receive focus, and tabFocusEnabled determines whether the FocusManager will actually give it focus.  If tabEnabled=false on a non-TextField, the player will sometimes momentarily remove focus and dispatch a focusOut when the component has focus and is later clicked on.  This is now quite common with TLF-based text components so we are forced to make this change.

QE Notes: tests using tabEnabled must now use tabFocusEnabled
Doc Notes: needs documentation
Bugs: SDK-22731
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Image.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/mx/src/mx/containers/Accordion.as
+++ frameworks/projects/mx/src/mx/containers/Accordion.as
@@ -483,6 +483,7 @@
         // Container() has set tabEnabled false, so we
         // have to set it back to true.
         tabEnabled = true;
+        tabFocusEnabled = true;
         hasFocusableChildren = true;

         // Accordion always clips content, it just handles it by itself
@@ -1305,7 +1306,7 @@
         // cache until we're fully initialized.  (bug 102639)
         // This check was moved from the beginning of this function to
         // here to fix bugs 103665/104213.
-        if (selectedChild && selectedChild.deferredContentCreated)
+        if (selectedChild && INavigatorContent(selectedChild).deferredContentCreated == false)
             return;

         // Don't remember sizes if we don't have any children


Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

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

--- frameworks/projects/mx/src/mx/controls/ButtonPhase.as
+++ frameworks/projects/mx/src/mx/controls/ButtonPhase.as
@@ -0,0 +1,48 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.controls
+{
+
+[ExcludeClass]
+
+/**
+ *  @private
+ *  Constants for the allowed values of the phase
+ *  of a Button.
+ */
+public final class ButtonPhase
+{
+	include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Class constants
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	public static const DOWN:String = "down";
+
+	/**
+	 *  @private
+	 */
+	public static const OVER:String = "over";
+
+	/**
+	 *  @private
+	 */
+	public static const UP:String = "up";
+}
+
+}


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

--- frameworks/projects/mx/src/mx/skins/halo/PopUpIcon.as
+++ frameworks/projects/mx/src/mx/skins/halo/PopUpIcon.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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: 17713
Author:   cframpto@adobe.com
Date:     2010-09-15T17:06:34.373375Z

Log Message:
-----------
Fix FTETextField htmlText and htmlText's styleSheet.  Both were broken a few revs back when the performance optimization work was done.  htmlText was fixed with a hack.  I need to get a couple of methods in TCM made tlf_internal.

QE notes: need mustella tests for htmlText, htmlText styleSheet and styles on text and htmlText to make sure they are applied
Doc notes:
Bugs: SDK-23567
Reviewer: Corey
Tests run: cyclone but I don't think there are any/many/enough FTETextField tests
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/mx/core/FTETextField.as

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

--- frameworks/projects/spark/src/mx/core/FTETextField.as
+++ frameworks/projects/spark/src/mx/core/FTETextField.as
@@ -1029,7 +1029,7 @@

             return _htmlHelper.getHtmlText(_text);
         }
-
+
         /**
          *  @private
          */
@@ -1058,7 +1058,7 @@
             if (!_htmlHelper)
                 _htmlHelper = new HTMLHelper(this);

-            _htmlHelper._htmlText = value;
+            _htmlHelper.htmlText = value;
             _htmlHelper.explicitHTMLText = value;

             // _text is now invalid and will get regenerated on demand.
@@ -1436,7 +1436,7 @@
         public function get styleSheet():StyleSheet
         {
             // Note: TextField does NOT return a copy of the StyleSheet.
-            return _htmlHelper ? _htmlHelper._styleSheet : null;
+            return _htmlHelper ? _htmlHelper.styleSheet : null;
         }

         /**
@@ -1453,7 +1453,7 @@
             if (!_htmlHelper)
                 _htmlHelper = new HTMLHelper(this);

-            _htmlHelper.styleSheet = value;
+            _htmlHelper.setStyleSheet(value);

             // The TextLines may need to be recreated
             // and the border and background may need to be redrawn.
@@ -1493,7 +1493,7 @@

             return _text;
         }
-
+
         /**
          *  @private
          */
@@ -2436,7 +2436,7 @@

                 if (testFlag(FLAG_HTML_TEXT_SET))
                 {
-                    if (!_htmlHelper.hostFormat)
+                   if (!_htmlHelper.hostFormat)
                         createHostFormat();

                     _htmlHelper.composeHTMLText(compositionWidth, compositionHeight);
@@ -3371,9 +3371,21 @@
     }
 }

+
+import flashx.textLayout.tlf_internal;
+
+use namespace tlf_internal;
+
 /** @private Used when needing an HTML view of things. */
-class HTMLHelper
+internal class HTMLHelper
 {
+
+    //--------------------------------------------------------------------------
+    //
+    //  Class variables
+    //
+    //--------------------------------------------------------------------------
+
     /**
      *  @private
      */
@@ -3398,67 +3410,29 @@
      *  @private
      */
     private static var htmlExporter:ITextExporter;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function HTMLHelper(textField:FTETextField)
+    {
+        this.textField = textField;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Variables
+    //
+    //--------------------------------------------------------------------------

     /**
      *  @private
      */
-    private static function initClass():void
-    {
-        var format:TextLayoutFormat;
-        var config:Configuration;
-
-        // Create an importer for plain text.
-        plainTextImporter =
-            TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
-
-        // Create an exporter for plain text.
-        plainTextExporter =
-            TextConverter.getExporter(TextConverter.PLAIN_TEXT_FORMAT);
-
-        // Create an importer for TEXT_FIELD_HTML_FORMAT that collapses whitespace.
-        // Note: We have to make a copy of the textFlowInitialFormat,
-        // which has various formats set to "inherit",
-        // and then modify it and set it back.
-        config = new Configuration();
-        format = new TextLayoutFormat(config.textFlowInitialFormat);
-        format.whiteSpaceCollapse = "collapse";
-        config.textFlowInitialFormat = format;
-        collapsingHTMLImporter =
-            TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT, config);
-        collapsingHTMLImporter.throwOnError = false;
-
-        // Create an importer for TEXT_FIELD_HTML_FORMAT that preserves whitespace.
-        // Note: We have to make a copy of the textFlowInitialFormat,
-        // which has various formats set to "inherit",
-        // and then modify it and set it back.
-        config = new Configuration();
-        format = new TextLayoutFormat(config.textFlowInitialFormat);
-        format.whiteSpaceCollapse = "preserve";
-        config.textFlowInitialFormat = format;
-        preservingHTMLImporter =
-            TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT, config);
-        preservingHTMLImporter.throwOnError = false;
-
-        // Create an exporter for TEXT_FIELD_HTML_FORMAT.
-        htmlExporter =
-            TextConverter.getExporter(TextConverter.TEXT_FIELD_HTML_FORMAT);
-    }
-
-    initClass();
-
-    /**
-     *  @private
-     */
-    private static var factory:TextFlowTextLineFactory =
-        new TextFlowTextLineFactory();
-
-    private var _field:FTETextField;
-
-    public function HTMLHelper(field:FTETextField)
-    {
-        this._field = field;
-    }
-
+    private var textField:FTETextField;
+
     /**
      *  @private
      *  If htmlText is set, composeHtmlText is called each time the text lines
@@ -3468,7 +3442,7 @@
      *  the html from the textFlow, we need the orginal htmlText for the cases
      *  where we need to regenerate the html text lines.
      */
-    public var explicitHTMLText:String = null;
+    mx_internal var explicitHTMLText:String = null;

     /**
      *  @private
@@ -3478,7 +3452,7 @@
      *  this object is released because it is invalid.
      *  It is regenerated just in time to render the htmlText.
      */
-    public var hostFormat:ITextLayoutFormat;
+    mx_internal var hostFormat:ITextLayoutFormat;

     /**
      *  @private
@@ -3486,7 +3460,7 @@
      *  this object represents the rich text to be displayed.
      *  It is created by using TLF's HTML importer to import the htmlText.
      */
-    public var textFlow:TextFlow;
+    private var textFlow:TextFlow;

     /**
      *  @private
@@ -3495,17 +3469,17 @@
      *  (with the hostFormat applied to it)
      *  to create TextLines in this Sprite.
      */
-    public var textContainerManager:TextContainerManager;
+    private var textContainerManager:TextContainerManager;

     /**
      *  @private
      */
-    public var _htmlText:String = null;
+    mx_internal var htmlText:String = null;

     /**
      *  @private
      */
-    public var _styleSheet:StyleSheet = null;
+    mx_internal var styleSheet:StyleSheet = null;

     //----------------------------------
     //  htmlImporter
@@ -3516,14 +3490,52 @@
      */
     private function get htmlImporter():ITextImporter
     {
-        // Note that which importer we return depends on the value
+        var format:TextLayoutFormat;
+        var config:Configuration;
+
+       // Note that which importer we return depends on the value
         // of condenseWhite was at the time that htmlText was set,
         // not on the current value of condenseWhite,
         // since it could change between htmlText being set
         // and the TextLines being composed.
-        return _field.testFlag(FTETextField.FLAG_EFFECTIVE_CONDENSE_WHITE) ?
-            collapsingHTMLImporter :
-            preservingHTMLImporter;
+        if (textField.testFlag(FTETextField.FLAG_EFFECTIVE_CONDENSE_WHITE))
+        {
+            if (!collapsingHTMLImporter)
+            {
+                 // Create an importer for TEXT_FIELD_HTML_FORMAT that collapses whitespace.
+                // Note: We have to make a copy of the textFlowInitialFormat,
+                // which has various formats set to "inherit",
+                // and then modify it and set it back.
+                config = new Configuration();
+                format = new TextLayoutFormat(config.textFlowInitialFormat);
+                format.whiteSpaceCollapse = "collapse";
+                config.textFlowInitialFormat = format;
+                collapsingHTMLImporter =
+                    TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT, config);
+                collapsingHTMLImporter.throwOnError = false;
+            }
+
+            return collapsingHTMLImporter;
+        }
+        else
+        {
+            if (!preservingHTMLImporter)
+            {
+                // Create an importer for TEXT_FIELD_HTML_FORMAT that preserves whitespace.
+                // Note: We have to make a copy of the textFlowInitialFormat,
+                // which has various formats set to "inherit",
+                // and then modify it and set it back.
+                config = new Configuration();
+                format = new TextLayoutFormat(config.textFlowInitialFormat);
+                format.whiteSpaceCollapse = "preserve";
+                config.textFlowInitialFormat = format;
+                preservingHTMLImporter =
+                    TextConverter.getImporter(TextConverter.TEXT_FIELD_HTML_FORMAT, config);
+                preservingHTMLImporter.throwOnError = false;
+            }
+
+            return preservingHTMLImporter;
+        }
     }

     /**
@@ -3532,13 +3544,13 @@
     public function composeHTMLText(compositionWidth:Number,
                                     compositionHeight:Number):void
     {
-        var textFlow:TextFlow = textFlow = htmlImporter.importToFlow(explicitHTMLText);
+        textFlow = htmlImporter.importToFlow(explicitHTMLText);

         // Unless there is a styleSheet, _htmlText is now invalid
         // and needs to be regenerated on demand,
         // because with htmlText what-you-set-is-not-what-you-get.
-        if (!_styleSheet)
-            _htmlText = null;
+        if (!styleSheet)
+            htmlText = null;

         if (!textFlow)
             return;
@@ -3547,10 +3559,25 @@

         textFlow.addEventListener(
             StatusChangeEvent.INLINE_GRAPHIC_STATUS_CHANGE,
-            _field.inlineGraphicStatusChangeHandler);
+            textField.inlineGraphicStatusChangeHandler);

         if (!textContainerManager)
-            textContainerManager = new FTETextFieldTextContainerManager(_field);
+            textContainerManager = new FTETextFieldTextContainerManager(textField);
+
+        // FixMe: remove when TLF gives us access to these methods.
+        //
+        // This is a HACK to get this code executed:
+        //     clearContainerChildren(true);  <== true means recycle
+        //     clearComposedLines();
+        // If text is composed and there are textLines on the display list
+        // we need to recycle them so container.numChildren is 0 and
+        // _composedLines.length = 0.  Otherwise, when the lines that are
+        // composed here are added to the display list only the lines at
+        // indexes >= container.numChildren will be added.
+        //
+        // Note: this must preceed the call to setTextFlow to get the
+        // behavior we desire.
+        textContainerManager.convertToTextFlowWithComposer();

         textContainerManager.compositionWidth = compositionWidth;
         textContainerManager.compositionHeight = compositionHeight;
@@ -3559,16 +3586,16 @@

         textContainerManager.hostFormat = hostFormat;

-        textContainerManager.swfContext = _field.fontContext as ISWFContext;
-
-        textContainerManager.setTextFlow(textFlow)
+        textContainerManager.swfContext = textField.fontContext as ISWFContext;
+
+        textContainerManager.setTextFlow(textFlow);

         // Add a formatResolver if there is a style sheet.  Force a flow
         // composer to be created, if there isn't one, so the format resolver
         // will be used.
-        if (_styleSheet && !textFlow.formatResolver)
-        {
-            textFlow.formatResolver = new FTETextFieldStyleResolver(_styleSheet);
+        if (styleSheet && !textFlow.formatResolver)
+        {
+            textFlow.formatResolver = new FTETextFieldStyleResolver(styleSheet);
             textContainerManager.beginInteraction();
             textContainerManager.endInteraction();
         }
@@ -3577,11 +3604,11 @@

         var bounds:Rectangle = textContainerManager.getContentBounds();

-        _field._textWidth = Math.round(bounds.width);
-        _field._textHeight = Math.round(bounds.height);
+        textField._textWidth = Math.round(bounds.width);
+        textField._textHeight = Math.round(bounds.height);

         // TLF takes care of clipping so none should be needed here.
-        _field.clipWidth = _field._textWidth;
+        textField.clipWidth = textField._textWidth;
     }

     /**
@@ -3596,7 +3623,7 @@
         {
             var textEvent:TextEvent = new TextEvent(TextEvent.LINK);
             textEvent.text = href.substring(6);
-            _field.dispatchEvent(textEvent);
+            textField.dispatchEvent(textEvent);
         }
     }

@@ -3605,36 +3632,42 @@
      */
     public function getHtmlText(fieldText:String):String
     {
-        if (_htmlText == null)
+        if (htmlText == null)
         {
             // We can optimize the default case
             // that there is no text or hmtlText.
             if (fieldText == "")
             {
-                _htmlText = "";
+                htmlText = "";
             }
             else
             {
                 // Import the plain text into a TextFlow,
                 // and then export the TextFlow into HTML.
                 if (!textFlow)
+                {
+                    if (!plainTextImporter)
+                        plainTextImporter = TextConverter.getImporter(TextConverter.PLAIN_TEXT_FORMAT);
                     textFlow = plainTextImporter.importToFlow(fieldText);
-                _htmlText = String(htmlExporter.export(
-                    textFlow, ConversionType.STRING_TYPE));
+                }
+
+                if (!htmlExporter)
+                    htmlExporter = TextConverter.getExporter(TextConverter.TEXT_FIELD_HTML_FORMAT);
+
+                htmlText = String(htmlExporter.export(textFlow, ConversionType.STRING_TYPE));
             }
         }

-        return _htmlText;
+        return htmlText;
     }

     /**
      *  @private
      */
-    public function set styleSheet(value:StyleSheet):void
+    public function setStyleSheet(value:StyleSheet):void
     {
-        _styleSheet = value;
-
-        var textFlow:TextFlow = textFlow;
+        styleSheet = value;
+
         if (textFlow && textFlow.formatResolver)
             textFlow.formatResolver = null;
     }
@@ -3649,10 +3682,12 @@
         // If we don't already have a TextFlow,
         // create one by importing the htmlText.
         if (!textFlow)
-            textFlow = htmlImporter.importToFlow(_htmlText);
-
+            textFlow = htmlImporter.importToFlow(htmlText);
+
+        if (!plainTextExporter)
+             plainTextExporter = TextConverter.getExporter(TextConverter.PLAIN_TEXT_FORMAT);
+
         // Export plain text from the TextFlow.
-        return String(plainTextExporter.export(
-            textFlow, ConversionType.STRING_TYPE));
+        return String(plainTextExporter.export(textFlow, ConversionType.STRING_TYPE));
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12052
Author:   clucier@adobe.com
Date:     2009-11-20T18:38:19.094091Z

Log Message:
-----------
We now issue runtime warnings for incompatible embedded fonts as we detect their use.

QE notes: You might want to create a couple tests around this.
Doc notes: None.
Bugs: SDK-23920.
Reviewer: Alex, Darrell
Tests run: Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/bundles/en_US/core.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/mx/core/UIFTETextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/EmbeddedFontRegistry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/utils/TextUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextFormat.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IEmbeddedFontRegistry.as</path>

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

--- frameworks/projects/spark/src/spark/utils/TextUtil.as
+++ frameworks/projects/spark/src/spark/utils/TextUtil.as
@@ -313,37 +313,18 @@
 			var bold:Boolean = client.getStyle("fontWeight") == "bold";
 			var italic:Boolean = client.getStyle("fontStyle") == "italic";

+            var localLookup:ISystemManager;
+            if (moduleFactory != null && moduleFactory is ISystemManager)
+                localLookup = ISystemManager(moduleFactory);
+            else if (client is IUIComponent)
+            {
+                var uic:IUIComponent = IUIComponent(client);
+                if (uic.parent is IUIComponent)
+                    localLookup = IUIComponent(uic.parent).systemManager;
+            }
+
             fontContext = embeddedFontRegistry.getAssociatedModuleFactory(
-            	font, bold, italic,
-                client, moduleFactory);
-
-            // If we found the font, then it is embedded.
-            // But some fonts are not listed in info()
-            // and are therefore not in the above registry.
-            // So we call isFontFaceEmbedded() which gets the list
-            // of embedded fonts from the player.
-            if (!fontContext)
-            {
-                var sm:ISystemManager;
-                if (moduleFactory != null && moduleFactory is ISystemManager)
-                	sm = ISystemManager(moduleFactory);
-                else if (client is IUIComponent)
-                {
-                    var uic:IUIComponent = IUIComponent(client);
-                    if (uic.parent is IUIComponent)
-                	    sm = IUIComponent(uic.parent).systemManager;
-                }
-
-                if (!staticTextFormat)
-                    staticTextFormat = new TextFormat();
-
-                staticTextFormat.font = font;
-                staticTextFormat.bold = bold;
-                staticTextFormat.italic = italic;
-
-                if (sm != null && sm.isFontFaceEmbedded(staticTextFormat))
-                    fontContext = sm;
-            }
+            	font, bold, italic, client, moduleFactory, localLookup, true);
         }

         if (!fontContext && fontLookup == FontLookup.EMBEDDED_CFF)


Transferred from the Adobe Open Source Subversion Repository

Revision: 9715
Author:   aharui@adobe.com
Date:     2009-08-27T21:20:28.280781Z

Log Message:
-----------
Introduce tabFocusEnabled to IFocusManagerComponent.  This replaces tabEnabled as the way to remove a component from the tabbing loop.  tabEnabled should be set to true for any component that can receive focus, and tabFocusEnabled determines whether the FocusManager will actually give it focus.  If tabEnabled=false on a non-TextField, the player will sometimes momentarily remove focus and dispatch a focusOut when the component has focus and is later clicked on.  This is now quite common with TLF-based text components so we are forced to make this change.

QE Notes: tests using tabEnabled must now use tabFocusEnabled
Doc Notes: needs documentation
Bugs: SDK-22731
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes
tests: checkintests cyclone

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/Window.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ComboBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/core/FlexHTMLLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/accordionClasses/AccordionHeader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/IFocusManagerComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/HTML.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flash-integration/src/mx/flash/UIMovieClip.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateChooser.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/FlexEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Accordion.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Image.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/TabNavigator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Image.as
+++ frameworks/projects/mx/src/mx/controls/Image.as
@@ -154,6 +154,7 @@
         // images are generally not interactive
         tabChildren = false;
         tabEnabled = true;
+        tabFocusEnabled = true;

         showInAutomationHierarchy = true;
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5797
Author:   jimurphy@adobe.com
Date:     2009-03-31T15:35:34.544076Z

Log Message:
-----------
Merged revisions 3.x 5505,5526-5527,5535,5540,5542,5572,5616-5617,5656-5657,5671,5674,5683,5687-5688,5690,5698,5708-5709,5713-5716,5719-5723,5726,5728-5729,5736,5752,5754,5761,5774,5780,5784 -> trunk

most of these are user submitted patches! very cool.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/VideoDisplay.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/IResourceManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/ToggleButtonBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Menu.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/CalendarLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/skins/halo/ProgressIndeterminateSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/controls/FileSystemComboBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NavBar.as</path>
<path kind="dir" action="M">/flex/sdk/trunk</path>
<path kind="file" action="D">/flex/sdk/trunk/modules/compiler/FlexCompilerShell-license.txt</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DateField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/DividedBox.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/formatters/DateFormatter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/FormItem.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/SWFLoader.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/NativeDragManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/PhoneNumberValidator.as</path>
<path kind="file" copyfrom-path="/flex/sdk/branches/3.x/frameworks/projects/framework/src/mx/validators/NumberValidatorDomainType.as" copyfrom-rev="5784" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/NumberValidatorDomainType.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/listClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/ToolTipManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/utils/ObjectUtil.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/NumberValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/validators/CurrencyValidator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/containers/Form.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/dataGridClasses/DataGridBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/resources/ResourceManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Label.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/CalendarLayoutChangeEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/events/DataGridEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/sliderClasses/Slider.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/PopUpMenuButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/Text.as</path>

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

--- frameworks/projects/mx/src/mx/controls/Label.as
+++ frameworks/projects/mx/src/mx/controls/Label.as
@@ -248,6 +248,7 @@
  *    paddingRight="0"
  *    paddingTop="0"
  *    paddingBottom="0"
+ *    styleSheet="null"
  *    textAlign="left|right|center"
  *    textDecoration="none|underline"
  *    textIndent="0"
@@ -1022,18 +1023,42 @@

     /**
      *  @private
-     */
-    mx_internal function get styleSheet():StyleSheet
-    {
-        return textField.styleSheet;
-    }
-
-    /**
-     *  @private
-     */
-    mx_internal function set styleSheet(value:StyleSheet):void
-    {
-        textField.styleSheet = value;
+     *  Change flag for the styleSheet property
+     */
+    private var styleSheetChanged:Boolean = false;
+
+    /**
+     *  @private
+     *  Storage for the styleSheet property.
+     */
+    private var _styleSheet:StyleSheet;
+
+   /**
+    *  A flash.text.StyleSheet object that can perform rendering
+    *  on the Label control's text.
+    *  Used for detailed control of HTML styles for the text.
+    *  For more information, see the flash.text.StyleSheet
+    *  class documentation.
+    *
+    *  @see flash.text.StyleSheet
+    *
+    *  @default null
+    */
+    public function get styleSheet():StyleSheet
+    {
+        return _styleSheet;
+    }
+
+    /**
+     *  @private
+     */
+    public function set styleSheet(value:StyleSheet):void
+    {
+        _styleSheet = value;
+        styleSheetChanged = true;
+        htmlTextChanged = true;
+
+        invalidateProperties();
     }

     //----------------------------------
@@ -1339,6 +1364,13 @@
             textField.selectable = _selectable;

             selectableChanged = false;
+        }
+
+        if (styleSheetChanged)
+        {
+            textField.styleSheet = _styleSheet;
+
+            styleSheetChanged = false;
         }

         if (textChanged || htmlTextChanged)


handle units for left/right

handle units for left/right

--- frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
+++ frameworks/projects/HTML/as/src/org/apache/flex/html/beads/layouts/VerticalLayout.as
@@ -28,10 +28,10 @@
 	import org.apache.flex.core.ValuesManager;
 	import org.apache.flex.events.Event;
 	import org.apache.flex.events.IEventDispatcher;
-    import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.geom.Rectangle;
+	import org.apache.flex.utils.CSSContainerUtils;
+	import org.apache.flex.utils.CSSUtils;
 	import org.apache.flex.utils.dbg.DOMPathUtil;
-    import org.apache.flex.utils.CSSUtils;
-    import org.apache.flex.utils.CSSContainerUtils;

 	/**
 	 *  The VerticalLayout class is a simple layout
@@ -93,6 +93,7 @@
 			var marginBottom:Object;
 			var margin:Object;
 			var maxWidth:Number = 0;
+            var cssValue:*;
 			// asking for contentView.width can result in infinite loop if host isn't sized already
 			var w:Number = hostSizedToContent ? 0 : contentView.width;
             var h:Number = contentView.height;
@@ -102,8 +103,14 @@
 				var child:IUIBase = contentView.getElementAt(i) as IUIBase;
 				if (child == null || !child.visible) continue;
 				ilc = child as ILayoutChild;
-				var left:Number = ValuesManager.valuesImpl.getValue(child, "left");
-				var right:Number = ValuesManager.valuesImpl.getValue(child, "right");
+				var left:Number = NaN;
+                cssValue = ValuesManager.valuesImpl.getValue(child, "left");
+                if (cssValue !== undefined)
+                    left = CSSUtils.toNumber(cssValue);
+                var right:Number = NaN;
+                cssValue = ValuesManager.valuesImpl.getValue(child, "right");
+                if (cssValue !== undefined)
+                    right = CSSUtils.toNumber(cssValue);
 				margin = ValuesManager.valuesImpl.getValue(child, "margin");
                 marginLeft = ValuesManager.valuesImpl.getValue(child, "margin-left");
                 marginTop = ValuesManager.valuesImpl.getValue(child, "margin-top");