2011-02-15 Nikolas Zimmermann <nzimmermann@rim.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Feb 2011 15:11:57 +0000 (15:11 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Feb 2011 15:11:57 +0000 (15:11 +0000)
        Reviewed by Dirk Schulze.

        Pixel tests differences on 10.6.6 32bit vs. 64bit
        https://bugs.webkit.org/show_bug.cgi?id=54474

        When generating a SVG pixel test baseline with a vanilla 10.6.6 installation on a 32bit machine (Core Duo MBP)
        and comparing the run with a software-identical 64bit machine (Core 2 Duo MBP), there are about 250 differences.

        These fall in two categories:
        a) 1px differences in text AA, or when drawing circles (all _below_ a tolerance of 0.01). Only visible in the subtracted difference image.
           The reason is probably CGFloat being typedefed to double on 64bit machines, and float on 32bit machines.
           AffineTransform stores doubles, so on 32bit machines we loose precision from AffineTransform -> CGAffineTransform.

        b) Failures >0.1% (text origin/scale is slightly different, user-visible).
           Caused by several sources of numerical instabilities within the SVG rendering code.

           -> SVGPreserveAspectRatio::getCTM() computes an AffineTransform using doubles as input parameters, but floats are passed (like everywhere else in SVG).
              This method is used to compute the viewBox AffineTransform, that affects the rendering of every content in the document. RenderSVGRoot concats
              this transformation matrix to the GraphicsContext CTM, resulting in a source of numerical imprecision.

           -> SVGInlineTextBox::paintTextWithShadows() calculates a scaling factor for text, to scale up the specified font size, to the actual on-screen size.
              SVGInlineTextBox uses the scaled Font object, to draw in an unscaled context, that gets scaled up again afterwards.
              context->scale(1 / scalingFactor); scaledFont.drawText(); context->scale(scalingFactor);

              To remove the scale from the current GraphicsContext CTM, "context->scale(FloatSize(1 / scalingFactor, ...)" is used. As AffineTransform stores
              doubles internally, it's likely that "context->scale(FloatSize(1 / ctm.a(), .." doesn't give you a matrix with a=1, but something close to 1.
              Using "context->concatCTM(AffineTransform().scale(1 / ctm.a(), ..." could be used as workaround, to preserve double precision.
              Fixing that brings us down to just a few pixel tests that differ between 32 & 64bit. There is still numerical imprecision, as floating-point
              number representations aren't always precise. Unfortunately CoreGraphics doesn't provide a public way to just set a CTM, it only allows to concat them.
              Fortunately CGContextSetCTM() is available, as private method, that allows me to switch the context CTM to any arbitary CGAffineTransform.

              -> Add GraphicsContext::setCTM(const AffineTransform&) and implement it for all platforms (each explicitely exposes a 'setCTM' concept, except CG)
                 Use CGContextSetCTM() for CG, which appears to be present since at least 10.4, Cairo is using it for the same purpose since some years!

              -> Instead of scaling the GraphicsContext before drawing text, grab the current CTM using context->getCTM(), scale it by '1 / scalingFactor'
                 normalize the transform (look for values close to 0/1 using float precision, and round!), and assign it using context->setCTM(normalizedTransform).
                 After drawing, just switch back to the preserved original CTM, both operations need GraphicsContext::setCTM.
                 This fixes all pixel test differences between 32/64 bit machines that fall into category b).
                 The use of GraphicsContext::setCTM() allows to switch between arbitary context transformations _without_ inducing accumulated rounding imprecision.

        These combined patches fix the pixel test baseline changes.

        Updated existing Snow Leopard pixel test baseline with a 32bit machine, passes here with tolerance 0.
        The 64bit machine passes the baseline with tolerance 0.01.

        * platform/graphics/GraphicsContext.h: Add setCTM(const AffineTransform&) method.
        * platform/graphics/cairo/GraphicsContextCairo.cpp:
        (WebCore::GraphicsContext::setCTM): Implement setCTM.
        * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h:
        (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
        * platform/graphics/cg/GraphicsContextCG.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * platform/graphics/cg/GraphicsContextPlatformPrivateCG.h:
        (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
        * platform/graphics/chromium/GLES2Canvas.cpp:
        (WebCore::GLES2Canvas::setCTM): Ditto.
        * platform/graphics/chromium/GLES2Canvas.h:
        * platform/graphics/haiku/GraphicsContextHaiku.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * platform/graphics/openvg/GraphicsContextOpenVG.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * platform/graphics/qt/GraphicsContextQt.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * platform/graphics/skia/GraphicsContextSkia.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * platform/graphics/win/GraphicsContextWin.cpp:
        (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
        * platform/graphics/wince/GraphicsContextWinCE.cpp:
        (WebCore::GraphicsContextPlatformPrivate::concatCTM):
        (WebCore::GraphicsContextPlatformPrivate::setCTM): Ditto.
        (WebCore::GraphicsContext::setCTM):
        * platform/graphics/wx/GraphicsContextWx.cpp:
        (WebCore::GraphicsContext::setCTM): Ditto.
        * rendering/svg/SVGInlineTextBox.cpp: Use setCTM() to switch to a scale-free AffineTransform, and also to switch back to the original CTM after rendering text.
        (WebCore::normalizeTransform):
        (WebCore::SVGInlineTextBox::paintDecorationWithStyle):
        (WebCore::SVGInlineTextBox::paintTextWithShadows):
        * svg/SVGPreserveAspectRatio.cpp: s/double/float/.
        (WebCore::SVGPreserveAspectRatio::getCTM):
        * svg/SVGPreserveAspectRatio.h:
        * svg/SVGSVGElement.cpp: Simplify viewport() code, avoid using doubles.
        (WebCore::SVGSVGElement::viewport):

2011-02-16  Nikolas Zimmermann  <nzimmermann@rim.com>

        Reviewed by Dirk Schulze.

        Pixel tests differences on 10.6.6 32bit vs. 64bit
        https://bugs.webkit.org/show_bug.cgi?id=54474

        Update SnowLeopard SVG pixel test baseline, generated on a 32bit machine, where it passes with tolerance 0.
        This is the first chunk of several commits, as one commit is too huge for SVN.

        It should pass on modern 64bit machines as well, using tolerance 0.01.

        * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/struct-frag-03-t-expected.txt:
        * platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum:
        * platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png:
        * platform/mac/svg/batik/masking/maskRegions-expected.txt:
        * platform/mac/svg/custom/circular-marker-reference-1-expected.txt:
        * platform/mac/svg/custom/circular-marker-reference-2-expected.txt:
        * platform/mac/svg/custom/circular-marker-reference-3-expected.txt:
        * platform/mac/svg/custom/circular-marker-reference-4-expected.txt:
        * platform/mac/svg/custom/non-circular-marker-reference-expected.txt:
        * platform/mac/svg/custom/non-scaling-stroke-markers-expected.txt:
        * platform/mac/svg/custom/stroked-pattern-expected.txt:
        * platform/mac/svg/custom/text-rotated-gradient-expected.txt:
        * platform/mac/svg/custom/use-detach-expected.txt:
        * platform/mac/svg/hixie/links/001-expected.txt:
        * platform/mac/svg/hixie/viewbox/preserveAspectRatio/001-expected.txt:
        * platform/mac/svg/text/small-fonts-2-expected.txt:
        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@78704 268f45cc-cd09-0410-ab3c-d52691b4dbfc

128 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-03-t-expected.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum
LayoutTests/platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png
LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.txt
LayoutTests/platform/mac/svg/custom/circular-marker-reference-1-expected.txt
LayoutTests/platform/mac/svg/custom/circular-marker-reference-2-expected.txt
LayoutTests/platform/mac/svg/custom/circular-marker-reference-3-expected.txt
LayoutTests/platform/mac/svg/custom/circular-marker-reference-4-expected.txt
LayoutTests/platform/mac/svg/custom/non-circular-marker-reference-expected.txt
LayoutTests/platform/mac/svg/custom/non-scaling-stroke-markers-expected.txt
LayoutTests/platform/mac/svg/custom/stroked-pattern-expected.txt
LayoutTests/platform/mac/svg/custom/text-rotated-gradient-expected.txt
LayoutTests/platform/mac/svg/custom/use-detach-expected.txt
LayoutTests/platform/mac/svg/hixie/links/001-expected.txt
LayoutTests/platform/mac/svg/hixie/viewbox/preserveAspectRatio/001-expected.txt
LayoutTests/platform/mac/svg/text/small-fonts-2-expected.txt
LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt
Source/WebCore/platform/graphics/GraphicsContext.h
Source/WebCore/platform/graphics/cairo/GraphicsContextCairo.cpp
Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
Source/WebCore/platform/graphics/cg/GraphicsContextPlatformPrivateCG.h
Source/WebCore/platform/graphics/chromium/GLES2Canvas.cpp
Source/WebCore/platform/graphics/chromium/GLES2Canvas.h
Source/WebCore/platform/graphics/haiku/GraphicsContextHaiku.cpp
Source/WebCore/platform/graphics/openvg/GraphicsContextOpenVG.cpp
Source/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
Source/WebCore/platform/graphics/skia/GraphicsContextSkia.cpp
Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp
Source/WebCore/platform/graphics/wince/GraphicsContextWinCE.cpp
Source/WebCore/platform/graphics/wx/GraphicsContextWx.cpp
Source/WebCore/rendering/svg/SVGInlineTextBox.cpp
Source/WebCore/svg/SVGPreserveAspectRatio.cpp
Source/WebCore/svg/SVGPreserveAspectRatio.h
Source/WebCore/svg/SVGSVGElement.cpp

index cea8ec1..3cb7f6b 100644 (file)
@@ -1,3 +1,125 @@
+2011-02-16  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        Reviewed by Dirk Schulze.
+
+        Pixel tests differences on 10.6.6 32bit vs. 64bit
+        https://bugs.webkit.org/show_bug.cgi?id=54474
+
+        Update SnowLeopard SVG pixel test baseline, generated on a 32bit machine, where it passes with tolerance 0.
+        This is the first chunk of several commits, as one commit is too huge for SVN.
+
+        It should pass on modern 64bit machines as well, using tolerance 0.01.
+
+        * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/struct-frag-03-t-expected.txt:
+        * platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.checksum:
+        * platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png:
+        * platform/mac/svg/batik/masking/maskRegions-expected.txt:
+        * platform/mac/svg/custom/circular-marker-reference-1-expected.txt:
+        * platform/mac/svg/custom/circular-marker-reference-2-expected.txt:
+        * platform/mac/svg/custom/circular-marker-reference-3-expected.txt:
+        * platform/mac/svg/custom/circular-marker-reference-4-expected.txt:
+        * platform/mac/svg/custom/non-circular-marker-reference-expected.txt:
+        * platform/mac/svg/custom/non-scaling-stroke-markers-expected.txt:
+        * platform/mac/svg/custom/stroked-pattern-expected.txt:
+        * platform/mac/svg/custom/text-rotated-gradient-expected.txt:
+        * platform/mac/svg/custom/use-detach-expected.txt:
+        * platform/mac/svg/hixie/links/001-expected.txt:
+        * platform/mac/svg/hixie/viewbox/preserveAspectRatio/001-expected.txt:
+        * platform/mac/svg/text/small-fonts-2-expected.txt:
+        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.txt:
+
 2011-02-16  Philippe Normand  <pnormand@igalia.com>
 
         Reviewed by Adam Roben.
index 6c0c3ec..b3eb9ab 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/filters-image-03-f-expected.png differ
index 5994c11..8f2b773 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-17-b-expected.png differ
index 0859fa9..5620d41 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-grad-20-b-expected.png differ
index 8e9a9f3..210f495 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1-SE/pservers-pattern-03-f-expected.png differ
index e71e754..7dac291 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-03-t-expected.png differ
index b0fd90e..056a1df 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-08-t-expected.png differ
index 1cbd369..fc08fde 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-26-t-expected.png differ
index 1b903b8..5071839 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-30-t-expected.png differ
index 7c4d7b1..b67cf93 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-33-t-expected.png differ
index 0bb93a6..0697e06 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-34-t-expected.png differ
index 114961b..586aadc 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-36-t-expected.png differ
index 8ea9d11..ee04e6d 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-40-t-expected.png differ
index 2a84cda..552c0fb 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-44-t-expected.png differ
index 5520697..a2c9a7c 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-82-t-expected.png differ
index f723159..a8e25c1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/animate-elem-84-t-expected.png differ
index cd862a7..d56b627 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png differ
index 2c311e6..3ced620 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png differ
index 3fa2f70..4cb9d7f 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png differ
index 791c10e..fac655d 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png differ
index 2732cfe..11b6ac0 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-offset-01-b-expected.png differ
index f1e3a06..cc4ab1f 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-01-b-expected.png differ
index 5d3d206..776c37d 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/interact-order-02-b-expected.png differ
index c5f180f..1d150b8 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/linking-a-05-t-expected.png differ
index f17c2f7..1d237f4 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/metadata-example-01-b-expected.png differ
index ce75f8b..c1e8528 100644 (file)
@@ -6,7 +6,7 @@ layer at (0,0) size 480x360
       RenderSVGResourceMarker {marker} [id="marker1"] [markerUnits=strokeWidth] [ref at (50,50)] [angle=0.00]
         RenderSVGPath {rect} at (0,0) size 5x5 [fill={[type=SOLID] [color=#4169E1]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
       RenderSVGResourceMarker {marker} [id="marker2"] [markerUnits=strokeWidth] [ref at (100,100)] [angle=0.00]
-        RenderSVGPath {rect} at (0,0) size 15x15 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        RenderSVGPath {rect} at (0,0) size 16x16 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
     RenderSVGText {text} at (153,10) size 174x23 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 174x23
         chunk 1 (middle anchor) text run 1 at (153.00,28.00) startOffset 0 endOffset 22 width 174.00: "'marker' property test"
index 988ba50..8127fb4 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-02-t-expected.png differ
index 57dc6db..35bf57f 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-03-f-expected.png differ
index 3b6cfd3..ed6446c 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-04-t-expected.png differ
index b36d787..c00f83f 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-05-t-expected.png differ
index 11e4263..6b24993 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-06-t-expected.png differ
index 6f13fe3..eac5d2f 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-07-t-expected.png differ
index c969a54..2b064bc 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-08-t-expected.png differ
index afb4475..10a4980 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/paths-data-15-t-expected.png differ
index bcb4c71..c85ceab 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-06-b-expected.png differ
index 69caffb..37ee4d6 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-07-b-expected.png differ
index fc90936..dd2efb1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png differ
index 0ca9c7a..ca3004a 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-11-b-expected.png differ
index a3dbc3c..6b49f78 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-13-b-expected.png differ
index c8de283..7fa53b1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/render-groups-03-t-expected.png differ
index ecc8b87..bff9786 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-01-t-expected.png differ
index 5acd079..1c69a68 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-circle-02-t-expected.png differ
index 2d7de30..2590a1a 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/shapes-ellipse-01-t-expected.png differ
index b2312d3..5ab354b 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-frag-02-t-expected.png differ
index 34e3ff5..b618684 100644 (file)
@@ -3,9 +3,9 @@ layer at (0,0) size 480x360
 layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (0,0) size 480x360
     RenderSVGContainer {g} at (0,0) size 480x360
-      RenderSVGPath {rect} at (0,0) size 240x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]
+      RenderSVGPath {rect} at (0,0) size 241x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]
       RenderSVGPath {rect} at (240,180) size 240x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00]
-      RenderSVGPath {circle} at (0,180) size 240x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]
+      RenderSVGPath {circle} at (0,180) size 241x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]
       RenderSVGPath {circle} at (240,0) size 240x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00]
     RenderSVGText {text} at (105,186) size 66x12 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 66x12
index 171f0e1..0408baa 100644 (file)
@@ -2,11 +2,11 @@ layer at (0,0) size 480x360
   RenderView at (0,0) size 480x360
 layer at (0,0) size 480x360
   RenderSVGRoot {svg} at (56,0) size 368x360
-    RenderSVGContainer {g} at (60,0) size 360x360
-      RenderSVGPath {rect} at (60,0) size 180x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]
-      RenderSVGPath {rect} at (240,180) size 180x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00]
-      RenderSVGPath {circle} at (60,180) size 180x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]
-      RenderSVGPath {circle} at (240,0) size 180x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00]
+    RenderSVGContainer {g} at (59,0) size 361x360
+      RenderSVGPath {rect} at (59,0) size 181x180 [fill={[type=SOLID] [color=#DC143C]}] [x=100.00] [y=100.00] [width=50.00] [height=50.00]
+      RenderSVGPath {rect} at (239,180) size 181x180 [fill={[type=SOLID] [color=#DC143C]}] [x=150.00] [y=150.00] [width=50.00] [height=50.00]
+      RenderSVGPath {circle} at (59,180) size 181x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=125.00] [cy=175.00] [r=25.00]
+      RenderSVGPath {circle} at (239,0) size 181x180 [fill={[type=SOLID] [color=#FFD700]}] [cx=175.00] [cy=125.00] [r=25.00]
     RenderSVGText {text} at (105,186) size 66x12 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 66x12
         chunk 1 text run 1 at (105.00,195.00) startOffset 0 endOffset 16 width 65.83: "$Revision: 1.8 $"
index efc2aa4..15486a6 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/struct-image-02-b-expected.png differ
index 31b23fc..3b04fa9 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-path-01-b-expected.png differ
index 63d6d74..05c15e1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/text-text-01-b-expected.png differ
index cdbc510..b883212 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/types-basicDOM-01-b-expected.png differ
index 9be241a..c2a4e53 100644 (file)
@@ -62,9 +62,9 @@ layer at (0,0) size 450x500
         RenderSVGText {text} at (24,-18) size 52x19 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,0) size 52x19
             chunk 1 (middle anchor) text run 1 at (24.50,-3.00) startOffset 0 endOffset 6 width 51.00: "Mask 3"
-      RenderSVGContainer {g} at (264,322) size 92x83 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
-        RenderSVGContainer {use} at (264,340) size 92x65
-          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90x64
+      RenderSVGContainer {g} at (264,322) size 91x82 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
+        RenderSVGContainer {use} at (264,340) size 91x64
+          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90.00x64.00
           RenderSVGContainer {g} at (260,340) size 100x80
             RenderSVGPath {rect} at (260,340) size 100x80 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=100.00] [height=80.00]
         RenderSVGText {text} at (24,-18) size 52x19 contains 1 chunk(s)
index dfe6b08..2cc1401 100644 (file)
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (130,270) size 450x120
+  RenderSVGRoot {svg} at (129,270) size 451x120
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceMarker {marker} [id="mark"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
         RenderSVGPath {path} at (310,240) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 -2 L 0 -2 L 5 -2"]
-    RenderSVGPath {path} at (130,270) size 450x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
+    RenderSVGPath {path} at (129,270) size 451x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
index 40f9a94..5f93646 100644 (file)
@@ -1,9 +1,9 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (190,180) size 420x240 [start marker=mark] [middle marker=mark] [end marker=mark]
+  RenderSVGRoot {svg} at (189,180) size 421x240 [start marker=mark] [middle marker=mark] [end marker=mark]
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0 [start marker=mark] [middle marker=mark] [end marker=mark]
       RenderSVGResourceMarker {marker} [id="mark"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
         RenderSVGPath {circle} at (400,300) size 90x90 [stroke={[type=SOLID] [color=#FF0000] [line cap=ROUND]}] [start marker=mark] [middle marker=mark] [end marker=mark] [cx=4.00] [cy=4.00] [r=3.00]
-    RenderSVGPath {path} at (190,180) size 420x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 -2 L 0 -2 L 5 -2"]
-    RenderSVGPath {path} at (190,300) size 420x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
+    RenderSVGPath {path} at (189,180) size 421x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 -2 L 0 -2 L 5 -2"]
+    RenderSVGPath {path} at (189,300) size 421x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
index a8891cf..abceb19 100644 (file)
@@ -1,8 +1,8 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (130,270) size 450x120 [start marker=mark] [middle marker=mark] [end marker=mark]
+  RenderSVGRoot {svg} at (129,270) size 451x120 [start marker=mark] [middle marker=mark] [end marker=mark]
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0 [start marker=mark] [middle marker=mark] [end marker=mark]
       RenderSVGResourceMarker {marker} [id="mark"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
         RenderSVGPath {path} at (310,240) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 -2 L 0 -2 L 5 -2"]
-    RenderSVGPath {path} at (130,270) size 450x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
+    RenderSVGPath {path} at (129,270) size 451x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
index 3e1ef01..d70466e 100644 (file)
@@ -1,9 +1,9 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (130,270) size 450x120
+  RenderSVGRoot {svg} at (129,270) size 451x120
     RenderSVGResourceMarker {marker} [id="mark1"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
       RenderSVGPath {path} at (310,240) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark2] [middle marker=mark2] [end marker=mark2] [data="M -5 -2 L 0 -2 L 5 -2"]
     RenderSVGResourceMarker {marker} [id="mark2"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
       RenderSVGPath {path} at (310,300) size 180x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M -5 2 L 0 2 L 5 2"]
-    RenderSVGPath {path} at (130,270) size 450x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M -5 2 L 0 2 L 5 2"]
+    RenderSVGPath {path} at (129,270) size 451x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark1] [middle marker=mark1] [end marker=mark1] [data="M -5 2 L 0 2 L 5 2"]
index e64defa..9e806bd 100644 (file)
@@ -1,9 +1,9 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (190,210) size 420x210
+  RenderSVGRoot {svg} at (189,210) size 421x210
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceMarker {marker} [id="mark"] [markerUnits=strokeWidth] [ref at (4,4)] [angle=0.00]
         RenderSVGPath {circle} at (400,300) size 90x90 [stroke={[type=SOLID] [color=#FF0000] [line cap=ROUND]}] [cx=4.00] [cy=4.00] [r=3.00]
-    RenderSVGPath {path} at (220,210) size 360x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data="M -5 -2 L 0 -2 L 5 -2"]
-    RenderSVGPath {path} at (190,300) size 420x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
+    RenderSVGPath {path} at (219,210) size 361x60 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [data="M -5 -2 L 0 -2 L 5 -2"]
+    RenderSVGPath {path} at (189,300) size 421x120 [stroke={[type=SOLID] [color=#000000] [line cap=ROUND]}] [fill={[type=SOLID] [color=#000000]}] [start marker=mark] [middle marker=mark] [end marker=mark] [data="M -5 2 L 0 2 L 5 2"]
index c318800..93e4d9b 100644 (file)
@@ -1,11 +1,11 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (160,234) size 432x258
+  RenderSVGRoot {svg} at (159,234) size 433x258
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceMarker {marker} [id="arrow1"] [markerUnits=userSpaceOnUse] [ref at (5,5)] [angle=90.00]
-        RenderSVGPath {path} at (100,0) size 12x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]
+        RenderSVGPath {path} at (99,0) size 13x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]
       RenderSVGResourceMarker {marker} [id="arrow2"] [markerUnits=strokeWidth] [ref at (5,5)] [angle=90.00]
-        RenderSVGPath {path} at (100,0) size 12x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]
-    RenderSVGPath {line} at (160,234) size 426x12 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow1] [x1=10.00] [y1=40.00] [x2=80.00] [y2=40.00]
-    RenderSVGPath {line} at (160,468) size 432x24 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow2] [x1=10.00] [y1=80.00] [x2=80.00] [y2=80.00]
+        RenderSVGPath {path} at (99,0) size 13x12 [fill={[type=SOLID] [color=#0000FF]}] [data="M 5 0 L 10 10 L 0 10 Z"]
+    RenderSVGPath {line} at (159,234) size 427x12 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow1] [x1=10.00] [y1=40.00] [x2=80.00] [y2=40.00]
+    RenderSVGPath {line} at (159,468) size 433x24 [stroke={[type=SOLID] [color=#008000] [stroke width=2.00]}] [fill={[type=SOLID] [color=#000000]}] [end marker=arrow2] [x1=10.00] [y1=80.00] [x2=80.00] [y2=80.00]
index 02e0dec..52eae3a 100644 (file)
@@ -1,7 +1,7 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (130,0) size 540x600
+  RenderSVGRoot {svg} at (130,0) size 541x600
     RenderSVGHiddenContainer {defs} at (0,0) size 0x0
       RenderSVGResourceRadialGradient {radialGradient} [id="redToYellow"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50]
         RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
@@ -9,7 +9,7 @@ layer at (0,0) size 800x600
       RenderSVGResourcePattern {pattern} [id="pattern"] [patternUnits=userSpaceOnUse] [patternContentUnits=objectBoundingBox]
         RenderSVGPath {circle} at (98,0) size 112x80 [stroke={[type=SOLID] [color=#640000] [stroke width=12.00]}] [fill={[type=RADIAL-GRADIENT] [id="redToYellow"]}] [cx=20.00] [cy=20.00] [r=40.00]
     RenderSVGPath {rect} at (188,58) size 424x484 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=PATTERN] [id="pattern"]}] [x=50.00] [y=50.00] [width=350.00] [height=400.00]
-    RenderSVGPath {rect} at (130,0) size 540x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=448.00] [height=498.00]
+    RenderSVGPath {rect} at (130,0) size 541x600 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=448.00] [height=498.00]
     RenderSVGContainer {g} at (290,12) size 220x34
       RenderSVGText {text} at (134,10) size 182x13 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 182x13
index 15628e0..f2a0be8 100644 (file)
@@ -29,13 +29,13 @@ layer at (0,0) size 800x600
     RenderSVGText {text} at (0,152) size 712x23 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 712x23
         chunk 1 text run 1 at (0.00,170.00) startOffset 0 endOffset 88 width 712.00: "You should see the same pattern again, just a bit scaled, by the viewBox of an inner svg"
-    RenderSVGViewportContainer {svg} at (91,180) size 572x122
-      RenderSVGContainer {g} at (91,180) size 122x122 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}]
+    RenderSVGViewportContainer {svg} at (90,180) size 573x122
+      RenderSVGContainer {g} at (90,180) size 123x122 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}]
         RenderSVGText {text} at (100,71) size 76x37 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,0) size 76x37
             chunk 1 text run 1 at (100.00,100.00) startOffset 0 endOffset 4 width 76.00: "TEST"
-      RenderSVGContainer {g} at (241,180) size 122x122 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,0.00)}]
-        RenderSVGContainer {g} at (241,180) size 122x122 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}]
+      RenderSVGContainer {g} at (240,180) size 123x122 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,0.00)}]
+        RenderSVGContainer {g} at (240,180) size 123x122 [transform={m=((0.71,0.71)(-0.71,0.71)) t=(0.00,0.00)}]
           RenderSVGText {text} at (100,71) size 76x37 contains 1 chunk(s)
             RenderSVGInlineText {#text} at (0,0) size 76x37
               chunk 1 text run 1 at (100.00,100.00) startOffset 0 endOffset 4 width 76.00: "TEST"
index d5345b7..726bc68 100644 (file)
@@ -2,22 +2,22 @@ layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderSVGRoot {svg} at (112,12) size 688x236
-    RenderSVGContainer {g} at (112,12) size 240x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(5.00,5.00)}]
+    RenderSVGContainer {g} at (112,12) size 241x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(5.00,5.00)}]
       RenderSVGHiddenContainer {defs} at (0,0) size 0x0
         RenderSVGText {text} at (41,20) size 18x15 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,0) size 18x15
             chunk 1 (middle anchor) text run 1 at (41.88,31.00) startOffset 0 endOffset 3 width 16.25: "use"
-        RenderSVGPath {circle} at (220,96) size 24x24 [fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00]
-      RenderSVGContainer {g} at (208,57) size 48x66
-        RenderSVGContainer {use} at (208,57) size 48x42
-          RenderSVGContainer {g} at (208,57) size 48x42
+        RenderSVGPath {circle} at (220,96) size 25x25 [fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00]
+      RenderSVGContainer {g} at (208,57) size 49x66
+        RenderSVGContainer {use} at (208,57) size 49x42
+          RenderSVGContainer {g} at (208,57) size 49x42
             RenderSVGText {text} at (41,20) size 18x15 contains 1 chunk(s)
               RenderSVGInlineText {#text} at (0,0) size 18x15
                 chunk 1 (middle anchor) text run 1 at (41.88,31.00) startOffset 0 endOffset 3 width 16.25: "use"
         RenderSVGContainer {use} at (217,93) size 30x30
           RenderSVGContainer {g} at (217,93) size 30x30
             RenderSVGPath {circle} at (217,93) size 30x30 [stroke={[type=SOLID] [color=#000000]}] [fill={[type=SOLID] [color=#FF0000]}] [cx=50.00] [cy=40.00] [r=5.00]
-      RenderSVGPath {rect} at (112,12) size 240x120 [opacity=0.20] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
+      RenderSVGPath {rect} at (112,12) size 241x120 [opacity=0.20] [fill={[type=SOLID] [color=#000000]}] [x=0.00] [y=0.00] [width=100.00] [height=50.00]
     RenderSVGContainer {g} at (124,141) size 676x107 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,70.00)}]
       RenderSVGText {text} at (0,-11) size 291x44 contains 1 chunk(s)
         RenderSVGTSpan {tspan} at (0,0) size 284x14
index fbc4ece..6330654 100644 (file)
@@ -1,11 +1,11 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (250,90) size 300x420
-    RenderSVGContainer {a} at (250,90) size 300x180
-      RenderSVGPath {circle} at (250,90) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=30.00] [r=15.00]
+  RenderSVGRoot {svg} at (249,90) size 301x420
+    RenderSVGContainer {a} at (249,90) size 301x180
+      RenderSVGPath {circle} at (249,90) size 181x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=30.00] [r=15.00]
       RenderSVGPath {circle} at (370,90) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=60.00] [cy=30.00] [r=15.00]
-    RenderSVGContainer {a} at (250,330) size 300x180
-      RenderSVGContainer {g} at (250,330) size 300x180
-        RenderSVGPath {circle} at (250,330) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=70.00] [r=15.00]
+    RenderSVGContainer {a} at (249,330) size 301x180
+      RenderSVGContainer {g} at (249,330) size 301x180
+        RenderSVGPath {circle} at (249,330) size 181x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=40.00] [cy=70.00] [r=15.00]
         RenderSVGPath {circle} at (370,330) size 180x180 [fill={[type=SOLID] [color=#0000FF]}] [cx=60.00] [cy=70.00] [r=15.00]
index 5805797..4a25862 100644 (file)
@@ -1,10 +1,10 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (94,0) size 612x600
-    RenderSVGPath {rect} at (100,0) size 600x600 [fill={[type=SOLID] [color=#000080]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
-    RenderSVGPath {line} at (94,0) size 612x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=100.00] [y2=100.00]
-    RenderSVGPath {line} at (94,0) size 612x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=100.00] [y1=0.00] [x2=0.00] [y2=100.00]
+  RenderSVGRoot {svg} at (93,0) size 613x600
+    RenderSVGPath {rect} at (99,0) size 601x600 [fill={[type=SOLID] [color=#000080]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+    RenderSVGPath {line} at (93,0) size 613x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=100.00] [y2=100.00]
+    RenderSVGPath {line} at (93,0) size 613x600 [stroke={[type=SOLID] [color=#0000FF]}] [fill={[type=SOLID] [color=#000000]}] [x1=100.00] [y1=0.00] [x2=0.00] [y2=100.00]
     RenderSVGText {text} at (11,23) size 78x9 contains 1 chunk(s)
       RenderSVGInlineText {#text} at (0,0) size 78x9
         chunk 1 (middle anchor) text run 1 at (11.00,30.00) startOffset 0 endOffset 24 width 78.00: "This should be a SQUARE."
index 0534571..529b42e 100644 (file)
@@ -1,24 +1,24 @@
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600
 layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (160,0) size 492x534
-    RenderSVGContainer {g} at (160,0) size 282x78 [transform={m=((0.10,0.00)(0.00,0.10)) t=(10.00,10.00)}]
+  RenderSVGRoot {svg} at (159,0) size 493x534
+    RenderSVGContainer {g} at (159,0) size 283x78 [transform={m=((0.10,0.00)(0.00,0.10)) t=(10.00,10.00)}]
       RenderSVGText {text} at (0,-109) size 467x135 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 467x135
           chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 466.67: "0,1,2,3,4"
-    RenderSVGContainer {g} at (160,84) size 282x84 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,25.00)}]
+    RenderSVGContainer {g} at (159,84) size 283x84 [transform={m=((1.00,0.00)(0.00,1.00)) t=(10.00,25.00)}]
       RenderSVGText {text} at (0,-11) size 47x14 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 47x14
           chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 46.67: "0,1,2,3,4"
-    RenderSVGContainer {g} at (160,168) size 288x144 [transform={m=((12.00,0.00)(0.00,12.00)) t=(10.00,40.00)}]
+    RenderSVGContainer {g} at (159,168) size 289x144 [transform={m=((12.00,0.00)(0.00,12.00)) t=(10.00,40.00)}]
       RenderSVGText {text} at (0,-1) size 4x2 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 4x2
           chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 3.89: "0,1,2,3,4"
-    RenderSVGContainer {g} at (160,186) size 288x288 [transform={m=((24.00,0.00)(0.00,24.00)) t=(10.00,55.00)}]
+    RenderSVGContainer {g} at (159,186) size 289x288 [transform={m=((24.00,0.00)(0.00,24.00)) t=(10.00,55.00)}]
       RenderSVGText {text} at (0,-1) size 2x2 contains 1 chunk(s)
         RenderSVGInlineText {#text} at (0,0) size 2x2
           chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 9 width 1.94: "0,1,2,3,4"
-    RenderSVGContainer {g} at (160,372) size 492x162 [transform={m=((0.30,0.00)(0.00,0.30)) t=(10.00,65.00)}]
+    RenderSVGContainer {g} at (159,372) size 493x162 [transform={m=((0.30,0.00)(0.00,0.30)) t=(10.00,65.00)}]
       RenderSVGText {text} at (0,-8) size 273x86 contains 1 chunk(s)
         RenderSVGTSpan {tspan} at (0,0) size 223x11
           RenderSVGInlineText {#text} at (0,0) size 223x11
index 458dd3b..3001b2f 100644 (file)
@@ -62,9 +62,9 @@ layer at (0,0) size 933x1036
         RenderSVGText {text} at (26,-18) size 48x19 contains 1 chunk(s)
           RenderSVGInlineText {#text} at (0,0) size 48x19
             chunk 1 (middle anchor) text run 1 at (26.11,-3.00) startOffset 0 endOffset 6 width 47.78: "Mask 3"
-      RenderSVGContainer {g} at (547,667) size 191x173 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
-        RenderSVGContainer {use} at (547,704) size 191x136
-          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90x64
+      RenderSVGContainer {g} at (547,667) size 189x171 [transform={m=((1.00,0.00)(0.00,1.00)) t=(260.00,340.00)}]
+        RenderSVGContainer {use} at (547,704) size 189x134
+          [masker="mask_4"] RenderSVGResourceMasker {mask} at (5.00,0) size 90.00x64.00
           RenderSVGContainer {g} at (539,704) size 208x167
             RenderSVGPath {rect} at (539,704) size 208x167 [fill={[type=LINEAR-GRADIENT] [id="maskedGradient"]}] [x=0.00] [y=0.00] [width=100.00] [height=80.00]
         RenderSVGText {text} at (26,-18) size 48x19 contains 1 chunk(s)
index e7692a9..fddf775 100644 (file)
@@ -404,6 +404,7 @@ namespace WebCore {
         void setURLForRect(const KURL&, const IntRect&);
 
         void concatCTM(const AffineTransform&);
+        void setCTM(const AffineTransform&);
         AffineTransform getCTM() const;
 
 #if OS(WINCE) && !PLATFORM(QT)
index cdbfc57..3164566 100644 (file)
@@ -838,6 +838,17 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->concatCTM(transform);
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    if (paintingDisabled())
+        return;
+
+    cairo_t* cr = m_data->cr;
+    const cairo_matrix_t matrix = cairo_matrix_t(transform);
+    cairo_set_matrix(cr, &matrix);
+    m_data->setCTM(transform);
+}
+
 void GraphicsContext::addInnerRoundedRectClip(const IntRect& rect, int thickness)
 {
     if (paintingDisabled())
index a0dfc8c..2c5a160 100644 (file)
@@ -76,7 +76,7 @@ public:
     void rotate(float);
     void translate(float, float);
     void concatCTM(const AffineTransform&);
-    void concatCTM(const TransformationMatrix&);
+    void setCTM(const AffineTransform&);
     void beginTransparencyLayer() { m_transparencyCount++; }
     void endTransparencyLayer() { m_transparencyCount--; }
     void syncContext(PlatformGraphicsContext* cr);
@@ -91,7 +91,7 @@ public:
     void rotate(float) {}
     void translate(float, float) {}
     void concatCTM(const AffineTransform&) {}
-    void concatCTM(const TransformationMatrix&) {}
+    void setCTM(const AffineTransform&) {}
     void beginTransparencyLayer() {}
     void endTransparencyLayer() {}
     void syncContext(PlatformGraphicsContext* cr) {}
index 7dafadd..2f1a725 100644 (file)
 
 #endif
 
+// Undocumented CGContextSetCTM function, available at least since 10.4.
+extern "C" {
+    CG_EXTERN void CGContextSetCTM(CGContextRef, CGAffineTransform);
+};
+
 using namespace std;
 
 namespace WebCore {
@@ -1085,6 +1090,15 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->m_userToDeviceTransformKnownToBeIdentity = false;
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    if (paintingDisabled())
+        return;
+    CGContextSetCTM(platformContext(), transform);
+    m_data->setCTM(transform);
+    m_data->m_userToDeviceTransformKnownToBeIdentity = false;
+}
+
 AffineTransform GraphicsContext::getCTM() const
 {
     CGAffineTransform t = CGContextGetCTM(platformContext());
index ac39a4b..f9255df 100644 (file)
@@ -60,6 +60,7 @@ public:
     void rotate(float) {}
     void translate(float, float) {}
     void concatCTM(const AffineTransform&) {}
+    void setCTM(const AffineTransform&) {}
     void beginTransparencyLayer() {}
     void endTransparencyLayer() {}
 #endif
@@ -75,6 +76,7 @@ public:
     void rotate(float);
     void translate(float, float);
     void concatCTM(const AffineTransform&);
+    void setCTM(const AffineTransform&);
     void beginTransparencyLayer() { m_transparencyCount++; }
     void endTransparencyLayer() { m_transparencyCount--; }
 
index 6e6fadf..71f9cea 100644 (file)
@@ -263,6 +263,11 @@ void GLES2Canvas::concatCTM(const AffineTransform& affine)
     m_state->m_ctm *= affine;
 }
 
+void GLES2Canvas::setCTM(const AffineTransform& affine)
+{
+    m_state->m_ctm = affine;
+}
+
 void GLES2Canvas::clipPath(const Path& path)
 {
     bindFramebuffer();
index 605f86f..618f5b7 100644 (file)
@@ -68,6 +68,7 @@ public:
     void rotate(float angleInRadians);
     void scale(const FloatSize&);
     void concatCTM(const AffineTransform&);
+    void setCTM(const AffineTransform&);
     void clipPath(const Path&);
     void clipOut(const Path&);
 
index 4e17f94..b3f6c06 100644 (file)
@@ -443,6 +443,14 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     notImplemented();
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    if (paintingDisabled())
+        return;
+
+    notImplemented();
+}
+
 void GraphicsContext::setPlatformShouldAntialias(bool enable)
 {
     if (paintingDisabled())
index 6466a9c..75dbadb 100644 (file)
@@ -458,6 +458,14 @@ void GraphicsContext::concatCTM(const AffineTransform& transformation)
     m_data->concatTransformation(transformation);
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transformation)
+{
+    if (paintingDisabled())
+        return;
+
+    m_data->setTransformation(transformation);
+}
+
 void GraphicsContext::setURLForRect(const KURL& link, const IntRect& destRect)
 {
     notImplemented();
index 38cdd26..d552aa0 100644 (file)
@@ -1212,6 +1212,14 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->p()->setWorldTransform(transform, true);
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    if (paintingDisabled())
+        return;
+
+    m_data->p()->setWorldTransform(transform);
+}
+
 void GraphicsContext::setURLForRect(const KURL&, const IntRect&)
 {
     notImplemented();
index 9f2ed32..3a6efeb 100644 (file)
@@ -436,6 +436,17 @@ void GraphicsContext::concatCTM(const AffineTransform& affine)
     platformContext()->canvas()->concat(affine);
 }
 
+void GraphicsContext::setCTM(const AffineTransform& affine)
+{
+    if (paintingDisabled())
+        return;
+
+    if (platformContext()->useGPU())
+        platformContext()->gpuCanvas()->setCTM(affine);
+
+    platformContext()->canvas()->setMatrix(affine);
+}
+
 void GraphicsContext::drawConvexPolygon(size_t numPoints,
                                         const FloatPoint* points,
                                         bool shouldAntialias)
index bb22024..f2850e4 100644 (file)
@@ -197,4 +197,13 @@ void GraphicsContextPlatformPrivate::concatCTM(const AffineTransform& transform)
     ModifyWorldTransform(m_hdc, &xform, MWT_LEFTMULTIPLY);
 }
 
+void GraphicsContextPlatformPrivate::setCTM(const AffineTransform& transform)
+{
+    if (!m_hdc)
+        return;
+
+    XFORM xform = transform.toTransformationMatrix();
+    SetWorldTransform(m_hdc, &xform);
+}
+
 }
index 7b1c27b..a388509 100644 (file)
@@ -206,11 +206,16 @@ public:
         m_transform.rotate(rad2deg(radians));
     }
 
-    void  concatCTM(const AffineTransform& transform)
+    void concatCTM(const AffineTransform& transform)
     {
         m_transform *= transform;
     }
 
+    void setCTM(const AffineTransform& transform)
+    {
+        m_transform = transform;
+    }
+
     IntRect mapRect(const IntRect& rect) const
     {
         return m_transform.mapRect(rect);
@@ -1124,6 +1129,11 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     m_data->concatCTM(transform);
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    m_data->setCTM(transform);
+}
+
 AffineTransform& GraphicsContext::affineTransform()
 {
     return m_data->m_transform;
index 991be79..c322712 100644 (file)
@@ -494,6 +494,19 @@ void GraphicsContext::concatCTM(const AffineTransform& transform)
     return;
 }
 
+void GraphicsContext::setCTM(const AffineTransform& transform)
+{
+    if (paintingDisabled())
+        return;
+
+#if USE(WXGC)
+    wxGraphicsContext* gc = m_data->context->GetGraphicsContext();
+    if (gc)
+        gc->SetTransform(transform);
+#endif
+    return;
+}
+
 void GraphicsContext::setPlatformShouldAntialias(bool enable)
 {
     if (paintingDisabled())
index 52976f2..42c7fd6 100644 (file)
@@ -519,6 +519,29 @@ void SVGInlineTextBox::paintDecoration(GraphicsContext* context, ETextDecoration
     }
 }
 
+static inline void normalizeTransform(AffineTransform& transform)
+{
+    // Obtain consistent numerical results for the AffineTransform on both 32/64bit platforms.
+    // Tested with SnowLeopard on Core Duo vs. Core 2 Duo.
+    static const float s_floatEpsilon = std::numeric_limits<float>::epsilon();
+
+    if (fabs(transform.a() - 1) <= s_floatEpsilon)
+        transform.setA(1);
+    else if (fabs(transform.a() + 1) <= s_floatEpsilon)
+        transform.setA(-1);
+
+    if (fabs(transform.d() - 1) <= s_floatEpsilon)
+        transform.setD(1);
+    else if (fabs(transform.d() + 1) <= s_floatEpsilon)
+        transform.setD(-1);
+
+    if (fabs(transform.e()) <= s_floatEpsilon)
+        transform.setE(0);
+
+    if (fabs(transform.f()) <= s_floatEpsilon)
+        transform.setF(0);
+}
+
 void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, ETextDecoration decoration, const SVGTextFragment& fragment, RenderObject* decorationRenderer)
 {
     ASSERT(!m_paintingResource);
@@ -546,7 +569,12 @@ void SVGInlineTextBox::paintDecorationWithStyle(GraphicsContext* context, ETextD
     if (scalingFactor != 1) {
         width *= scalingFactor;
         decorationOrigin.scale(scalingFactor, scalingFactor);
-        context->scale(FloatSize(1 / scalingFactor, 1 / scalingFactor));
+
+        AffineTransform newTransform = context->getCTM();
+        newTransform.scale(1 / scalingFactor);
+        normalizeTransform(newTransform);
+
+        context->setCTM(newTransform);
     }
 
     decorationOrigin.move(0, -scaledFontMetrics.floatAscent() + positionOffsetForDecoration(decoration, scaledFontMetrics, thickness));
@@ -589,13 +617,21 @@ void SVGInlineTextBox::paintTextWithShadows(GraphicsContext* context, RenderStyl
         if (shadow)
             extraOffset = applyShadowToGraphicsContext(context, shadow, shadowRect, false /* stroked */, true /* opaque */, true /* horizontal */);
 
-        if (scalingFactor != 1)
-            context->scale(FloatSize(1 / scalingFactor, 1 / scalingFactor));
+        AffineTransform originalTransform;
+        if (scalingFactor != 1) {
+            originalTransform = context->getCTM();
+
+            AffineTransform newTransform = originalTransform;
+            newTransform.scale(1 / scalingFactor);
+            normalizeTransform(newTransform);
+
+            context->setCTM(newTransform);
+        }
 
         scaledFont.drawText(context, textRun, textOrigin + extraOffset, startPosition, endPosition);
 
         if (scalingFactor != 1)
-            context->scale(FloatSize(scalingFactor, scalingFactor));
+            context->setCTM(originalTransform);
 
         restoreGraphicsContextAfterTextPainting(context, textRun);
 
index 3f1172d..2ebcc1f 100644 (file)
@@ -247,15 +247,14 @@ void SVGPreserveAspectRatio::transformRect(FloatRect& destRect, FloatRect& srcRe
     }
 }
 
-// FIXME: We should use floats here, like everywhere else!
-AffineTransform SVGPreserveAspectRatio::getCTM(double logicX, double logicY, double logicWidth, double logicHeight, double physWidth, double physHeight) const
+AffineTransform SVGPreserveAspectRatio::getCTM(float logicX, float logicY, float logicWidth, float logicHeight, float physWidth, float physHeight) const
 {
     AffineTransform transform;
     if (m_align == SVG_PRESERVEASPECTRATIO_UNKNOWN)
         return transform;
 
-    double logicalRatio = logicWidth / logicHeight;
-    double physRatio = physWidth / physHeight;
+    float logicalRatio = logicWidth / logicHeight;
+    float physRatio = physWidth / physHeight;
 
     if (m_align == SVG_PRESERVEASPECTRATIO_NONE) {
         transform.scaleNonUniform(physWidth / logicWidth, physHeight / logicHeight);
index bf00ee4..bdee15c 100644 (file)
@@ -62,9 +62,9 @@ public:
 
     void transformRect(FloatRect& destRect, FloatRect& srcRect);
 
-    AffineTransform getCTM(double logicX, double logicY,
-                           double logicWidth, double logicHeight,
-                           double physWidth, double physHeight) const;
+    AffineTransform getCTM(float logicX, float logicY,
+                           float logicWidth, float logicHeight,
+                           float physWidth, float physHeight) const;
 
     template<class Consumer>
     static bool parsePreserveAspectRatio(Consumer* consumer, const String& value, bool validate = true)
index e2540e3..0778bb7 100644 (file)
@@ -129,20 +129,12 @@ void SVGSVGElement::setContentStyleType(const AtomicString& type)
 
 FloatRect SVGSVGElement::viewport() const
 {
-    double x = 0;
-    double y = 0;
-    if (!isOutermostSVG()) {
-        x = this->x().value(this);
-        y = this->y().value(this);
-    }
-    float w = width().value(this);
-    float h = height().value(this);
-    AffineTransform viewBox = viewBoxToViewTransform(w, h);
-    double wDouble = w;
-    double hDouble = h;
-    viewBox.map(x, y, x, y);
-    viewBox.map(w, h, wDouble, hDouble);
-    return FloatRect::narrowPrecision(x, y, wDouble, hDouble);
+    FloatRect viewRectangle;
+    if (!isOutermostSVG())
+        viewRectangle.setLocation(FloatPoint(x().value(this), y().value(this)));
+
+    viewRectangle.setSize(FloatSize(width().value(this), height().value(this)));    
+    return viewBoxToViewTransform(viewRectangle.width(), viewRectangle.height()).mapRect(viewRectangle);
 }
 
 int SVGSVGElement::relativeWidthValue() const