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

--- frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
+++ frameworks/projects/rpc/src/mx/rpc/soap/SOAPDecoder.as
@@ -0,0 +1,958 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.rpc.soap
+{
+
+import flash.utils.getTimer;
+import flash.xml.XMLDocument;
+import flash.xml.XMLNode;
+
+import mx.collections.IList;
+import mx.core.mx_internal;
+import mx.logging.ILogger;
+import mx.logging.Log;
+import mx.rpc.soap.types.ICustomSOAPType;
+import mx.rpc.wsdl.WSDLMessagePart;
+import mx.rpc.wsdl.WSDLConstants;
+import mx.rpc.wsdl.WSDLEncoding;
+import mx.rpc.wsdl.WSDLOperation;
+import mx.rpc.xml.ContentProxy;
+import mx.rpc.xml.DecodingContext;
+import mx.rpc.xml.SchemaConstants;
+import mx.rpc.xml.SchemaDatatypes;
+import mx.rpc.xml.TypeIterator;
+import mx.rpc.xml.XMLDecoder;
+import mx.utils.ObjectProxy;
+import mx.utils.object_proxy;
+import mx.utils.StringUtil;
+import mx.utils.XMLUtil;
+
+use namespace object_proxy;
+
+[ExcludeClass]
+
+/**
+ * Decodes the SOAP response for a particular operation
+ *
+ * @private
+ */
+public class SOAPDecoder extends XMLDecoder implements ISOAPDecoder
+{
+    //--------------------------------------------------------------------------
+    //
+    // Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    public function SOAPDecoder()
+    {
+        super();
+        log = Log.getLogger("mx.rpc.soap.SOAPDecoder");
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Controls whether the decoder supports the legacy literal style encoding
+     * for generic compound type (such as arrays). Older document-literal SOAP
+     * implementations sometimes encoded unbounded element sequences with
+     * generic child item elements instead of repeating the
+     * value element itself. The default is true.
+     */
+    public var supportGenericCompoundTypes:Boolean = false;
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Properties
+    //
+    //--------------------------------------------------------------------------
+
+    public function get forcePartArrays():Boolean
+    {
+        return _forcePartArrays;
+    }
+
+    public function set forcePartArrays(value:Boolean):void
+    {
+        _forcePartArrays = value;
+    }
+
+    public function get headerFormat():String
+    {
+        return _headerFormat;
+    }
+
+    public function set headerFormat(value:String):void
+    {
+        _headerFormat = value;
+    }
+
+    /**
+     * Determines whether the decoder should ignore whitespace when processing
+     * the XML of a SOAP encoded response. The default is true
+     * and thus whitespace is not preserved. If an XML Schema type definition
+     * specifies a whiteSpace restriction set to
+     * preserve then ignoreWhitespace must first be set to false.
+     * Conversely, if a type whiteSpace restriction is set to
+     * replace or collapse then that setting will
+     * be honored even if ignoreWhitespace is set to false.
+     */
+    public function get ignoreWhitespace():Boolean
+    {
+        return _ignoreWhitespace;
+    }
+
+    public function set ignoreWhitespace(value:Boolean):void
+    {
+        _ignoreWhitespace = value;
+    }
+
+    public function get multiplePartsFormat():String
+    {
+        return _multiplePartsFormat;
+    }
+
+    public function set multiplePartsFormat(value:String):void
+    {
+        _multiplePartsFormat = value;
+    }
+
+    public function get resultFormat():String
+    {
+        return _resultFormat;
+    }
+
+    public function set resultFormat(value:String):void
+    {
+        _resultFormat = value;
+    }
+
+    public function get schemaConstants():SchemaConstants
+    {
+        return schemaManager.schemaConstants;
+    }
+
+    public function get soapConstants():SOAPConstants
+    {
+        return wsdlOperation.soapConstants;
+    }
+
+    public function get wsdlOperation():WSDLOperation
+    {
+        return _wsdlOperation;
+    }
+
+    public function set wsdlOperation(value:WSDLOperation):void
+    {
+        _wsdlOperation = value;
+        schemaManager = _wsdlOperation.schemaManager;
+    }
+
+    /**
+     * @private
+     */
+    protected function get inputEncoding():WSDLEncoding
+    {
+        var encoding:WSDLEncoding;
+        if (_wsdlOperation.inputMessage != null)
+            encoding = _wsdlOperation.inputMessage.encoding;
+        else
+            encoding = new WSDLEncoding();
+        return encoding;
+    }
+
+    /**
+     * @private
+     */
+    protected function get outputEncoding():WSDLEncoding
+    {
+        var encoding:WSDLEncoding;
+        if (_wsdlOperation.outputMessage != null)
+            encoding = _wsdlOperation.outputMessage.encoding;
+        else
+            encoding = new WSDLEncoding();
+        return encoding;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods - SOAP Decoding
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     * Decodes a SOAP response into a result and headers.
+     */
+    public function decodeResponse(response:*):SOAPResult
+    {
+        var soapResult:SOAPResult;
+        var responseString:String;
+
+        if (response is XML)
+            responseString = XML(response).toXMLString();
+        else
+            responseString = String(response);
+
+        var startTime:int = getTimer();
+
+        log.info("Decoding SOAP response");
+
+        // Reset the decoder state to clear contexts for schema types, etc.
+        reset();
+
+        if (responseString != null)
+        {
+            log.debug("Encoded SOAP response {0}", responseString);
+
+            // Keep track of the previous ignoreWhitespace setting (as it is
+            // unfortunately a static API on the intrinsic XML type) so we
+            // can set it back to its original state once we're finished.
+            var oldIgnoreWhitespace:Boolean = XML.ignoreWhitespace;
+            try
+            {
+                // Work around Flash Player bug 192355 by removing whitespace
+                // between processing instructions and the root tag before
+                // constructing an XML instance of the SOAP response.
+                responseString = responseString.replace(PI_WHITESPACE_PATTERN, "?><");
+                responseString = StringUtil.trim(responseString);
+                XML.ignoreWhitespace = ignoreWhitespace;
+                var responseXML:XML = new XML(responseString);
+
+                soapResult = decodeEnvelope(responseXML);
+            }
+            finally
+            {
+                XML.ignoreWhitespace = oldIgnoreWhitespace;
+            }
+        }
+
+        log.info("Decoded SOAP response into result [{0} millis]", getTimer() - startTime);
+        return soapResult
+    }
+
+    protected function decodeEnvelope(responseXML:XML):SOAPResult
+    {
+        log.debug("Decoding SOAP response envelope");
+        var soapResult:SOAPResult = new SOAPResult();
+
+        var envNS:Namespace;
+
+        if (responseXML != null)
+        {
+            envNS = responseXML.namespace();
+        }
+
+        if (envNS == null)
+        {
+            throw new Error("SOAP Response cannot be decoded. Raw response: " + responseXML);
+        }
+        else if (envNS.uri != SOAPConstants.SOAP_ENVELOPE_URI)
+        {
+            throw new Error("SOAP Response Version Mismatch");
+        }
+        else
+        {
+            // Set the namespaces and the Schema uri for the decoder.
+            var schemaConst:SchemaConstants;
+            var nsArray:Array = responseXML.inScopeNamespaces();
+            for each (var ns:Namespace in nsArray)
+            {
+                schemaManager.namespaces[ns.prefix] = ns;
+            }
+
+            // SOAP Headers
+            var headerXML:XML = responseXML[soapConstants.headerQName][0];
+            if (headerXML != null)
+            {
+                soapResult.headers = decodeHeaders(headerXML);
+            }
+            // SOAP Body
+            var bodyXML:XML = responseXML[soapConstants.bodyQName][0];
+
+            if (bodyXML == null || bodyXML.hasComplexContent() == false || bodyXML.children().length() <= 0)
+            {
+                soapResult.result = undefined;
+            }
+            else
+            {
+                // Check for SOAP faults for all resultFormats
+                var faultXMLList:XMLList = bodyXML[soapConstants.faultQName];
+                if (faultXMLList.length() > 0)
+                {
+                    soapResult.isFault = true;
+                    soapResult.result = decodeFaults(faultXMLList);
+                }
+                else
+                {
+                    if (resultFormat == "object")
+                    {
+                        decodeBody(bodyXML, soapResult);
+                    }
+                    else if (resultFormat == "e4x")
+                    {
+                         // Return the children as an XMLList.
+                        soapResult.result = bodyXML.children();
+                    }
+                    else if (resultFormat == "xml")
+                    {
+                         // Return the children as an Array of XMLNode
+                         // or String for text children
+                        var bodyArray:Array = [];
+                        var bodyXMLList:XMLList = bodyXML.children();
+                        for each (var bodyChild:XML in bodyXMLList)
+                        {
+                            var nodeKind:String = bodyChild.nodeKind();
+                            if (nodeKind == "element")
+                            {
+                                var xmlDoc:XMLDocument = new XMLDocument(bodyChild.toString());
+                                var xmlNode:XMLNode = xmlDoc.firstChild;
+                                bodyArray.push(xmlNode);
+                            }
+                            else if (nodeKind == "text")
+                            {
+                                bodyArray.push(bodyChild.toString());
+                            }
+                        }
+                        soapResult.result = bodyArray;
+                    }
+                }
+            }
+        }
+
+        return soapResult;
+    }
+
+    /**
+     * Decodes the response SOAP Body. The contents may either be the encoded
+     * output parameters, or a collection of SOAP faults.
+     */
+    protected function decodeBody(bodyXML:XML, soapResult:SOAPResult):void
+    {
+        log.debug("Decoding SOAP response body");
+        var result:*;
+        document = bodyXML;
+
+        // Pre-process encoded body.
+        preProcessXML(bodyXML);
+
+        // Check for operations without an output message
+        if (wsdlOperation.outputMessage == null)
+        {
+            soapResult.result = undefined;
+            return;
+        }
+
+        // Decode WSDL output message parts
+        var parts:Array = wsdlOperation.outputMessage.parts;
+
+        // Check for operations with a void return type
+        if (parts == null || parts.length == 0)
+        {
+            soapResult.result = undefined;
+            return;
+        }
+
+        var outputMessageXML:XML = bodyXML;
+        if (wsdlOperation.style == SOAPConstants.RPC_STYLE)
+        {
+            // Unwrap the output message from the operation; both RPC encoded and literal wrap.
+            outputMessageXML = outputMessageXML.elements()[0];
+        }
+        else if (outputEncoding.useStyle == SOAPConstants.USE_LITERAL && wsdlOperation.outputMessage.isWrapped == true)
+        {
+            // Unwrap the output message only if this is wrapped literal.
+            outputMessageXML = outputMessageXML.elements()[0];
+        }
+
+        // The "literal" use style may define a part using a type or
+        // element, the "encoded" use style always defines a part with a
+        // type.
+        for each (var part:WSDLMessagePart in parts)
+        {
+            var encodedPartValues:XMLList;
+            var encodedPartValue:XML;
+            var decodedPart:*;
+            var partQName:QName;
+            var partType:QName;
+            var partDefinition:XML;
+
+            // If we have an element, use that to find the part
+            if (part.element != null)
+            {
+                if (outputMessageXML.hasComplexContent())
+                    encodedPartValues = outputMessageXML.elements(part.element);
+                else
+                    encodedPartValues = outputMessageXML.text();
+                partQName = part.element;
+                partType = null;
+            }
+            // Otherwise, find the part by name and decode using the
+            // specified type definition
+            else
+            {
+                partType = part.type;
+                partDefinition = part.definition;
+
+                if (outputMessageXML.hasComplexContent())
+                {
+                    if (outputEncoding.useStyle == SOAPConstants.USE_ENCODED)
+                    {
+                        // First, look for the part with an unqualified name
+                        partQName = new QName("", part.name.localName);
+                        encodedPartValues = outputMessageXML.elements(partQName);
+
+                        if (encodedPartValues.length() == 0)
+                        {
+                            // HACK: Sometimes the soap:body namespace attribute
+                            // is used to qualify parts under the operation
+                            // wrapper, so we then look with this in mind...
+                            var encodedNamespace:String = outputEncoding.namespaceURI;
+                            partQName = new QName(encodedNamespace, part.name.localName);
+                            encodedPartValues = outputMessageXML.elements(partQName);
+
+                            // HACK: Sometimes the inputEncoding soap:body
+                            // namespace attribute is incorrectly used
+                            // for the output message parts too...
+                            if (encodedPartValues.length() == 0)
+                            {
+                                encodedNamespace = inputEncoding.namespaceURI;
+                                partQName = new QName(encodedNamespace, part.name.localName);
+                                encodedPartValues = outputMessageXML.elements(partQName);
+                            }
+                        }
+                    }
+                    else
+                    {
+                        encodedPartValues = outputMessageXML.elements(part.name);
+                    }
+                }
+                else
+                {
+                    encodedPartValues = outputMessageXML.text();
+                }
+            }
+
+            for each (encodedPartValue in encodedPartValues)
+            {
+                decodedPart = decode(encodedPartValue, partQName, partType, partDefinition);
+
+                // Handle multiple output parts separately...
+                if (parts.length > 1)
+                {
+                    // Map multiple parts to named properties on the result object
+                    if (multiplePartsFormat == "object")
+                    {
+                        // Create the result object, if not created already
+                        // (this is the first part we have seen so far)
+                        if (result == null)
+                        {
+                            // The QName of the element that contains the part
+                            // values is used to look up a registered AS type
+                            // for the result object. For RPC operations the
+                            // QName will be the full operation name. For Doc/Lit
+                            // wrapped the QName will be the same as the
+                            // outputMessage.wrappedQName. For Doc/Lit bare
+                            // the QName will be soap:Body.
+                            result = createContent(outputMessageXML.name());
+                            result.isSimple = false;
+                        }
+
+                        if (result[part.name.localName] == null)
+                        {
+                            // We need to create an array for this part's values
+                            // if there are > 1 encodedPartValues, or we are
+                            // forcingPartArrays for parts defined with maxOccurs>1
+                            // regardless of number of values.
+                            var partMaxOccurs:uint = getMaxOccurs(partDefinition);
+                            if ((partMaxOccurs > 1 && forcePartArrays)
+                                    || encodedPartValues.length() > 1)
+                            {
+                                result[part.name.localName] = createIterableValue(part.type);
+                            }
+                        }
+
+                        // If we have created an iterable container, this part
+                        // value needs to be pushed on it
+                        if (TypeIterator.isIterable(result[part.name.localName]))
+                            TypeIterator.push(result[part.name.localName], decodedPart);
+                        // Otherwise just assign the single value to the named property.
+                        else
+                            result[part.name.localName] = decodedPart;
+                    }
+                    else if (multiplePartsFormat == "array")
+                    {
+                        // If multiplePartsFormat == "array", we return each part
+                        // as an element in an Array (or some registered collection)
+                        if (result == null)
+                        {
+                            // If this is the first part/value, we create the
+                            // array (or typed collection based on the container
+                            // element's QName)
+                            result = createIterableValue(outputMessageXML.name());
+                        }
+                        TypeIterator.push(result, decodedPart);
+                    }
+                }
+                else
+                {
+                    // Single output part. Create result object if not created.
+                    if (result == null)
+                    {
+                        // The result object with only one part becomes the part
+                        // itself. The type of the result object is the type of
+                        // the part (if the part specifies a type).
+                        var sinlgePartResultType:QName = partType;
+
+                        // If the part specifies an element, the type of the result
+                        // object is looked up based on the element QName.
+                        if (sinlgePartResultType == null)
+                            sinlgePartResultType = part.element;
+
+                        // If neither a type, nor element is specified (rare case
+                        // where part becomes anyType), the part.name is used to
+                        // look up a strong type for the result object.
+                        if (sinlgePartResultType == null)
+                            sinlgePartResultType = part.name;
+
+                        var singlePartMaxOccurs:uint = getMaxOccurs(partDefinition);
+                        if ((singlePartMaxOccurs > 1 && forcePartArrays)
+                                 || encodedPartValues.length() > 1)
+                        {
+                            // If more than one value was returned for a single
+                            // output part, or the part is defined with maxOccurs > 1,
+                            // we treat it as an array of values. The appropriate
+                            // IList class is created based on the singlePartResultType
+                            result = createIterableValue(sinlgePartResultType);
+                        }
+                        else
+                        {
+                            // decodedPart will already be an instance of the
+                            // required strong type (or ObjectProxy or Object).
+                            // If the single part has a single value, the result
+                            // object itself becomes that value, so we only need
+                            // a content proxy here.
+                            result = createContent();
+                        }
+                    }
+
+                    if (TypeIterator.isIterable(result))
+                    {
+                        // Push multiple values to the iterable result
+                        TypeIterator.push(result, decodedPart);
+                    }
+                    else
+                    {
+                        result = decodedPart;
+                    }
+                }
+            }
+        }
+
+        // If necessary, unwrap result from its proxy wrapper
+        if (result is ContentProxy)
+            result = ContentProxy(result).object_proxy::content;
+
+        soapResult.result = result;
+    }
+
+    /**
+     * Decodes a SOAP 1.1. Fault.
+     *
+     * FIXME: We need to add SOAP 1.2 Fault support which is very different
+     * from SOAP 1.1.
+     */
+    protected function decodeFaults(faultsXMLList:XMLList):Array
+    {
+        log.debug("SOAP: Decoding SOAP response fault");
+        var faults:Array = [];
+
+        for each (var faultXML:XML in faultsXMLList)
+        {
+            var code:QName;
+            var string:String;
+            var detail:String;
+            var element:XML = faultXML;
+            var actor:String;
+
+            var faultProperties:XMLList = faultXML.children();
+            for each (var child:XML in faultProperties)
+            {
+                if (child.localName() == "faultcode")
+                {
+                    code = schemaManager.getQNameForPrefixedName(child.toString(), child);
+                }
+                else if (child.localName() == "faultstring")
+                {
+                    string = child.toString();
+                }
+                else if (child.localName() == "faultactor")
+                {
+                    actor = child.toString();
+                }
+                else if (child.localName() == "detail")
+                {
+                    if (child.hasComplexContent())
+                    {
+                        detail = child.children().toXMLString();
+                    }
+                    else
+                    {
+                        detail = child.toString();
+                    }
+                }
+            }
+
+            var fault:SOAPFault = new SOAPFault(code, string, detail, element, actor);
+            faults.push(fault);
+        }
+        return faults;
+    }
+
+    protected function decodeHeaders(headerXML:XML):Array
+    {
+        log.debug("Decoding SOAP response headers");
+
+        var headers:Array = [];
+        var headerXMLList:XMLList = headerXML.elements();
+        for each (var headerChild:XML in headerXMLList)
+        {
+            if (headerFormat == "object")
+            {
+                var xsiType:QName = getXSIType(headerChild);
+                var definition:XML = null;
+                var headerContent:Object = null;
+
+                // Check for xsi:type on the header
+                if (xsiType != null)
+                    definition = schemaManager.getNamedDefinition(xsiType,
+                            constants.complexTypeQName, constants.simpleTypeQName);
+
+                // We found a definition for the type.
+                if (definition != null)
+                {
+                    // Release scope, since we were only checking if definition exists.
+                    schemaManager.releaseScope();
+                    headerContent = decode(headerChild, null, xsiType);
+                }
+                else
+                {
+                    // We don't have a type definition. Attempt to find an element
+                    // definition for the QName of the header. If there is none,
+                    // decode() will fall back to anyType.
+                    headerContent = decode(headerChild, headerChild.name());
+                }
+
+                // Create the SOAPHeader wrapper.
+                var headerObject:SOAPHeader = new SOAPHeader(headerChild.name(), headerContent);
+
+                // decode mustUnderstand attribute
+                var muValue:String = XMLUtil.getAttributeByQName(headerChild,
+                            soapConstants.mustUnderstandQName).toString();
+                if (muValue == "1")
+                    headerObject.mustUnderstand = true;
+
+                // decode actor attribute
+                var actValue:String = XMLUtil.getAttributeByQName(headerChild,
+                            soapConstants.actorQName).toString();
+                if (actValue != "")
+                    headerObject.role = actValue;
+
+                headers.push(headerObject);
+            }
+            else if (headerFormat == "e4x")
+            {
+                headers.push(headerChild);
+            }
+            else if (headerFormat == "xml")
+            {
+                headers.push(new XMLDocument(headerChild.toString()));
+            }
+        }
+
+        return headers;
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Methods - XML Decoding
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+    * @private
+    */
+    override public function decodeComplexType(definition:XML, parent:*, name:QName, value:*, restriction:XML=null, context:DecodingContext=null):void
+    {
+        if (value is XML)
+        {
+            var valXML:XML = value as XML;
+
+            if (valXML.elements(SOAPConstants.diffgramQName).length() > 0
+                && valXML.elements(schemaConstants.schemaQName).length() > 0)
+            {
+                // If we have XML with the elements of a .NET DataSet, we
+                // short-circuit to decodeType, which will call the special
+                // decode function for the DataSetType
+                decodeType(SOAPConstants.diffgramQName, parent, valXML.name(), value);
+                return;
+            }
+        }
+
+        // If the value provided is not XML, or doesn't have the elements
+        // of a .NET DataSet, we just call super.
+        super.decodeComplexType(definition, parent, name, value, restriction, context);
+    }
+
+    /**
+     * @private
+     */
+    override public function decodeType(type:QName, parent:*, name:QName, value:*, restriction:XML = null):void
+    {
+        // SOAP encoding specifies a type directly on the value and we
+        // can usually use it unless it is a type that is not built-in
+        // nor has a schema type definition. The value's specific type is
+        // retained as originalType in case we need to fall back to using it.
+        var originalType:QName = type;
+        var xsiType:QName = getXSIType(value);
+        if (xsiType != null)
+            type = xsiType;
+
+        // HACK: If encoded, translate simple SOAP types to XSD types.
+        if (outputEncoding.useStyle == SOAPConstants.USE_ENCODED)
+        {
+            // FIXME: This should be managed by the schemaManager's unmarshaller
+            if (SOAPConstants.isSOAPEncodedType(type))
+            {
+                var datatypes:SchemaDatatypes = schemaManager.schemaDatatypes;
+                if (type == soapConstants.soapBase64QName)
+                {
+                    type = datatypes.base64BinaryQName;
+                }
+                else
+                {
+                    var localName:String = type.localName;
+                    if (localName != "Array" && localName != "arrayType")
+                    {
+                        type = schemaConstants.getQName(localName);
+                    }
+                }
+            }
+        }
+
+        // Look for a custom SOAP type to handle the decoding
+        var customType:ICustomSOAPType = SOAPConstants.getCustomSOAPType(type);
+        if (customType != null)
+        {
+            customType.decode(this, parent, name, value, restriction);
+            setXSIType(parent, type);
+        }
+        else
+        {
+            // We didn't do custom SOAP type decoding, so we need to delegate
+            // but we need to pass a valid type to the base processing routine.
+            var constants:SchemaConstants = schemaManager.schemaConstants;
+            if (isBuiltInType(type))
+            {
+                super.decodeType(type, parent, name, value, restriction);
+            }
+            else
+            {
+                var definition:XML = schemaManager.getNamedDefinition(type,
+                        constants.complexTypeQName,
+                        constants.simpleTypeQName,
+                        constants.elementTypeQName);
+
+                if (definition != null)
+                {
+                    // We're done with this definition; just needed to see if
+                    // we had it so we release the scope.
+                    schemaManager.releaseScope();
+                    super.decodeType(type, parent, name, value, restriction);
+                }
+                else
+                {
+                    // We don't have a type def for the value's specific
+                    // xsi type, so fall back to the default type passed in.
+                    super.decodeType(originalType, parent, name, value, restriction);
+                }
+            }
+        }
+    }
+
+    /**
+     * This override intercepts dencoding a complexType with complexContent based
+     * on a SOAP encoded Array. This awkward approach to Array type definitions
+     * was popular in WSDL 1.1 rpc-encoded operations and is a special case that
+     * needs to be handled, but note it violates the WS-I Basic Profile 1.0.
+     *
+     * @private
+     */
+    override public function decodeComplexRestriction(restriction:XML, parent:*, name:QName, value:*):void
+    {
+        // Handle <restriction base="soap-enc:Array"> as a special case
+        var schemaConstants:SchemaConstants = schemaManager.schemaConstants;
+        var baseName:String = restriction.@base;
+        var baseQName:QName = schemaManager.getQNameForPrefixedName(baseName, restriction);
+        if (baseQName == soapConstants.soapencArrayQName)
+        {
+            var customType:ICustomSOAPType = SOAPConstants.getCustomSOAPType(baseQName);
+            if (customType != null)
+            {
+                customType.decode(this, parent, name, value, restriction);
+                return;
+            }
+        }
+
+        super.decodeComplexRestriction(restriction, parent, name, value);
+    }
+
+
+    override public function reset():void
+    {
+        super.reset();
+        _referencesResolved = false;
+        _elementsWithId = null;
+    }
+
+
+    /**
+     * Overrides XMLDecoder.parseValue to allow us to detect a legacy case
+     * of literal style encoding where by generically encoded compound types
+     * (such as arrays) had entries encoded with multiple child
+     * item elements (instead of matching the correct schema
+     * definition of just repeating the value node).
+     *
+     * @private
+     */
+    override protected function parseValue(name:*, value:XMLList):*
+    {
+        if (supportGenericCompoundTypes
+            && outputEncoding.useStyle == SOAPConstants.USE_LITERAL
+            && value.length() > 0)
+        {
+            // Look for child <item> elements as direct descendents of the value
+            var itemQName:QName = new QName(value[0].name().uri, "item");
+            var items:XMLList = value.elements(itemQName);
+            if (items.length() > 0)
+                value = items;
+        }
+
+        return super.parseValue(name, value);
+    }
+
+
+    /**
+     * Overrides XMLDecoder.preProcessXML to allow us to handle multi-ref SOAP
+     * encoding.
+     * @private
+     */
+    override protected function preProcessXML(root:XML):void
+    {
+        // Only RPC/encoded uses multi-ref encoding.
+        if (outputEncoding.useStyle == SOAPConstants.USE_ENCODED)
+            resolveReferences(root);
+    }
+
+    /**
+     * Resolves multi-refs in rpc/encoded. Substitutes each reference by its
+     * referent node.
+     */
+    private function resolveReferences(root:XML, cleanupElementsWithIdCache:Boolean=true):void
+    {
+        if (_referencesResolved) return;
+
+        var index:uint = 0;
+        if (_elementsWithId == null)
+            _elementsWithId = document..*.(attribute("id").length() > 0);
+
+        // Note that we must consider all child nodes here, not just elements
+        // as we need the accurate index in terms of child XML nodes to replace
+        // a node with the referent.
+        for each (var child:XML in root.children())
+        {
+            if (child.nodeKind() == "element")
+            {
+                var element:XML = child;
+                var href:String = getAttributeFromNode("href", element);
+                if (href != null)
+                {
+                    var hashPosition:int = href.indexOf("#");
+                    if (hashPosition >= 0)
+                        href = href.substring(hashPosition + 1);
+
+                    // Find the first element with a matching id attribute
+                    var matches:XMLList = _elementsWithId.(@id == href);
+                    var referent:XML;
+
+                    if (matches.length() > 0)
+                        referent = matches[0];
+                    else
+                        throw new Error("The element referenced by id '" + href + "' was not found.");
+
+                    referent.setName(element.name());
+
+                    if (referent.hasComplexContent())
+                        resolveReferences(referent, false);
+
+                    root.replace(index, referent);
+                }
+                else if (element.hasComplexContent())
+                {
+                    resolveReferences(element, false);
+                }
+            }
+
+            index++;
+        }
+
+        if (cleanupElementsWithIdCache)
+        {
+            _elementsWithId = null;
+            // At this point all references have been resolved.
+            _referencesResolved = true;
+        }
+    }
+
+
+    //--------------------------------------------------------------------------
+    //
+    // Variables
+    //
+    //--------------------------------------------------------------------------
+
+
+    private var log:ILogger;
+    private var _elementsWithId:XMLList;
+    private var _forcePartArrays:Boolean;
+    private var _headerFormat:String;
+    private var _ignoreWhitespace:Boolean = true;
+    private var _multiplePartsFormat:String;
+    private var _referencesResolved:Boolean; // Used to prevent repeat resolution passes for a single document.
+    private var _resultFormat:String;
+    private var _wsdlOperation:mx.rpc.wsdl.WSDLOperation;
+
+
+    /**
+     * A RegEx pattern to help replace the whitespace between processing
+     * instructions and root tags.
+     */
+    public static var PI_WHITESPACE_PATTERN:RegExp = new RegExp("[\\?][>]\\s*[<]", "g");
+}
+
+}


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

--- frameworks/projects/framework/src/mx/effects/Sequence.as
+++ frameworks/projects/framework/src/mx/effects/Sequence.as
@@ -0,0 +1,114 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2003-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.effects
+{
+
+import mx.effects.effectClasses.SequenceInstance;
+
+/**
+ *  The Sequence effect plays multiple child effects one after the other,
+ *  in the order in which they are added.
+ *
+ *
You can create a Sequence effect in MXML,
+ *  as the following example shows:

+ *
+ *

+ *  <mx:Sequence id="WipeRightUp">
+ *    <mx:children>
+ *      <mx:WipeRight duration="1000"/>
+ *      <mx:WipeUp duration="1000"/>
+ *    </mx:children>
+ *  </mx:Sequence>
+ *
+ *  <mx:VBox id="myBox" hideEffect="{WipeRightUp}">
+ *    <mx:TextArea id="aTextArea" text="hello"/>
+ *  </mx:VBox>
+ *

+ *
+ *
Notice that the <mx:children> tag is optional.

+ *
+ *
Starting a composite effect in ActionScript is usually
+ *  a five-step process:

+ *
+ *

+ *
Create instances of the effect objects to be composited together;
+ *    for example:
+ *
myFadeEffect = new mx.effects.Fade(target);

+ *
Set properties, such as duration, on the individual effect objects.

+ *
Create an instance of the Sequence effect object;
+ *    for example:
+ *
mySequenceEffect = new mx.effects.Sequence();

+ *
Call the addChild() method for each of the effect objects;
+ *    for example:
+ *
mySequenceEffect.addChild(myFadeEffect);

+ *
Invoke the Sequence effect's play() method;
+ *    for example:
+ *
mySequenceEffect.play();

+ *

+ *
+ *  @mxml
+ *
+ *
The <mx:Sequence> tag
+ *  inherits all of the tag attributes of its superclass,
+ *  and adds the following tag attributes:

+ *
+ *

+ *  <mx:Sequence id="identifier">
+ *    <mx:children>
+ *      <!-- Specify child effect tags -->
+ *    </mx:children>
+ *  </mx:Sequence>
+ *

+ *
+ *  @see mx.effects.effectClasses.SequenceInstance
+ *
+ *  @includeExample examples/SequenceEffectExample.mxml
+ */
+public class Sequence extends CompositeEffect
+{
+    include "../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 *
+	 *  @param target This argument is ignored for Sequence effects.
+	 *  It is included only for consistency with other types of effects.
+	 */
+	public function Sequence(target:Object = null)
+	{
+		super(target);
+
+		instanceClass = SequenceInstance;
+	}
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods
+	//
+	//--------------------------------------------------------------------------
+
+ 	/**
+	 *  @private
+	 */
+	override protected function initInstance(instance:IEffectInstance):void
+	{
+		super.initInstance(instance);
+	}
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 6306
Author:   egeorgie@adobe.com
Date:     2009-04-28T01:17:42.359155Z

Log Message:
-----------
Layout PARB changes - rename "layout" package to "layouts"

QE Notes: None
Doc Notes: None
Bugs: None
Reviewer:
tests: checkintests

Modified Paths:
--------------
<path kind="dir" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DataGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/BasicLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/BasicLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutElementHelper.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutElementHelper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/Group.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/RowAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/RowAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/Block.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/Block.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LinearLayoutVector.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LinearLayoutVector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ButtonBarHorizontalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalLayout.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/HGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileLayout.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/RichEditableText2.as</path>
<path kind="dir" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/SkinnableContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/ScrollerLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/supportClasses/LayoutBase.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/supportClasses/LayoutBase.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/HorizontalAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/HorizontalAlign.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/GroupBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VGroup.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/VerticalLayout.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/VerticalLayout.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/ColumnAlign.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/ColumnAlign.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layout/TileOrientation.as" copyfrom-rev="6301" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/layouts/TileOrientation.as</path>

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

--- frameworks/projects/spark/src/spark/components/List.as
+++ frameworks/projects/spark/src/spark/components/List.as
@@ -25,8 +25,8 @@
 import spark.components.supportClasses.ItemRenderer;
 import spark.components.supportClasses.ListBase;
 import spark.events.RendererExistenceEvent;
-import spark.layout.HorizontalLayout;
-import spark.layout.VerticalLayout;
+import spark.layouts.HorizontalLayout;
+import spark.layouts.VerticalLayout;

 /**
  *  @copy spark.components.supportClasses.GroupBase#alternatingItemColors


Transferred from the Adobe Open Source Subversion Repository

Revision: 8721
Author:   aharui@adobe.com
Date:     2009-07-21T22:11:37.692397Z

Log Message:
-----------
Hopefully final implementation of IME support.

QE Notes: None
Doc Notes: new API in IIMESupport
Bugs: SDK-22267, SDK-18516
Reviewer: Gordon
API Change: Yes
Is noteworthy for integration: Yes, new API in IIMESupport
tests: checkintests mustella/gumbo/components/TextInput mustella/gumbo/components/TextArea

Modified Paths:
--------------
<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/framework/src/mx/controls/dataGridClasses/DataGridColumn.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/List.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextArea.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/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework_textLayout/src/mx/core/UITLFTextField.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/TextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/FocusManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/controls/NumericStepper.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IIMESupport.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/NumericStepper.as</path>

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

--- frameworks/projects/mx/src/mx/controls/NumericStepper.as
+++ frameworks/projects/mx/src/mx/controls/NumericStepper.as
@@ -454,19 +454,6 @@
     }

     //----------------------------------
-    //  editable
-    //----------------------------------
-
-    /**
-     *  @private
-     *  for IIMESupport
-     */
-    public function get editable():Boolean
-    {
-        return true;
-    }
-
-    //----------------------------------
     //  enabled
     //----------------------------------

@@ -632,6 +619,24 @@
         "repeatDelay" : "repeatDelay",
         "repeatInterval" : "repeatInterval"
     };
+
+    //----------------------------------
+    //  enableIME
+    //----------------------------------
+
+    /**
+     *  A flag that indicates whether the IME should
+     *  be enabled when the component receives focus.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get enableIME():Boolean
+    {
+        return true;
+    }

     //----------------------------------
     //  imeMode


Transferred from the Adobe Open Source Subversion Repository

Revision: 8044
Author:   chaase@adobe.com
Date:     2009-06-22T17:01:54.701660Z

Log Message:
-----------
Final (!) PARB changes for effects.
- renamed ArrayInterpolator to MultiValueInterpolator (and enhanced behavior to handle Vectors as well as Arrays).
- Created new AnimateTransform3D subclass of AnimateTransform (to hold 3D-specific properties/defaults), and moved Move3D, Rotate3D, Scale3D to subclass from this new class.

QE Notes: Change to default value of applyLocalProjection (matches former default on 3D effects, but not default on AnimateTransform).
Doc Notes: None
Bugs: None
Reviewer: Hans
Tests: checkintests, effects cyclone from QE

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/SimpleMotionPath.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Move3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Animate.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Scale3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/Animation.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform3D.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/animation/MotionPath.as</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as" copyfrom-rev="7917" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/MultiValueInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/Rotate3D.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/interpolation/ArrayInterpolator.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/AnimateTransform.as</path>

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

--- frameworks/projects/spark/src/spark/effects/Scale3D.as
+++ frameworks/projects/spark/src/spark/effects/Scale3D.as
@@ -14,6 +14,7 @@
 import mx.core.mx_internal;
 import mx.effects.IEffectInstance;

+import spark.effects.animation.MotionPath;
 import spark.effects.supportClasses.AnimateTransformInstance;

 use namespace mx_internal;
@@ -49,10 +50,15 @@
  *  <mx:Scale3D
  *    <b>Properties</b>
  *    id="ID"
- *    applyChangesPostLayout="true"
- *    scaleZBy="no default"
+ *    scaleXFrom="no default"
+ *    scaleXTo="no default"
+ *    scaleXBy="no default"
+ *    scaleYFrom="no default"
+ *    scaleYTo="no default"
+ *    scaleYBy="no default"
  *    scaleZFrom="no default"
  *    scaleZTo="no default"
+ *    scaleZBy="no default"
  *  />
  *  </pre>
  *
@@ -61,7 +67,7 @@
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class Scale3D extends Scale
+public class Scale3D extends AnimateTransform3D
 {
     include "../core/Version.as";

@@ -89,26 +95,113 @@
     //--------------------------------------------------------------------------

     //----------------------------------
-    //  applyChangesPostLayout
-    //----------------------------------
-    [Inspectable(category="General")]
-    /**
-     *  @copy AnimateTransform#applyChangesPostLayout
-     *  The default value for this property is true for 3D effects,
-     *  because the Flex layout system ignores 3D transformation properties.
-     *
-     *  @default true
-     *
-     *  @langversion 3.0
-     *  @playerversion Flash 10
-     *  @playerversion AIR 1.5
-     *  @productversion Flex 4
-     */
-    override public function get applyChangesPostLayout():Boolean
-    {
-        return super.applyChangesPostLayout;
-    }
-
+    //  scaleXFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  The starting scale factor in the x direction.
+     *  A scale value of 0.0 is invalid.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleXFrom:Number;
+
+    //----------------------------------
+    //  scaleXTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  The ending scale factor in the x direction.
+     *  A scale value of 0.0 is invalid.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleXTo:Number;
+
+    //----------------------------------
+    //  scaleXBy
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  The factor by which to scale the object in the x direction.
+     *  This is an optional parameter that can be used instead of one
+     *  of the other from/to values to specify the delta to add to the
+     *  from value or to derive the from value by subtracting from the
+     *  to value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleXBy:Number;
+
+    //----------------------------------
+    //  scaleYFrom
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  The starting scale factor in the y direction.
+     *  A scale value of 0.0 is invalid.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleYFrom:Number;
+
+    //----------------------------------
+    //  scaleYTo
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     *  The ending scale factor in the y direction.
+     *  A scale value of 0.0 is invalid.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleYTo:Number;
+
+    //----------------------------------
+    //  scaleYBy
+    //----------------------------------
+
+    [Inspectable(category="General", defaultValue="NaN")]
+
+    /**
+     * The factor by which to scale the object in the y direction.
+     * This is an optional parameter that can be used instead of one
+     * of the other from/to values to specify the delta to add to the
+     * from value or to derive the from value by subtracting from the
+     * to value.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public var scaleYBy:Number;
+
     //----------------------------------
     //  scaleZFrom
     //----------------------------------
@@ -172,14 +265,27 @@
     /**
      * @private
      */
+    override public function createInstance(target:Object = null):IEffectInstance
+    {
+        motionPaths = new Vector.<MotionPath>();
+        return super.createInstance(target);
+    }
+
+    /**
+     * @private
+     */
     override protected function initInstance(instance:IEffectInstance):void
     {
         if (!applyChangesPostLayout)
         {
-           addMotionPath("scaleZ", scaleZFrom, scaleZTo, scaleZBy);
+            addMotionPath("scaleX", scaleXFrom, scaleXTo, scaleXBy);
+            addMotionPath("scaleY", scaleYFrom, scaleYTo, scaleYBy);
+            addMotionPath("scaleZ", scaleZFrom, scaleZTo, scaleZBy);
         }
         else
         {
+            addPostLayoutMotionPath("postLayoutScaleX", scaleXFrom, scaleXTo, scaleXBy);
+            addPostLayoutMotionPath("postLayoutScaleY", scaleYFrom, scaleYTo, scaleYBy);
             addPostLayoutMotionPath("postLayoutScaleZ", scaleZFrom, scaleZTo, scaleZBy);
         }
         super.initInstance(instance);


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

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

 package mx.rpc.remoting
 {


Set scale to 1,1

Set scale to 1,1

--- frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
+++ frameworks/as/projects/FlexJSUI/src/org/apache/flex/core/graphics/Path.as
@@ -37,14 +37,7 @@
 			}
 			segments = new PathSegmentsCollection(data);
 			if (segments)
-			{
-				var rcBounds:Rectangle = segments.getBounds()
-				var sx:Number = rcBounds.width == 0 ? 1 : width / rcBounds.width;
-				var sy:Number = rcBounds.height == 0 ? 1 : height / rcBounds.height;
-				segments.generateGraphicsPath(graphicsPath, x, y, sx, sy);
-			}
-			if (segments)
-				segments.generateGraphicsPath(graphicsPath, x, y, sx, sy);
+				segments.generateGraphicsPath(graphicsPath, x, y, 1, 1);

 			graphics.drawPath(graphicsPath.commands, graphicsPath.data);
 			graphics.endFill();


Transferred from the Adobe Open Source Subversion Repository

Revision: 12339
Author:   clucier@adobe.com
Date:     2009-12-01T22:28:31.107685Z

Log Message:
-----------
Reducing some of the event dispatching noise in the SDK.  Seeing pretty good results in our runtime performance tests and startup times... 5%-15% improvement over all.  This is about all we'll be able to commit to for Flex 4.0.  Added hasEventListener test before dispatching more of our lifecycle events.  Modified compiler binding code-gen to do the same.  Documented all public facing events where applicable to denote that they are no longer capturable by default.

QE notes: No
Doc notes: No
Bugs: SDK-24249
Reviewer: Alex
Tests run: Mustella, Checkin
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/skins/spark/BorderContainerSkin.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/supportClasses/GraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/StyleManagerImpl.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColorStroke.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/managers/LayoutManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/SolidColor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/Container.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/graphics/GradientEntry.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/states/State.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableSecondPassEvaluator.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/binding/BindableProperty.vm</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>

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

--- frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
+++ frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as
@@ -1972,7 +1972,8 @@
      */
     mx_internal function childAdded(child:DisplayObject):void
     {
-        child.dispatchEvent(new FlexEvent(FlexEvent.ADD));
+        if (child.hasEventListener(FlexEvent.ADD))
+            child.dispatchEvent(new FlexEvent(FlexEvent.ADD));

         if (child is IUIComponent)
             IUIComponent(child).initialize(); // calls child.createChildren()
@@ -1983,7 +1984,8 @@
      */
     mx_internal function removingChild(child:DisplayObject):void
     {
-        child.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
+        if (child.hasEventListener(FlexEvent.REMOVE))
+            child.dispatchEvent(new FlexEvent(FlexEvent.REMOVE));
     }

     /**


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

--- frameworks/projects/spark/src/spark/accessibility/ButtonBarBaseAccImpl.as
+++ frameworks/projects/spark/src/spark/accessibility/ButtonBarBaseAccImpl.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 spark.accessibility
 {


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

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

 package spark.components.gridClasses
 {


no longer showing (Click to edit) when there are no variables added

--- WeaveUI/src/weave/ui/VariableListController.as
+++ WeaveUI/src/weave/ui/VariableListController.as
@@ -87,6 +87,8 @@
 				_editor.addEventListener(DragEvent.DRAG_ENTER, dragEnterCaptureHandler, true);
 			}

+			_nameColumn = null;
+			_valueColumn = null;
 			var dataGrid:DataGrid = _editor as DataGrid;
 			if (dataGrid)
 			{
@@ -94,21 +96,21 @@
 				dataGrid.addEventListener(ListEvent.ITEM_EDIT_END, handleItemEditEnd);
 				dataGrid.draggableColumns = false;

-				var nameCol:DataGridColumn = new DataGridColumn();
-				nameCol.sortable = false;
-				nameCol.editable = true;
-				nameCol.headerText = lang("Name (Click to edit)");
-				nameCol.labelFunction = getObjectName;
-				nameCol.showDataTips = true;
-				nameCol.dataTipFunction = nameColumnDataTip;
-
-				var valueCol:DataGridColumn = new DataGridColumn();
-				valueCol.sortable = false;
-				valueCol.editable = false;
-				valueCol.headerText = lang("Value");
-				valueCol.labelFunction = getItemLabel;
-
-				dataGrid.columns = [nameCol, valueCol];
+				_nameColumn = new DataGridColumn();
+				_nameColumn.sortable = false;
+				_nameColumn.editable = true;
+				_nameColumn.labelFunction = getObjectName;
+				_nameColumn.showDataTips = true;
+				_nameColumn.dataTipFunction = nameColumnDataTip;
+				setNameColumnHeader();
+
+				_valueColumn = new DataGridColumn();
+				_valueColumn.sortable = false;
+				_valueColumn.editable = false;
+				_valueColumn.headerText = lang("Value");
+				_valueColumn.labelFunction = getItemLabel;
+
+				dataGrid.columns = [_nameColumn, _valueColumn];
 			}
 			else if (_editor)
 			{
@@ -120,6 +122,16 @@
 			updateDataProvider();
 		}

+		private function setNameColumnHeader():void
+		{
+			if (!_nameColumn)
+				return;
+			if (hashMap && hashMap.getNames().length)
+				_nameColumn.headerText = lang("Name (Click to edit)")
+			else
+				_nameColumn.headerText = lang("Name");
+		}
+
 		private function nameColumnDataTip(item:Object, ..._):String
 		{
 			return lang("{0} (Click to rename)", getObjectName(item));
@@ -135,6 +147,8 @@
 		}

 		private var _editor:ListBase;
+		private var _nameColumn:DataGridColumn;
+		private var _valueColumn:DataGridColumn;
 		private const _hashMapJuggler:CallbackJuggler = new CallbackJuggler(this, refreshLabels, true);
 		private const _dynamicObjectJuggler:CallbackJuggler = new CallbackJuggler(this, updateDataProvider, true);
 		private const _childListJuggler:CallbackJuggler = new CallbackJuggler(this, updateDataProvider, false);
@@ -186,6 +200,7 @@
 			}
 			else if (hashMap)
 			{
+				setNameColumnHeader();
 				_editor.dataProvider = hashMap.getObjects();
 			}


removed class w/ duplicate qualified class name

--- WeaveData/src/weave/utils/DateUtils.as
+++ WeaveData/src/weave/utils/DateUtils.as
@@ -1,154 +0,0 @@
-package weave.utils
-{
-	import mx.formatters.DateFormatter;
-
-	public class DateUtils
-	{
-
-		private static var tempDate:Date;
-		public static function getCurrentDate():Date
-		{
-			tempDate = new Date();
-			var currentDate:Date = new Date();
-			tempDate.setDate(currentDate.getDate());
-			tempDate.setMonth(currentDate.getMonth());
-			tempDate.setFullYear(currentDate.getFullYear());
-
-			return tempDate;
-		}
-
-		private static var dateFormatter:DateFormatter;
-		public static function getCurrentDateInStringFormat(format:String='MM/DD/YYYY'):String
-		{
-			dateFormatter = new DateFormatter();
-			dateFormatter.formatString = format;
-
-			return dateFormatter.format(getCurrentDate());
-		}
-
-		public static function getDateInStringFormat(date:Date,format:String='MM/DD/YYYY'):String
-		{
-			dateFormatter = new DateFormatter();
-			dateFormatter.formatString = format;
-
-			return dateFormatter.format(date);
-		}
-
-		private static var validDateWords:Array = ['now','day','days','month','months'];
-		private static var validDateOperators:Array = ['+','-']
-
-		public static const millisecondsPerMinute:uint = 1000 * 60;
-		public static const millisecondsPerHour:uint = 1000 * 60 * 60;
-		public static const millisecondsPerDay:uint = 1000 * 60 * 60 * 24;
-		//assumes 31 days
-		public static const millisecondsPerMonth:uint = 1000 * 60 * 60 * 24 * 31;
-
-		/**
-		 * This function takes a string and converts it to a date object. This uses the Flex's
-		 * standard date formater if the string is in the standard date string format.
-		 * Else it assumes the string format uses the NOW keyword.
-		 * @param str The Date in String format
-		 *
-		 * @return The Date object.
-		 * */
-		public static function getDateFromString(str:String):Date
-		{
-			if(!str)
-				return null;
-
-			//if it does not start with now then use dateformatter to format the date
-			if(str.substr(0,3).toLowerCase() != 'now')
-				return DateFormatter.parseDateString(str);
-
-			if(str.toLowerCase() == 'now')
-				return getCurrentDate();
-
-
-			var currentDate:Date = getCurrentDate();
-
-			var operator:String = str.substr(3,1);
-
-			//checking for valid operator
-			if(validDateOperators.indexOf(operator) == -1)
-				return null;
-
-			var digit:Number = Number(str.substr(4,2));
-
-			if(isNaN(digit))
-				return null;
-
-			var modifier:String = str.substr(6);
-
-			//checking if valid date keyword is used
-			if(validDateWords.indexOf(modifier.toLowerCase()) == -1)
-				return null;
-
-			var dateInMS:Number = currentDate.getTime();
-
-			if(operator == '+')
-			{
-				dateInMS = dateInMS + digit * getDateKeywordInMS(modifier);
-			}else if (operator == '-')
-			{
-				dateInMS = dateInMS - digit * getDateKeywordInMS(modifier);
-			}
-
-			tempDate = new Date();
-			tempDate.setTime(dateInMS);
-
-			return tempDate;
-		}
-
-		/**
-		 * This function takes a date parameter and checks to see if it is within the range of the
-		 * start and end dates.
-		 * @param date The Date object we want to check
-		 * @param start The start date of the range
-		 * @param end The end date of the range
-		 *
-		 * @return Boolean value.
-		 * */
-		public static function isDateWithinRange(date:Date,start:Date,end:Date):Boolean
-		{
-			var dateInMS:Number = date.getTime();
-
-			var startInMS:Number = start.getTime();
-
-			var endInMS:Number = end.getTime();
-
-			if(startInMS <= dateInMS)
-				if(endInMS >= dateInMS)
-					return true;
-			return false;
-		}
-
-
-		/**
-		 * This function takes a date parameter in string format and checks to see if it is within the range of the
-		 * start and end dates.
-		 * @param date The date we want to check in String format
-		 * @param start The start date of the range in String format
-		 * @param end The end date of the range in String format
-		 *
-		 * @return Boolean value.
-		 * */
-		public static function isDateStringWithinRange(date:String,start:String,end:String):Boolean
-		{
-			var d:Date = getDateFromString(date);
-			var s:Date = getDateFromString(start);
-			var e:Date = getDateFromString(end);
-
-			return isDateWithinRange(d,s,e);
-		}
-
-		private static function getDateKeywordInMS(key:String):uint
-		{
-			if(key.toLowerCase() == 'day' || key.toLowerCase() == 'days')
-				return millisecondsPerDay;
-			if(key.toLowerCase() == 'month' || key.toLowerCase() == 'months')
-				return millisecondsPerMonth;
-
-			return null;
-		}
-	}
-}


debugInfoReceived notification added

debugInfoReceived notification added

--- KalturaHLSPlugin/src/com/kaltura/kdpfl/plugin/KalturaHLSMediator.as
+++ KalturaHLSPlugin/src/com/kaltura/kdpfl/plugin/KalturaHLSMediator.as
@@ -25,6 +25,9 @@
 	import org.puremvc.as3.interfaces.INotification;
 	import org.puremvc.as3.patterns.mediator.Mediator;

+	import org.osmf.net.httpstreaming.HLSHTTPStreamSource;
+	import org.osmf.events.HTTPStreamingEvent;
+
 	public class KalturaHLSMediator extends Mediator
 	{
 		public static const NAME:String = "KalturaHLSMediator";
@@ -133,7 +136,7 @@
 			}
 		}

-		protected function setupSubtitleTrait(trait:SubtitleTrait):void
+		protected function setupSubtitleTrait(trait:SubtitleTrait):void
 		{
 			_subtitleTrait = trait; // save SubtitleTrait in order to read languages
 			if ( _subtitleTrait && _subtitleTrait.languages.length > 0 )
@@ -145,7 +148,7 @@
 				}
 				_subtitleTrait.addEventListener(SubtitleEvent.CUE, sendSubtitleNotification);
 				sendNotification("textTracksReceived", {languages:langArray}); //will triger ClosedCaptions textTracksReceived function, through kplayer onTextTracksReceived listener
-			}
+			}
 		}
 		//var trait:NetStreamLoadTrait = element.getTrait(MediaTraitType.LOAD) as NetStreamLoadTrait;
 		protected function setupLoadTrait(trait:NetStreamLoadTrait):void


Transferred from the Adobe Open Source Subversion Repository

Revision: 9033
Author:   jszeto@adobe.com
Date:     2009-08-04T00:16:21.093735Z

Log Message:
-----------
MouseWheel behavior in TrackBase and Spinner

http://bugs.adobe.com/jira/browse/SDK-20154 - awkward mouse wheel behavior on Gumbo Sliders

When Slider is in focus, it listens for the mouseWheel event on the systemManager in the capture phase. Added the same support to Spinner (and thus NumericStepper). I decided against moving the functionality into Range because range is an abstract class that has no user interaction code in it. Thus it didn’t seem correct to put mouse handling code into it.

I updated some of the Halo classes to use the preventDefault/isDefaultPrevented functions instead of using stopPropagation in their mouseWheel handlers.

QE notes: Add test cases for Spinner and NumericStepper
Doc notes: Mention mouse wheel support in Spinner and NumericStepper
Bugs: SDK-20157
Reviewer: Hans
Tests run: Spinner, NumericStepper, Slider
Is noteworthy for integration: No

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

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

--- frameworks/projects/spark/src/spark/components/Spinner.as
+++ frameworks/projects/spark/src/spark/components/Spinner.as
@@ -13,7 +13,9 @@
 {

 import flash.events.Event;
+import flash.events.FocusEvent;
 import flash.events.KeyboardEvent;
+import flash.events.MouseEvent;
 import flash.ui.Keyboard;

 import mx.events.FlexEvent;
@@ -437,6 +439,47 @@
                 event.stopPropagation();
         }
     }
+
+    /**
+     *  @private
+     *  If the component is in focus, then it should respond to mouseWheel events. We listen to these
+     *  events on systemManager in the capture phase because this behavior should have the highest priority.
+     */
+    override protected function focusInHandler(event:FocusEvent):void
+    {
+        super.focusInHandler(event);
+        systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, true);
+    }
+
+    /**
+     *  @private
+     */
+    override protected function focusOutHandler(event:FocusEvent):void
+    {
+        super.focusOutHandler(event);
+        systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_WHEEL, system_mouseWheelHandler, true);
+    }
+
+    /**
+     *  Handles the mouseWheel event when the component is in focus. The spinner is
+     *  moved by the amount of the mouse event delta multiplied by the stepSize.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    protected function system_mouseWheelHandler(event:MouseEvent):void
+    {
+        if (!event.isDefaultPrevented())
+        {
+            var newValue:Number = nearestValidValue(value + event.delta * stepSize, stepSize);
+            setValue(newValue);
+            event.preventDefault();
+        }
+    }
+
+
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 5545
Author:   jimurphy@adobe.com
Date:     2009-03-25T19:00:52.330680Z

Log Message:
-----------
1st pass of rename according to the spec http://opensource.adobe.com/wiki/display/flexsdk/Dropping+the+Fx+Prefix

Flex now requires CSS Style declarations to declare @namespace rules and disambiguate between halo and spark components using CSS 3 namespace prefixes on type selectors. At compile time, this namespace information will be used to map type names to qualified ActionScript class names. At runtime, type selectors are matched on qualified ActionScript class name (for example mx.controls.Button rather than just Button). Flex 3 applications must be compiled with -compatibility-version=3.0.0 to get unqualified CSS type selector behavior.

QE: Yes, this build may help in updating test cases to use the new namespaces and class names.
Dev: Not yet
Doc: Not yet

Modified Paths:
--------------
748 paths were modified

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

--- frameworks/projects/spark/src/spark/components/VSlider.as
+++ frameworks/projects/spark/src/spark/components/VSlider.as
@@ -9,31 +9,31 @@
 //
 ////////////////////////////////////////////////////////////////////////////////

-package mx.components
+package spark.components
 {

 import flash.display.DisplayObject;
 import flash.geom.Point;
 import flash.geom.Rectangle;

-import mx.components.baseClasses.FxSlider;
+import spark.components.supportClasses.Slider;
 import mx.core.UIComponent;
 import mx.core.ILayoutElement;
-import mx.layout.LayoutElementFactory;
-
-[IconFile("FxVSlider.png")]
+import spark.layout.supportClasses.LayoutElementFactory;
+
+[IconFile("VSlider.png")]

 /**
- *  The FxVSlider class defines a vertical slider component.
+ *  The VSlider class defines a vertical slider component.
  *
- *  @includeExample examples/FxVSliderExample.mxml
+ *  @includeExample examples/VSliderExample.mxml
  *
  *  @langversion 3.0
  *  @playerversion Flash 10
  *  @playerversion AIR 1.5
  *  @productversion Flex 4
  */
-public class FxVSlider extends FxSlider
+public class VSlider extends Slider
 {
     include "../core/Version.as";

@@ -51,7 +51,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function FxVSlider()
+    public function VSlider()
     {
         super();
     }
@@ -142,7 +142,7 @@
     }

     /**
-     *  Return the position of the thumb button on a FxVSlider component.
+     *  Return the position of the thumb button on a VSlider component.
      *  This value is equal to the
      *  track height subtracted by the Y position of the thumb button
      *  relative to the track, and subtracted by the height of the thumb button.


Transferred from the Adobe Open Source Subversion Repository

Revision: 8401
Author:   smgilson@adobe.com
Date:     2009-07-06T21:34:44.861518Z

Log Message:
-----------
ASDoc on filters/BevelFilter.as

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

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ConvolutionFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ColorMatrixFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BlurFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DisplacementMapFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientGlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/ShaderFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GlowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/DropShadowFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientBevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/BevelFilter.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/filters/GradientFilter.as</path>

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

--- frameworks/projects/spark/src/spark/filters/BlurFilter.as
+++ frameworks/projects/spark/src/spark/filters/BlurFilter.as
@@ -43,8 +43,18 @@
  * wide, it can only be 2,048 pixels high.) If, for example, you zoom in on a large movie clip
  * with a filter applied, the filter is turned off if the resulting image exceeds the maximum dimensions.

  *
- * @tiptext A blur effect.
- *
+ *  @mxml
+ *
The <BlurFilter> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <BlurFilter
+ *    Properties
+ *    blurX="4.0"
+ *    blurY="4.0"
+ *    quality="low"
+ *  />
+ *

  *
  * @langversion 3.0
  * @playerversion Flash 10
@@ -58,158 +68,164 @@

 public class BlurFilter extends BaseFilter implements IBitmapFilter
 {
-	/**
-	 * Constructor. The default values create a soft, unfocused image.
-	 *
-	 * @tiptext Initializes the filter.
-	 * @langversion 3.0
-	 * @playerversion Flash 10
-	 * @playerversion AIR 1.5
-	 * @productversion Flex 4
-	 *
-	 * @param blurX The amount to blur horizontally. Valid values are from 0 to 255.0 (floating-point
-	 * value).
-	 * @param blurY The amount to blur vertically. Valid values are from 0 to 255.0 (floating-point
-	 * value).
-	 * @param quality The number of times to apply the filter. You can specify the quality using
-	 * the flash.filters.BitmapFilterQuality constants:
-	 *

-	 *
flash.filters.BitmapFilterQuality.LOW

-	 *
flash.filters.BitmapFilterQuality.MEDIUM

-	 *
flash.filters.BitmapFilterQuality.HIGH

-	 *

-	 *
High quality approximates a Gaussian blur.
-	 * For most applications, these three values are sufficient.
-	 * Although you can use additional numeric values up to 15 to achieve different effects, be aware
-	 * that higher values are rendered more slowly.

-	 */
-
-	public function BlurFilter(blurX:Number = 4.0, blurY:Number = 4.0, quality:int = 1)
-	{
-		super();
-
-		this.blurX = blurX;
-		this.blurY = blurY;
-		this.quality = quality;
-	}
-
-	//----------------------------------
+    /**
+     * Constructor. The default values create a soft, unfocused image.
+     *
+     * @tiptext Initializes the filter.
+     * @langversion 3.0
+     * @playerversion Flash 10
+     * @playerversion AIR 1.5
+     * @productversion Flex 4
+     *
+     * @param blurX The amount to blur horizontally. Valid values are from 0 to 255.0 (floating-point
+     * value).
+     * @param blurY The amount to blur vertically. Valid values are from 0 to 255.0 (floating-point
+     * value).
+     * @param quality The number of times to apply the filter. You can specify the quality using
+     * the flash.filters.BitmapFilterQuality constants:
+     *

+     *
flash.filters.BitmapFilterQuality.LOW

+     *
flash.filters.BitmapFilterQuality.MEDIUM

+     *
flash.filters.BitmapFilterQuality.HIGH

+     *

+     *
High quality approximates a Gaussian blur.
+     * For most applications, these three values are sufficient.
+     * Although you can use additional numeric values up to 15 to achieve different effects, be aware
+     * that higher values are rendered more slowly.

+     */
+
+    public function BlurFilter(blurX:Number = 4.0, blurY:Number = 4.0, quality:int = 1)
+    {
+        super();
+
+        this.blurX = blurX;
+        this.blurY = blurY;
+        this.quality = quality;
+    }
+
+    //----------------------------------
     //  blurX
     //----------------------------------
-
-	private var _blurX:Number = 4.0;
-
-	/**
-	 *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
-	 *  or less means that the original image is copied as is. The default
-	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
-	 *  are optimized to render more quickly than other values.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get blurX():Number
-	{
-		return _blurX;
-	}
-
-	public function set blurX(value:Number):void
-	{
-		if (value != _blurX)
-		{
-			_blurX = value;
-			notifyFilterChanged();
-		}
-	}
-
-	//----------------------------------
+
+    private var _blurX:Number = 4.0;
+
+    /**
+     *  The amount of horizontal blur. Valid values are 0 to 255. A blur of 1
+     *  or less means that the original image is copied as is. The default
+     *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+     *  are optimized to render more quickly than other values.
+     *
+     *  @default 4.0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get blurX():Number
+    {
+        return _blurX;
+    }
+
+    public function set blurX(value:Number):void
+    {
+        if (value != _blurX)
+        {
+            _blurX = value;
+            notifyFilterChanged();
+        }
+    }
+
+    //----------------------------------
     //  blurY
     //----------------------------------

-	private var _blurY:Number = 4.0;
-
-	/**
-	 *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
-	 *  or less means that the original image is copied as is. The default
-	 *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
-	 *  are optimized to render more quickly than other values.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get blurY():Number
-	{
-		return _blurY;
-	}
-
-	public function set blurY(value:Number):void
-	{
-		if (value != _blurY)
-		{
-			_blurY = value;
-			notifyFilterChanged();
-		}
-	}
+    private var _blurY:Number = 4.0;
+
+    /**
+     *  The amount of vertical blur. Valid values are 0 to 255. A blur of 1
+     *  or less means that the original image is copied as is. The default
+     *  value is 4. Values that are a power of 2 (such as 2, 4, 8, 16, and 32)
+     *  are optimized to render more quickly than other values.
+     *
+     *  @default 4.0
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get blurY():Number
+    {
+        return _blurY;
+    }
+
+    public function set blurY(value:Number):void
+    {
+        if (value != _blurY)
+        {
+            _blurY = value;
+            notifyFilterChanged();
+        }
+    }

-	//----------------------------------
+    //----------------------------------
     //  quality
     //----------------------------------
-
-	private var _quality:int = BitmapFilterQuality.LOW;
-
-	/**
-	 *  The number of times to apply the filter. The default value is
-	 *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
-	 *  once. The value BitmapFilterQuality.MEDIUM  applies the filter twice;
-	 *  the value BitmapFilterQuality.HIGH applies it three times. Filters
-	 *  with lower values are rendered more quickly.
-	 *
-	 *  For most applications, a quality value of low, medium, or high is
-	 *  sufficient. Although you can use additional numeric values up to 15
-	 *  to achieve different effects, higher values are rendered more slowly.
-	 *  Instead of increasing the value of quality, you can often get a similar
-	 *  effect, and with faster rendering, by simply increasing the values of
-	 *  the blurX and blurY properties.
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 10
-	 *  @playerversion AIR 1.5
-	 *  @productversion Flex 4
-	 */
-	public function get quality():int
-	{
-		return _quality;
-	}
-
-	public function set quality(value:int):void
-	{
-		if (value != _quality)
-		{
-			_quality = value;
-			notifyFilterChanged();
-		}
-	}
-
-	/**
-	 * Returns a copy of this filter object.
-	 *
-	 * @return A new BlurFilter instance with all the same
-	 * properties as the original BlurFilter instance.
-	 *
-	 * @langversion 3.0
- 	 * @playerversion Flash 10
- 	 * @playerversion AIR 1.5
-	 * @productversion Flex 4
-	 */
-
-	public function clone():BitmapFilter
-	{
-		return new flash.filters.BlurFilter(blurX, blurY, quality);
-	}
-
+
+    private var _quality:int = BitmapFilterQuality.LOW;
+
+    /**
+     *  The number of times to apply the filter. The default value is
+     *  BitmapFilterQuality.LOW, which is equivalent to applying the filter
+     *  once. The value BitmapFilterQuality.MEDIUM applies the filter twice;
+     *  the value BitmapFilterQuality.HIGH applies it three times. Filters
+     *  with lower values are rendered more quickly.
+     *
+     *
For most applications, a quality value of low, medium, or high is
+     *  sufficient. Although you can use additional numeric values up to 15
+     *  to achieve different effects, higher values are rendered more slowly.
+     *  Instead of increasing the value of quality, you can often get a similar
+     *  effect, and with faster rendering, by simply increasing the values of
+     *  the blurX and blurY properties.

+     *
+     *  @default "low"
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public function get quality():int
+    {
+        return _quality;
+    }
+
+    public function set quality(value:int):void
+    {
+        if (value != _quality)
+        {
+            _quality = value;
+            notifyFilterChanged();
+        }
+    }
+
+    /**
+     * Returns a copy of this filter object.
+     *
+     * @return A new BlurFilter instance with all the same
+     * properties as the original BlurFilter instance.
+     *
+     * @langversion 3.0
+     * @playerversion Flash 10
+     * @playerversion AIR 1.5
+     * @productversion Flex 4
+     */
+
+    public function clone():BitmapFilter
+    {
+        return new flash.filters.BlurFilter(blurX, blurY, quality);
+    }
+
 }
 }


Implement equals() with compareTo().

Implement equals() with compareTo().

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

--- src/as/com/threerings/crowd/chat/data/ChatChannel.as
+++ src/as/com/threerings/crowd/chat/data/ChatChannel.as
@@ -42,7 +42,7 @@
     // from interface Equalable
     public function equals (other :Object) :Boolean
     {
-        throw new Error("abstract");
+        return compareTo(other) == 0;
     }

     // from interface DSet_Entry


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

--- frameworks/projects/advancedgrids/src/mx/olap/OLAPCube.as
+++ frameworks/projects/advancedgrids/src/mx/olap/OLAPCube.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: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

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

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