Transferred from the Adobe Open Source Subversion Repository
Transferred from the Adobe Open Source Subversion Repository

Revision: 11031
Author:   preilly@adobe.com
Date:     2009-10-20T18:55:17.731469Z

Log Message: 
-----------
* A batch of compiler bug fixes.  The fix for SDK-18954 adds Embed
  support for smoothing, compression and quality.  For example:

    [Embed(source='foo.png',smoothing="false",compression="true",quality="80")]
    private var bar:Class;

  smoothing and compression are booleans and quality is a percentage
  between 0 and 100.  quality requires that compression be true.  The
  actual smoothing is implemented by the player at runtime.

QE notes: We need some new mxunit and mxmlcunit tests for the new
          Embed attributes.
Doc notes: See notes above
Bugs: SDK-18954, SDK-23607, SDK-23513, SDK-22471, SDK-21116
Reviewer: pfarland
Cycloner: me, Gaurav
Tests run: full cyclone
Is noteworthy for integration: yes
Code-level description of changes:
 
  frameworks/flex-config.xml

    Added default theme to match what is now in DefaultsConfigurator.

  modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java

    Flushed out defineBitsJPEG3().

  modules/compiler/src/java/flex2/compiler_en.properties

    Modified css.StylesContainer.InvalidStyleProperty by removing the
    themes.

    Modified css.StylesContainer.InvalidStyleTheme by adding the type.

    Added media.LosslessImageTranscoder.InvalidQuality and
    media.LosslessImageTranscoder.QualityRequiresCompression.

    Modified mxml.builder.ComponentBuilder.InvalidStyleThemeError and
    mxml.builder.ComponentBuilder.InvalidStyleThemeWarning by added the
    type.  This fixes SDK-23607.

  modules/compiler/src/java/flex2/compiler/media/LosslessImageTranscoder.java

    Applied Joa's patch, then reformatted, renamed some variables and
    methods, added some comments, added some error checking, and fixed
    bufferedImageToJPEG() by setting the destination type and bands.
    This fixes SDK-18954.

  modules/compiler/src/java/flex2/compiler/media/ImageTranscoder.java

    Added support for smoothing by adding buildSmoothingSprite() and
    generateSmoothingShape() and modifying doTranscode() to call them,
    when smoothing="true".

    Added some comments.

  modules/compiler/src/java/flex2/compiler/as3/reflect/NodeMagic.java

    Modified checkForIdentifier() to no longer filter out the empty
    string attribute, because this means "public".

  modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java

    Some code clean up.

  modules/compiler/src/java/flex2/compiler/css/StyleModule.java

    Updated addFontFaceRule() to use new AtEmbed.create() signature.

  modules/compiler/src/java/flex2/compiler/css/StyleDef.java

    Updated StyleProperty constructor calls to pass in the path.

  modules/compiler/src/java/flex2/compiler/css/StylesContainer.java

    Updated warning reporting to use styleProperty.getPath() instead of
    getPathForReporting(styleDef).  This fixes SDK-23513.

    Added themeNames to InvalidStyleProperty class and constructor.

  modules/compiler/src/java/flex2/compiler/mxml/rep/AtEmbed.java

    Modified create() to include a Source arg and to call
    tokenizeAndResolveSource().  This ensures that Transcoder.SOURCE is
    defined in the args.  Transcoder.SOURCE is required when exporting a
    SWC.  This fixes SDK-22471.

  modules/compiler/src/java/flash/css/StyleProperty.java

    Added path variable, constructor arg and getter.

  modules/compiler/src/java/flash/css/Descriptor.java

    Added an assert for a null path to the constructor.

  modules/thirdparty/batik/sources/org/apache/batik/css/parser/Parser.java

    Modified parseSimpleSelector() to report an error for an unresolved
    namespace.  This fixes SDK-21116.

  modules/thirdparty/batik/resources/org/apache/batik/css/parser/resources/Messages.properties

    Added message for unresolved.namespace.

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/flex-config.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/thirdparty/batik/sources/org/apache/batik/css/parser/Parser.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/LosslessImageTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/TranscoderException.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/ImageTranscoder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleProperty.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/reflect/NodeMagic.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/thirdparty/batik/resources/org/apache/batik/css/parser/resources/Messages.properties</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/AtEmbed.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flash/css/Descriptor.java</path>
<path kind="file" action="M">/flex/sdk/trunk/lib/batik-all-flex.jar</path>

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

danteinforno/flex-sdk,SlavaRa/flex-sdk,adufilie/flex-sdk,apache/flex-sdk,danteinforno/flex-sdk,adufilie/flex-sdk,shyamalschandra/flex-sdk,danteinforno/flex-sdk,SlavaRa/flex-sdk,shyamalschandra/flex-sdk,shyamalschandra/flex-sdk,danteinforno/flex-sdk,apache/flex-sdk,SlavaRa/flex-sdk,adufilie/flex-sdk,apache/flex-sdk,shyamalschandra/flex-sdk,apache/flex-sdk,SlavaRa/flex-sdk,shyamalschandra/flex-sdk,adufilie/flex-sdk,apache/flex-sdk,SlavaRa/flex-sdk,adufilie/flex-sdk,danteinforno/flex-sdk,shyamalschandra/flex-sdk,SlavaRa/flex-sdk,apache/flex-sdk,danteinforno/flex-sdk,adufilie/flex-sdk