0 Replies Latest reply on Oct 20, 2009 11:55 AM by Paul Reilly

    [svn:fx-trunk] 11031: * A batch of compiler bug fixes.

    Paul Reilly Level 1

      Revision: 11031

      Author:   preilly@adobe.com

      Date:     2009-10-20 11:55:17 -0700 (Tue, 20 Oct 2009)

       

      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.propert ies

       

          Added message for unresolved.namespace.

       

      Ticket Links:

      ************

          http://bugs.adobe.com/jira/browse/SDK-18954

          http://bugs.adobe.com/jira/browse/SDK-18954

          http://bugs.adobe.com/jira/browse/SDK-23607

          http://bugs.adobe.com/jira/browse/SDK-23513

          http://bugs.adobe.com/jira/browse/SDK-22471

          http://bugs.adobe.com/jira/browse/SDK-21116

          http://bugs.adobe.com/jira/browse/SDK-23607

          http://bugs.adobe.com/jira/browse/SDK-18954

          http://bugs.adobe.com/jira/browse/SDK-23513

          http://bugs.adobe.com/jira/browse/SDK-22471

          http://bugs.adobe.com/jira/browse/SDK-21116

       

      Modified Paths:

      **************

          flex/sdk/trunk/frameworks/flex-config.xml

          flex/sdk/trunk/lib/batik-all-flex.jar

          flex/sdk/trunk/modules/compiler/src/java/flash/css/Descriptor.java

          flex/sdk/trunk/modules/compiler/src/java/flash/css/StyleProperty.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/TranscoderException.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/As3Compiler.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/as3/reflect/NodeMagic.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/common/MxmlConfiguration.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleDef.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StyleModule.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/css/StylesContainer.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/ImageTranscoder.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/media/LosslessImageTranscoder.jav a

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/rep/AtEmbed.java

          flex/sdk/trunk/modules/compiler/src/java/flex2/compiler_en.properties

          flex/sdk/trunk/modules/swfutils/src/java/flash/swf/tools/SwfxPrinter.java

          flex/sdk/trunk/modules/thirdparty/batik/resources/org/apache/batik/css/parser/resources/M essages.properties

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