2012-01-27 Branimir Lambov <blambov@google.com>
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 12:38:57 +0000 (12:38 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 12:38:57 +0000 (12:38 +0000)
        SVG filters incorrectly move elements
        https://bugs.webkit.org/show_bug.cgi?id=73643

        Reviewed by Nikolas Zimmermann.

        New tests and updated expectations.

        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png: Removed.
        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt: Removed.
        * platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
        * platform/chromium-linux/svg/batik/filters/feTile-expected.png:
        * platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png: Added.
        * platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png:
        * platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png:
        * platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png:
        * platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png:
        * platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
        * platform/chromium-linux/svg/filters/big-sized-filter-expected.png: Added.
        * platform/chromium-linux/svg/filters/feDropShadow-expected.png:
        * platform/chromium-linux/svg/filters/filter-placement-issue-expected.png: Added.
        * platform/chromium-linux/svg/filters/filterRes-expected.png:
        * platform/chromium-linux/svg/filters/filterRes-expected.txt: Removed.
        * platform/chromium-linux/svg/filters/filterRes2-expected.png: Added.
        * platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png:
        * platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png:
        * platform/chromium-win/svg/filters/big-sized-filter-expected.png:
        * platform/chromium/test_expectations.txt:
        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
        * platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png:
        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png:
        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png:
        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png:
        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
        * 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.png:
        * 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.png:
        * platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
        * platform/mac/svg/as-background-image/svg-as-background-6-expected.png:
        * platform/mac/svg/batik/filters/feTile-expected.png:
        * platform/mac/svg/batik/masking/maskRegions-expected.png:
        * platform/mac/svg/clip-path/clip-in-clip-expected.png: Added.
        * platform/mac/svg/clip-path/clip-in-clip-expected.txt: Added.
        * platform/mac/svg/clip-path/clipper-placement-issue-expected.png: Added.
        * platform/mac/svg/clip-path/clipper-placement-issue-expected.txt: Added.
        * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png:
        * platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png:
        * platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png:
        * platform/mac/svg/custom/feComponentTransfer-Linear-expected.png:
        * platform/mac/svg/custom/feComponentTransfer-Table-expected.png:
        * platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png:
        * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
        * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png:
        * platform/mac/svg/custom/js-late-gradient-creation-expected.png:
        * platform/mac/svg/custom/text-rotated-gradient-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
        * platform/mac/svg/filters/big-sized-filter-expected.png:
        * platform/mac/svg/filters/feDropShadow-expected.png:
        * platform/mac/svg/filters/filter-placement-issue-expected.png: Added.
        * platform/mac/svg/filters/filter-placement-issue-expected.txt: Added.
        * platform/mac/svg/filters/filterRes-expected.png:
        * platform/mac/svg/filters/filterRes2-expected.png:
        * platform/mac/svg/text/selection-background-color-expected.png:
        * platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png:
        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png:
        * svg/clip-path/clip-in-clip.svg: Added.
        * svg/clip-path/clipper-placement-issue.svg: Added.
        * svg/filters/filter-placement-issue.svg: Added.

2012-01-27  Branimir Lambov  <blambov@google.com>

        SVG filters incorrectly move elements
        https://bugs.webkit.org/show_bug.cgi?id=73643

        Reviewed by Nikolas Zimmermann.

        Fixes SVG image buffer creation to use the enclosing integer rect
        instead of unstable rounded coordinates with scaling which was causing
        animated images to jump around under filters. The image buffer was not
        aligned on a pixel boundary, and thus the positions and sizes of anything
        drawn under that filter changed by 1-2 pixels compared to the same
        elements drawn without an intermediate buffer, or drawn with a buffer
        with a different target rectangle.

        The change improves the positioning of clip paths, masks and filters.

        Tests: svg/clip-path/clip-in-clip.svg
               svg/clip-path/clipper-placement-issue.svg
               svg/filters/filter-placement-issue.svg

        * platform/graphics/filters/FETile.cpp:
        (WebCore::FETile::platformApplySoftware):
        * rendering/svg/RenderSVGResourceClipper.cpp:
        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
        * rendering/svg/RenderSVGResourceFilter.cpp:
        (WebCore::RenderSVGResourceFilter::applyResource):
        * rendering/svg/RenderSVGResourceGradient.cpp:
        (WebCore::createMaskAndSwapContextForTextGradient):
        (WebCore::clipToTextMask):
        * rendering/svg/RenderSVGResourceMasker.cpp:
        (WebCore::RenderSVGResourceMasker::applyResource):
        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
        * rendering/svg/RenderSVGResourcePattern.cpp:
        (WebCore::RenderSVGResourcePattern::createTileImage):
        * rendering/svg/SVGImageBufferTools.cpp:
        (WebCore::SVGImageBufferTools::createImageBuffer):
        (WebCore::SVGImageBufferTools::createImageBufferForPattern):
        (WebCore::SVGImageBufferTools::clipToImageBuffer):
        (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
        (WebCore::SVGImageBufferTools::clampedAbsoluteSize):
        * rendering/svg/SVGImageBufferTools.h:
        (WebCore::SVGImageBufferTools::calcImageBufferRect):

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

113 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png [deleted file]
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt [deleted file]
LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png
LayoutTests/platform/chromium-linux/svg/batik/filters/feTile-expected.png
LayoutTests/platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png
LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png
LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png
LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png
LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png
LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png
LayoutTests/platform/chromium-linux/svg/filters/big-sized-filter-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/filters/feDropShadow-expected.png
LayoutTests/platform/chromium-linux/svg/filters/filter-placement-issue-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.png
LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.txt [deleted file]
LayoutTests/platform/chromium-linux/svg/filters/filterRes2-expected.png [new file with mode: 0644]
LayoutTests/platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png
LayoutTests/platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png
LayoutTests/platform/chromium-win/svg/filters/big-sized-filter-expected.png
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png
LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png
LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png
LayoutTests/platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png
LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png
LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png
LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png
LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png
LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png
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.png
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.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png
LayoutTests/platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png
LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png
LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png
LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png
LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png
LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png
LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png
LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png
LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png
LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.png
LayoutTests/platform/mac/svg/custom/text-rotated-gradient-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png
LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png
LayoutTests/platform/mac/svg/filters/big-sized-filter-expected.png
LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png
LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/filterRes-expected.png
LayoutTests/platform/mac/svg/filters/filterRes2-expected.png
LayoutTests/platform/mac/svg/text/selection-background-color-expected.png
LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png
LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png
LayoutTests/svg/clip-path/clip-in-clip.svg [new file with mode: 0644]
LayoutTests/svg/clip-path/clipper-placement-issue.svg [new file with mode: 0644]
LayoutTests/svg/filters/filter-placement-issue.svg [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/filters/FETile.cpp
Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp
Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp
Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp
Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp
Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp
Source/WebCore/rendering/svg/SVGImageBufferTools.cpp
Source/WebCore/rendering/svg/SVGImageBufferTools.h

index 866a59c..94514b0 100644 (file)
@@ -1,3 +1,116 @@
+2012-01-27 Branimir Lambov <blambov@google.com>
+
+        SVG filters incorrectly move elements
+        https://bugs.webkit.org/show_bug.cgi?id=73643
+
+        Reviewed by Nikolas Zimmermann.
+
+        New tests and updated expectations.
+
+        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
+        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
+        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
+        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
+        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png: Removed.
+        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt: Removed.
+        * platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
+        * platform/chromium-linux/svg/batik/filters/feTile-expected.png:
+        * platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png: Added.
+        * platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png:
+        * platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png:
+        * platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png:
+        * platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png:
+        * platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
+        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
+        * platform/chromium-linux/svg/filters/big-sized-filter-expected.png: Added.
+        * platform/chromium-linux/svg/filters/feDropShadow-expected.png:
+        * platform/chromium-linux/svg/filters/filter-placement-issue-expected.png: Added.
+        * platform/chromium-linux/svg/filters/filterRes-expected.png:
+        * platform/chromium-linux/svg/filters/filterRes-expected.txt: Removed.
+        * platform/chromium-linux/svg/filters/filterRes2-expected.png: Added.
+        * platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png:
+        * platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png:
+        * platform/chromium-win/svg/filters/big-sized-filter-expected.png:
+        * platform/chromium/test_expectations.txt:
+        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
+        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
+        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
+        * platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png:
+        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png:
+        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png:
+        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png:
+        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
+        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
+        * 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.png:
+        * 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.png:
+        * platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
+        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
+        * platform/mac/svg/as-background-image/svg-as-background-6-expected.png:
+        * platform/mac/svg/batik/filters/feTile-expected.png:
+        * platform/mac/svg/batik/masking/maskRegions-expected.png:
+        * platform/mac/svg/clip-path/clip-in-clip-expected.png: Added.
+        * platform/mac/svg/clip-path/clip-in-clip-expected.txt: Added.
+        * platform/mac/svg/clip-path/clipper-placement-issue-expected.png: Added.
+        * platform/mac/svg/clip-path/clipper-placement-issue-expected.txt: Added.
+        * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png:
+        * platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png:
+        * platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png:
+        * platform/mac/svg/custom/feComponentTransfer-Linear-expected.png:
+        * platform/mac/svg/custom/feComponentTransfer-Table-expected.png:
+        * platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png:
+        * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
+        * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png:
+        * platform/mac/svg/custom/js-late-gradient-creation-expected.png:
+        * platform/mac/svg/custom/text-rotated-gradient-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
+        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
+        * platform/mac/svg/filters/big-sized-filter-expected.png:
+        * platform/mac/svg/filters/feDropShadow-expected.png:
+        * platform/mac/svg/filters/filter-placement-issue-expected.png: Added.
+        * platform/mac/svg/filters/filter-placement-issue-expected.txt: Added.
+        * platform/mac/svg/filters/filterRes-expected.png:
+        * platform/mac/svg/filters/filterRes2-expected.png:
+        * platform/mac/svg/text/selection-background-color-expected.png:
+        * platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png:
+        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png:
+        * svg/clip-path/clip-in-clip.svg: Added.
+        * svg/clip-path/clipper-placement-issue.svg: Added.
+        * svg/filters/filter-placement-issue.svg: Added.
+
 2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
 
         Not reviewed. Update chromium expectations after r106103.
index 9dd1aca..ba2cfb4 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png and b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png differ
index 0b0e6e8..40ddd54 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png and b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png differ
index 5043c2e..91bfb7f 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png and b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png differ
index dbb8329..1f89b58 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png and b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png
deleted file mode 100644 (file)
index a97662c..0000000
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png and /dev/null differ
diff --git a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt
deleted file mode 100644 (file)
index ba4e3c5..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-layer at (0,0) size 480x360
-  RenderView at (0,0) size 480x360
-layer at (0,0) size 480x360
-  RenderSVGRoot {svg} at (0,0) size 480x360
-    RenderSVGContainer {g} at (26,8) size 386x235
-      RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGText {text} at (26,8) size 386x34 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 386x34
-          chunk 1 text run 1 at (26.00,35.00) startOffset 0 endOffset 31 width 386.00: "External SVG font element (css)"
-      RenderSVGContainer {g} at (31,81) size 345x162
-        RenderSVGText {text} at (31,114) size 104x20 contains 1 chunk(s)
-          RenderSVGInlineText {#text} at (0,0) size 104x20
-            chunk 1 text run 1 at (31.00,130.00) startOffset 0 endOffset 13 width 104.00: "Placed Glyphs"
-        RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((1.00,0.00)(0.00,-1.00)) t=(165.00,140.00)}]
-          RenderSVGPath {line} at (165,139) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=210.00] [y2=0.00]
-          RenderSVGContainer {g} at (164,81) size 212x162 [transform={m=((0.03,0.00)(0.00,0.03)) t=(0.00,0.00)}]
-            RenderSVGPath {line} at (164,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=-3500.00] [x2=0.00] [y2=2000.00]
-            RenderSVGPath {path} at (168,96) size 37x45 [fill={[type=SOLID] [color=#000000]}] [data="M 1250 -30 C 1188.67 -30 1135.33 48.6667 1090 206 C 1072.67 266 1051 371 1025 521 C 957 511.667 868 495 758 471 L 492 416 C 458.667 328.667 401.667 201 321 33 C 299.667 -4.33333 270.667 -23 234 -23 C 207.333 -23 183.667 -13.3333 163 6 C 142.333 25.3333 131.667 49.3333 131 78 C 131 110 181.333 231.667 282 443 C 270.667 460.333 265 480.333 265 503 C 265 557 297.667 591.667 363 607 C 439 749.667 535 913.667 651 1099 C 809 1351.67 907.333 1478 946 1478 C 998.667 1478 1034.67 1441.33 1054 1368 L 1117 1032 L 1266 337 L 1323 179 C 1342.33 125 1352 89 1352 71 C 1352 42.3333 1341.67 18.3333 1321 -1 C 1300.33 -20.3333 1276.67 -30 1250 -30 Z M 897 1113 L 611 652 C 691.667 672.667 814 697.667 978 727 L 897 1113 Z"]
-            RenderSVGPath {line} at (208,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=1498.00] [y1=-3500.00] [x2=1498.00] [y2=2000.00]
-            RenderSVGPath {path} at (208,109) size 31x48 [transform={m=((1.00,0.00)(0.00,1.00)) t=(1498.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 1011 892 L 665 144 C 579.667 -38 514.333 -190.333 469 -313 L 403 -507 C 385.667 -555 355.667 -579 313 -579 C 285 -579 261 -570 241 -552 C 221 -534 210.667 -511 210 -483 C 210 -416.333 282 -223.333 426 96 L 68 785 L 23 858 C 5 888.667 -4 914.333 -4 935 C -4 962.333 6.33333 986.333 27 1007 C 47.6667 1027.67 71.3333 1038 98 1038 C 128.667 1038 152.333 1026.33 169 1003 C 282.333 845.667 404 621.667 534 331 L 682 676 C 735.333 795.333 786.667 898 836 984 C 857.333 1021.33 885.333 1040 920 1040 C 947.333 1040 971.333 1030.33 992 1011 C 1012.67 991.667 1023.33 968.667 1024 942 C 1024 927.333 1019.67 910.667 1011 892 Z"]
-            RenderSVGPath {line} at (239,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=2564.00] [y1=-3500.00] [x2=2564.00] [y2=2000.00]
-            RenderSVGPath {path} at (243,85) size 43x57 [transform={m=((1.00,0.00)(0.00,1.00)) t=(2564.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 802 -61 C 614 -61 454.667 -4.66667 324 108 C 185.333 228 116 382.667 116 572 C 116 802.667 184.333 1012.33 321 1201 C 473.667 1410.33 664 1515 892 1515 C 1111.33 1515 1274.33 1465.67 1381 1367 C 1492.33 1264.33 1548 1102.33 1548 881 C 1548 650.333 1485.33 442.333 1360 257 C 1216 45 1030 -61 802 -61 Z M 892 1310 C 728.667 1310 590.333 1228.67 477 1066 C 372.333 916.667 320 752 320 572 C 320 443.333 367.667 338.667 463 258 C 554.333 182 667.333 144 802 144 C 964 144 1097.67 225.667 1203 389 C 1297 535 1344 699 1344 881 C 1344 1040.33 1308.33 1152.33 1237 1217 C 1169 1279 1054 1310 892 1310 Z M 682 1848 C 769.333 1848 813 1813 813 1743 C 813 1723 798.333 1703.67 769 1685 C 742.333 1668.33 717.333 1660 694 1660 C 612 1660 571 1694.33 571 1763 C 571 1782.33 583.333 1801.33 608 1820 C 632.667 1838.67 657.333 1848 682 1848 Z M 1221 1856 C 1243.67 1856 1266.67 1845.67 1290 1825 C 1313.33 1804.33 1325 1783.67 1325 1763 C 1325 1701.67 1277.33 1671 1182 1671 C 1154.67 1671 1130.33 1678 1109 1692 C 1085 1708 1073 1729 1073 1755 C 1073 1801 1088 1830.67 1118 1844 C 1134.67 1852 1169 1856 1221 1856 Z"]
-            RenderSVGPath {line} at (287,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=4199.00] [y1=-3500.00] [x2=4199.00] [y2=2000.00]
-            RenderSVGPath {path} at (291,92) size 49x53 [transform={m=((1.00,0.00)(0.00,1.00)) t=(4199.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 1306 412 C 1235.33 412 1174.33 422.333 1123 443 C 1071.67 463.667 1030.33 494.333 999 535 C 963 499.667 928 473 894 455 C 860 437 826.333 428 793 428 C 719 428 649.333 458 584 518 C 518.667 578 485.667 644.333 485 717 C 485 840.333 533.333 953 630 1055 C 726.667 1157 837 1208 961 1208 C 989 1208 1012.33 1197.67 1031 1177 C 1049.67 1156.33 1059 1131.33 1059 1102 C 1059 1062 1025.67 1032.33 959 1013 C 870.333 987.667 807.667 958.667 771 926 C 717 878.667 690 809 690 717 C 690 697.667 699 679 717 661 C 737.667 641 763.333 631.667 794 633 C 852 635.667 905.667 689.667 955 795 C 999.667 887 1039.33 933 1074 933 C 1102 933 1124.67 922.667 1142 902 C 1159.33 881.333 1168 856 1168 826 C 1168 812.667 1166 792.667 1162 766 C 1158 739.333 1155.67 719.333 1155 706 C 1155 662.667 1173.67 635.333 1211 624 C 1225.67 619.333 1257.33 617 1306 617 C 1397.33 617 1461.33 639.333 1498 684 C 1531.33 724 1548 790.333 1548 883 C 1548 1046.33 1482.33 1179.67 1351 1283 C 1231 1377.67 1087.67 1425 921 1425 C 727 1425 575 1351.67 465 1205 C 365.667 1074.33 316 910 316 712 C 316 529.333 374.333 375.333 491 250 C 612.333 119.333 768.333 54 959 54 C 1013 54 1074 64.3333 1142 85 L 1317 150 C 1346.33 160.667 1365.33 166 1374 166 C 1401.33 166 1425 155.333 1445 134 C 1465 112.667 1475 87.3333 1475 58 C 1475 -5.33333 1404 -56.6667 1262 -96 C 1154.67 -125.333 1054.33 -140 961 -140 C 867 -140 771 -122 673 -86 C 575 -50 490.667 -1.33333 420 60 C 213.333 238.667 110 456 110 712 C 110 968 180.667 1182 322 1354 C 472 1538 671.667 1630 921 1630 C 1146.33 1630 1339.33 1562.33 1500 1427 C 1668.67 1283.67 1753 1102.33 1753 883 C 1753 733 1716.33 617.667 1643 537 C 1566.33 453.667 1454 412 1306 412 Z"]
-            RenderSVGPath {line} at (343,81) size 2x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=6106.00] [y1=-3500.00] [x2=6106.00] [y2=2000.00]
-            RenderSVGPath {path} at (346,108) size 27x46 [transform={m=((1.00,0.00)(0.00,1.00)) t=(6106.00,0.00)}] [fill={[type=SOLID] [color=#000000]}] [data="M 770 -196 C 770 -278.667 750 -340.667 710 -382 C 670 -423.333 609.333 -444.333 528 -445 C 471.333 -445 417.667 -434.333 367 -413 C 303 -385 271 -346.667 271 -298 C 271 -262 293.667 -244 339 -244 C 363 -244 390 -252 420 -268 C 450 -284 482.333 -292.333 517 -293 C 549.667 -292.333 574 -284.333 590 -269 C 606 -253.667 614 -231 614 -201 C 614 -169 601.667 -140.333 577 -115 C 552.333 -89.6667 514.333 -67.3333 463 -48 C 357 -24 272 26.6667 208 104 C 139.333 186 105 286 105 404 C 105 539.333 150 679 240 823 C 340 983 452.667 1063 578 1063 C 643.333 1063 716.333 1047.67 797 1017 C 899 977.667 950 929.667 950 873 C 950 847.667 941.667 825.333 925 806 C 908.333 786.667 887.667 776.667 863 776 C 843.667 776 827 781.667 813 793 C 799 804.333 785 816 771 828 C 731.667 859.333 667.333 875 578 875 C 510 875 442.667 814.333 376 693 C 315.333 581.667 285 485.333 285 404 C 285 316 315 246.667 375 196 C 431 148.667 503 125 591 125 C 631 125 673.667 135.667 719 157 L 835 219 C 855 229.667 869.333 235 878 235 C 902.667 235 924 225.333 942 206 C 960 186.667 969 164 969 138 C 969 69.3333 883.667 10 713 -40 C 732.333 -65.3333 746.667 -91 756 -117 C 765.333 -143 770 -169.333 770 -196 Z"]
-            RenderSVGPath {line} at (373,81) size 3x162 [stroke={[type=SOLID] [color=#888888] [stroke width=50.00]}] [fill={[type=SOLID] [color=#000000]}] [x1=7158.00] [y1=-3500.00] [x2=7158.00] [y2=2000.00]
-      RenderSVGText {text} at (67,194) size 73x20 contains 1 chunk(s)
-        RenderSVGInlineText {#text} at (0,0) size 73x20
-          chunk 1 text run 1 at (67.00,210.00) startOffset 0 endOffset 8 width 73.00: "SVG Font"
-      RenderSVGContainer {g} at (165,166) size 210x67 [transform={m=((1.00,0.00)(0.00,1.00)) t=(165.00,220.00)}]
-        RenderSVGPath {line} at (165,219) size 210x2 [stroke={[type=SOLID] [color=#888888]}] [fill={[type=SOLID] [color=#000000]}] [x1=0.00] [y1=0.00] [x2=210.00] [y2=0.00]
-        RenderSVGText {text} at (0,-54) size 207x67 contains 1 chunk(s)
-          RenderSVGInlineText {#text} at (0,0) size 207x67
-            chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 5 width 207.00: "Ay\x{D6}@\x{E7}"
-    RenderSVGText {text} at (10,304) size 261x46 contains 1 chunk(s)
-      RenderSVGInlineText {#text} at (0,0) size 261x46
-        chunk 1 text run 1 at (10.00,340.00) startOffset 0 endOffset 16 width 261.00: "$Revision: 1.1 $"
-    RenderSVGRect {rect} at (0,0) size 480x360 [stroke={[type=SOLID] [color=#000000]}] [x=1.00] [y=1.00] [width=478.00] [height=358.00]
index 42e3d56..c845bbe 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png and b/LayoutTests/platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png differ
index b14c3e1..81cd4ae 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/batik/filters/feTile-expected.png and b/LayoutTests/platform/chromium-linux/svg/batik/filters/feTile-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png b/LayoutTests/platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png
new file mode 100644 (file)
index 0000000..9d0f068
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png differ
index 913f560..6aaaea5 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png and b/LayoutTests/platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png differ
index 41d5ef7..7db05e9 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png and b/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png differ
index 2ba143d..66210ad 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png and b/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png differ
index 1997fd6..1fae1e2 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png and b/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png differ
index 1c4efc8..4aa4001 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png and b/LayoutTests/platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png differ
index 9eb37fe..6686dfd 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png differ
index 56c96af..3f234f3 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png differ
index 08b5770..c38f640 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png differ
index 03bfe6b..f6b405b 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png differ
index 1cc9f1a..2bdfee2 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png differ
index 95abae0..09b8a21 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png differ
index 179f998..08cd0de 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png differ
index abdb7f9..64ede82 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png differ
index 553ea51..558350f 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png differ
index 0732777..4173d8a 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png differ
index e8efdb4..40167d4 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png differ
index 720713c..7cf458c 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png differ
index 02f2a21..4e26415 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png differ
index 0310b0d..ca38d77 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png and b/LayoutTests/platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/filters/big-sized-filter-expected.png b/LayoutTests/platform/chromium-linux/svg/filters/big-sized-filter-expected.png
new file mode 100644 (file)
index 0000000..784f6e9
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/filters/big-sized-filter-expected.png differ
index 13967be..f0b7b72 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/filters/feDropShadow-expected.png and b/LayoutTests/platform/chromium-linux/svg/filters/feDropShadow-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/filters/filter-placement-issue-expected.png b/LayoutTests/platform/chromium-linux/svg/filters/filter-placement-issue-expected.png
new file mode 100644 (file)
index 0000000..bd750a3
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/filters/filter-placement-issue-expected.png differ
index ac1cf13..08f2ad0 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.png and b/LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.png differ
diff --git a/LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.txt b/LayoutTests/platform/chromium-linux/svg/filters/filterRes-expected.txt
deleted file mode 100644 (file)
index aed9cd7..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
-layer at (0,0) size 800x600
-  RenderSVGRoot {svg} at (10,0) size 445x121
-    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
-      RenderSVGResourceLinearGradient {linearGradient} [id="linGrad"] [gradientUnits=objectBoundingBox] [start=(0,0)] [end=(1,1)]
-        RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
-        RenderSVGGradientStop {stop} [offset=1.00] [color=#00FF00]
-      RenderSVGResourceRadialGradient {radialGradient} [id="radGrad"] [gradientUnits=objectBoundingBox] [center=(0.50,0.50)] [focal=(0.50,0.50)] [radius=0.50]
-        RenderSVGGradientStop {stop} [offset=0.00] [color=#FF0000]
-        RenderSVGGradientStop {stop} [offset=1.00] [color=#00FF00]
-      RenderSVGResourceFilter {filter} [id="f1"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
-        [feDisplacementMap scale="64.00" xChannelSelector="RED" yChannelSelector="GREEN"]
-          [feTile]
-            [feComposite operation="OVER"]
-              [feFlood flood-color="#000000" flood-opacity="1.00"]
-              [feFlood flood-color="#000000" flood-opacity="1.00"]
-          [SourceGraphic]
-      RenderSVGResourceFilter {filter} [id="over"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
-        [feComposite operation="OVER"]
-          [feFlood flood-color="#0000FF" flood-opacity="0.50"]
-          [feFlood flood-color="#FF0000" flood-opacity="0.50"]
-      RenderSVGResourceFilter {filter} [id="gauss"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
-        [feGaussianBlur stdDeviation="10.00, 10.00"]
-          [SourceGraphic]
-      RenderSVGResourceFilter {filter} [id="dilate2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
-        [feMorphology operator="DILATE" radius="3.00, 1.00"]
-          [SourceGraphic]
-    RenderSVGImage {image} at (10,10) size 100x100
-      [filter="f1"] RenderSVGResourceFilter {filter} at (10,10) size 100x100
-    RenderSVGRect {rect} at (130,10) size 100x100 [fill={[type=SOLID] [color=#000000]}] [x=130.00] [y=10.00] [width=100.00] [height=100.00]
-      [filter="over"] RenderSVGResourceFilter {filter} at (130,10) size 100x100
-    RenderSVGContainer {g} at (240,0) size 120x121 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,10.00)}]
-      [filter="gauss"] RenderSVGResourceFilter {filter} at (-10,-10) size 120x120
-      RenderSVGRect {rect} at (250,10) size 75x75 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=75.00] [height=75.00]
-      RenderSVGRect {rect} at (275,35) size 75x75 [fill={[type=SOLID] [color=#0000FF]}] [x=25.00] [y=25.00] [width=75.00] [height=75.00]
-    RenderSVGContainer {g} at (390,30) size 65x65 [transform={m=((1.00,0.00)(0.00,1.00)) t=(370.00,10.00)}]
-      [filter="dilate2"] RenderSVGResourceFilter {filter} at (20,20) size 65x65
-      RenderSVGRect {rect} at (389,29) size 52x52 [stroke={[type=SOLID] [color=#FF0000]}] [x=20.00] [y=20.00] [width=50.00] [height=50.00]
-      RenderSVGRect {rect} at (404,44) size 52x52 [stroke={[type=SOLID] [color=#0000FF]}] [x=35.00] [y=35.00] [width=50.00] [height=50.00]
diff --git a/LayoutTests/platform/chromium-linux/svg/filters/filterRes2-expected.png b/LayoutTests/platform/chromium-linux/svg/filters/filterRes2-expected.png
new file mode 100644 (file)
index 0000000..1d5c95f
Binary files /dev/null and b/LayoutTests/platform/chromium-linux/svg/filters/filterRes2-expected.png differ
index 3d42c61..e414f9c 100644 (file)
Binary files a/LayoutTests/platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png and b/LayoutTests/platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png differ
index 94d06ce..9bdd990 100644 (file)
Binary files a/LayoutTests/platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png and b/LayoutTests/platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png differ
index 1d11273..efcfec0 100644 (file)
Binary files a/LayoutTests/platform/chromium-win/svg/filters/big-sized-filter-expected.png and b/LayoutTests/platform/chromium-win/svg/filters/big-sized-filter-expected.png differ
index 9f9c228..f215478 100644 (file)
@@ -39,7 +39,7 @@ BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/frames/sandboxed-iframe-navigation-pare
 BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/js/repeat-cached-vm-reentry.html = PASS
 BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/dom/Window/window-postmessage-clone-deep-array.html = PASS
 BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/frames/calculate-percentage.html = PASS
-BUGCR24182 SLOW DEBUG : svg/filters/big-sized-filter.svg = PASS
+// BUGCR24182 SLOW DEBUG : svg/filters/big-sized-filter.svg = PASS
 // See BUGCR104797
 
 BUGWK77184 DEBUG SLOW : fast/js/dfg-double-vote-fuzz.html = PASS
@@ -3695,6 +3695,45 @@ BUGWK73549 : fast/text/international/hebrew-vowels.html = IMAGE+TEXT PASS
 
 BUGWK73607 GPU LINUX DEBUG : fast/canvas/canvas-overloads-strokeText.html = TIMEOUT TEXT PASS
 
+// Tests needing rebaseline after bug 73643 patch
+BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-color-01-b.svg = IMAGE
+BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-comptran-01-b.svg = IMAGE
+//BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-example-01-b.svg = IMAGE
+BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-morph-01-f.svg = IMAGE
+BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/masking-path-01-b.svg = IMAGE
+//BUGWK73643 WIN MAC : svg/batik/filters/feTile.svg = IMAGE
+BUGWK73643 MAC : svg/batik/filters/feTile.svg = IMAGE
+BUGWK73643 WIN MAC : svg/clip-path/clipper-placement-issue.svg = IMAGE
+//BUGWK73643 WIN MAC : svg/clip-path/deep-nested-clip-in-mask-different-unitTypes.svg = IMAGE
+BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Discrete.svg = IMAGE
+BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Gamma.svg = IMAGE
+BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Linear.svg = IMAGE
+BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Table.svg = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-height-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-width-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-x-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-y-attr.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-height-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-width-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-x-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-y-prop.html = IMAGE
+BUGWK73643 WIN MAC : svg/filters/feDropShadow.svg = IMAGE
+BUGWK73643 WIN MAC : svg/filters/filterRes.svg = IMAGE
+BUGWK73643 SLOW DEBUG WIN MAC : svg/filters/big-sized-filter.svg = IMAGE
+BUGWK73643 SLOW DEBUG LINUX : svg/filters/big-sized-filter.svg = PASS
+BUGWK73643 RELEASE WIN MAC : svg/filters/big-sized-filter.svg = IMAGE
+BUGWK73643 WIN MAC : svg/filters/filter-placement-issue.svg = IMAGE
+//BUGWK73643 WIN MAC : svg/filters/filterRes.svg = IMAGE
+BUGWK73643 WIN MAC : svg/filters/filterRes2.svg = IMAGE
+BUGWK73643 WIN MAC : svg/as-background-image/svg-as-background-2.html = IMAGE
+BUGWK73643 WIN MAC : svg/wicd/test-scalable-background-image1.xhtml = IMAGE
+
 BUGWK73681 : http/tests/appcache/video.html = TIMEOUT PASS
 
 BUGWK73692 : media/event-attributes.html = TEXT PASS
index 626e3ee..a9b03c7 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png differ
index 6e3c167..76dfb7e 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png differ
index 4239da8..4f51217 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png differ
index 6208cae..93433a9 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png differ
index 3b970bf..243bee6 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png differ
index ec91d68..aaf7801 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png differ
index b33233d..4c6ba0b 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png differ
index 815bb5b..048240f 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png differ
index 8cad3ba..8ac3826 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png differ
index 0cc43a8..fee3ce5 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png differ
index 67d4f5a..57a1a07 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png differ
index 379f495..d8844ca 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png differ
index 3392fce..7d4d073 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png differ
index f6a75e2..17a548a 100644 (file)
Binary files a/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png and b/LayoutTests/platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png differ
index 9bd82ac..01b6537 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 9c38827..0f4ae5c 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 aa9d45f..0b7a66b 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 2bda7bd..b0f0161 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 2146016..7982388 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png and b/LayoutTests/platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png differ
index 79cff5e..a82896e 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 a7b9d23..6bb12dd 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png and b/LayoutTests/platform/mac/svg/as-background-image/svg-as-background-6-expected.png differ
index c89166e..d5b8170 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png and b/LayoutTests/platform/mac/svg/batik/filters/feTile-expected.png differ
index bb29051..7e8c224 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png and b/LayoutTests/platform/mac/svg/batik/masking/maskRegions-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.png b/LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.png
new file mode 100644 (file)
index 0000000..4758f84
Binary files /dev/null and b/LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.txt b/LayoutTests/platform/mac/svg/clip-path/clip-in-clip-expected.txt
new file mode 100644 (file)
index 0000000..b7fed6c
--- /dev/null
@@ -0,0 +1,13 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (10,19) size 20x11
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceClipper {clipPath} [id="clipper"] [clipPathUnits=userSpaceOnUse]
+        RenderSVGRect {rect} at (10,19) size 20x11 [fill={[type=SOLID] [color=#000000]}] [x=10.00] [y=19.00] [width=20.00] [height=11.00]
+      RenderSVGResourceClipper {clipPath} [id="nested-clipper"] [clipPathUnits=userSpaceOnUse]
+        RenderSVGRect {rect} at (10,10) size 20x11 [fill={[type=SOLID] [color=#000000]}] [x=10.00] [y=10.00] [width=20.00] [height=11.00]
+    RenderSVGContainer {g} at (10,19) size 20x11
+      [clipPath="clipper"] RenderSVGResourceClipper {clipPath} at (10,19) size 20x11
+      RenderSVGRect {rect} at (8,8) size 24x24 [fill={[type=SOLID] [color=#FF0000]}] [x=8.00] [y=8.00] [width=24.00] [height=24.00]
+      RenderSVGRect {rect} at (10,19) size 20x2 [fill={[type=SOLID] [color=#008000]}] [x=10.00] [y=19.00] [width=20.00] [height=2.00]
diff --git a/LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.png b/LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.png
new file mode 100644 (file)
index 0000000..5a100ab
Binary files /dev/null and b/LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.txt b/LayoutTests/platform/mac/svg/clip-path/clipper-placement-issue-expected.txt
new file mode 100644 (file)
index 0000000..8f14a57
--- /dev/null
@@ -0,0 +1,51 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (5,0) size 93x33
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGContainer {g} at (5,0) size 33x33
+        RenderSVGPath {path} at (10,10) size 20x20 [fill={[type=SOLID] [color=#000000]}] [data="M 10 10 L 30 10 L 30 30 L 10 30 L 10 10 M 11 11 L 11 29 L 29 29 L 29 11 L 11 11"]
+        RenderSVGRect {rect} at (19,19) size 2x2 [fill={[type=SOLID] [color=#000000]}] [x=19.00] [y=19.00] [width=2.00] [height=2.00]
+        RenderSVGRect {rect} at (5,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=5.51] [y=0.51] [width=2.00] [height=32.30]
+        RenderSVGRect {rect} at (35,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=35.40] [y=0.51] [width=2.00] [height=32.30]
+      RenderSVGResourceMasker {mask} [id="mask"] [maskUnits=objectBoundingBox] [maskContentUnits=userSpaceOnUse]
+        RenderSVGContainer {use} at (65,0) size 33x33
+          RenderSVGContainer {g} at (65,0) size 33x33 [transform={m=((1.00,0.00)(0.00,1.00)) t=(60.00,0.00)}]
+            RenderSVGContainer {g} at (65,0) size 33x33
+              RenderSVGPath {path} at (70,10) size 20x20 [fill={[type=SOLID] [color=#FFFFFF]}] [data="M 10 10 L 30 10 L 30 30 L 10 30 L 10 10 M 11 11 L 11 29 L 29 29 L 29 11 L 11 11"]
+              RenderSVGRect {rect} at (79,19) size 2x2 [fill={[type=SOLID] [color=#FFFFFF]}] [x=19.00] [y=19.00] [width=2.00] [height=2.00]
+              RenderSVGRect {rect} at (65,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=5.51] [y=0.51] [width=2.00] [height=32.30]
+              RenderSVGRect {rect} at (95,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=35.40] [y=0.51] [width=2.00] [height=32.30]
+      RenderSVGResourceClipper {clipPath} [id="clipper"] [clipPathUnits=userSpaceOnUse]
+        RenderSVGPath {path} at (40,10) size 20x20 [fill={[type=SOLID] [color=#000000]}] [data="M 40 10 L 60 10 L 60 30 L 40 30 L 40 10 M 41 11 L 41 29 L 59 29 L 59 11 L 41 11"]
+        RenderSVGRect {rect} at (49,19) size 2x2 [fill={[type=SOLID] [color=#000000]}] [x=49.00] [y=19.00] [width=2.00] [height=2.00]
+        RenderSVGRect {rect} at (35,0) size 3x33 [fill={[type=SOLID] [color=#000000]}] [x=35.51] [y=0.51] [width=2.00] [height=32.30]
+        RenderSVGRect {rect} at (65,0) size 3x33 [fill={[type=SOLID] [color=#000000]}] [x=65.40] [y=0.51] [width=2.00] [height=32.30]
+    RenderSVGContainer {g} at (5,0) size 33x33
+      RenderSVGContainer {use} at (5,0) size 33x33
+        RenderSVGContainer {g} at (5,0) size 33x33
+          RenderSVGContainer {g} at (5,0) size 33x33
+            RenderSVGPath {path} at (10,10) size 20x20 [fill={[type=SOLID] [color=#008000]}] [data="M 10 10 L 30 10 L 30 30 L 10 30 L 10 10 M 11 11 L 11 29 L 29 29 L 29 11 L 11 11"]
+            RenderSVGRect {rect} at (19,19) size 2x2 [fill={[type=SOLID] [color=#008000]}] [x=19.00] [y=19.00] [width=2.00] [height=2.00]
+            RenderSVGRect {rect} at (5,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=5.51] [y=0.51] [width=2.00] [height=32.30]
+            RenderSVGRect {rect} at (35,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=35.40] [y=0.51] [width=2.00] [height=32.30]
+    RenderSVGContainer {g} at (35,0) size 33x33
+      [clipPath="clipper"] RenderSVGResourceClipper {clipPath} at (35.51,0.51) size 31.89x32.30
+      RenderSVGRect {rect} at (38,8) size 24x24 [fill={[type=SOLID] [color=#FF0000]}] [x=38.00] [y=8.00] [width=24.00] [height=24.00]
+      RenderSVGContainer {use} at (35,0) size 33x33
+        RenderSVGContainer {g} at (35,0) size 33x33 [transform={m=((1.00,0.00)(0.00,1.00)) t=(30.00,0.00)}]
+          RenderSVGContainer {g} at (35,0) size 33x33
+            RenderSVGPath {path} at (40,10) size 20x20 [fill={[type=SOLID] [color=#008000]}] [data="M 10 10 L 30 10 L 30 30 L 10 30 L 10 10 M 11 11 L 11 29 L 29 29 L 29 11 L 11 11"]
+            RenderSVGRect {rect} at (49,19) size 2x2 [fill={[type=SOLID] [color=#008000]}] [x=19.00] [y=19.00] [width=2.00] [height=2.00]
+            RenderSVGRect {rect} at (35,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=5.51] [y=0.51] [width=2.00] [height=32.30]
+            RenderSVGRect {rect} at (65,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=35.40] [y=0.51] [width=2.00] [height=32.30]
+    RenderSVGContainer {g} at (65,0) size 33x33
+      [masker="mask"] RenderSVGResourceMasker {mask} at (65.51,0.51) size 31.89x32.30
+      RenderSVGRect {rect} at (68,8) size 24x24 [fill={[type=SOLID] [color=#FF0000]}] [x=68.00] [y=8.00] [width=24.00] [height=24.00]
+      RenderSVGContainer {use} at (65,0) size 33x33
+        RenderSVGContainer {g} at (65,0) size 33x33 [transform={m=((1.00,0.00)(0.00,1.00)) t=(60.00,0.00)}]
+          RenderSVGContainer {g} at (65,0) size 33x33
+            RenderSVGPath {path} at (70,10) size 20x20 [fill={[type=SOLID] [color=#008000]}] [data="M 10 10 L 30 10 L 30 30 L 10 30 L 10 10 M 11 11 L 11 29 L 29 29 L 29 11 L 11 11"]
+            RenderSVGRect {rect} at (79,19) size 2x2 [fill={[type=SOLID] [color=#008000]}] [x=19.00] [y=19.00] [width=2.00] [height=2.00]
+            RenderSVGRect {rect} at (65,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=5.51] [y=0.51] [width=2.00] [height=32.30]
+            RenderSVGRect {rect} at (95,0) size 3x33 [fill={[type=SOLID] [color=#FFFFFF]}] [x=35.40] [y=0.51] [width=2.00] [height=32.30]
index b1adac7..47e30a0 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png and b/LayoutTests/platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png differ
index 6c06ae0..ad8bce7 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png and b/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png differ
index 73eefc8..a3dc0fe 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png and b/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png differ
index f76fb52..04116bb 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png and b/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Linear-expected.png differ
index 2f600e1..889da68 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png and b/LayoutTests/platform/mac/svg/custom/feComponentTransfer-Table-expected.png differ
index 06ef854..4ef5db3 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png and b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png differ
index 3622786..b226736 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png and b/LayoutTests/platform/mac/svg/custom/grayscale-gradient-mask-expected.png differ
index 48cfb8c..a33d45b 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png and b/LayoutTests/platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png differ
index fc97f88..cff9e3e 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.png and b/LayoutTests/platform/mac/svg/custom/js-late-gradient-creation-expected.png differ
index 437ba1f..5e96c47 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/custom/text-rotated-gradient-expected.png and b/LayoutTests/platform/mac/svg/custom/text-rotated-gradient-expected.png differ
index 5e1f3a7..0d662e1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png differ
index cd55248..47ecab0 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png differ
index 868e953..7e3a60c 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png differ
index 79d16e9..c9382e0 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png differ
index d32c594..0ebaea1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png differ
index 3703282..22cbe08 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png differ
index 76ba4e7..93318f6 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png differ
index 7b18b0a..d3e0b34 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png differ
index d7fb9e0..0699b94 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png differ
index 6d4aee1..a0a32dd 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png differ
index 5639cab..9a57e8d 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png differ
index 4861ab1..56547e1 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png differ
index 23f3446..5234976 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png differ
index d75afc5..2dc4b22 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png differ
index 73eb287..f6cde64 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png differ
index 65caa62..3989b9d 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png and b/LayoutTests/platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png differ
index 0dc851a..9ed3e58 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/filters/big-sized-filter-expected.png and b/LayoutTests/platform/mac/svg/filters/big-sized-filter-expected.png differ
index 1d8056f..dcbaf98 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png and b/LayoutTests/platform/mac/svg/filters/feDropShadow-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.png b/LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.png
new file mode 100644 (file)
index 0000000..07019a9
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.txt b/LayoutTests/platform/mac/svg/filters/filter-placement-issue-expected.txt
new file mode 100644 (file)
index 0000000..048ebb1
--- /dev/null
@@ -0,0 +1,162 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (86,0) size 199x433
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGResourceFilter {filter} [id="shadow1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feComposite operation="OVER"]
+          [SourceGraphic]
+          [feOffset dx="0.00" dy="0.00"]
+            [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="shadow2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feComposite operation="OVER"]
+          [SourceGraphic]
+          [feOffset dx="0.00" dy="0.00"]
+            [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="shadow3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feComposite operation="OVER"]
+          [SourceGraphic]
+          [feOffset dx="0.00" dy="0.00"]
+            [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="shadow4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feComposite operation="OVER"]
+          [SourceGraphic]
+          [feOffset dx="0.00" dy="0.00"]
+            [SourceGraphic]
+      RenderSVGResourceFilter {filter} [id="diff"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feComposite operation="ARITHMETIC" k1="0.00" k2="-1.00" k3="1.00" k4="0.00"]
+          [feOffset dx="0.00" dy="300.00"]
+            [SourceGraphic]
+          [feComposite operation="ARITHMETIC" k1="0.00" k2="-1.00" k3="1.00" k4="0.00"]
+            [feOffset dx="0.00" dy="-100.00"]
+              [SourceGraphic]
+            [SourceGraphic]
+      RenderSVGContainer {g} at (1,1) size 169x94
+        RenderSVGRect {rect} at (15,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=20.10] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (30,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=20.20] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (45,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=20.30] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (60,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=20.40] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (75,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=20.50] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (90,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=20.60] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (105,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=20.70] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (120,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=20.80] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (135,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=20.90] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (151,21) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=21.00] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (15,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=55.10] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (30,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=55.20] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (45,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=55.30] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (60,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=55.40] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (75,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=55.50] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (90,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=55.60] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (105,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=55.70] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (120,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=55.80] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (135,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=55.90] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (151,56) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=56.00] [width=8.00] [height=30.00]
+        RenderSVGRect {rect} at (1,1) size 169x94 [stroke={[type=SOLID] [color=#008000] [stroke width=4.00]}] [x=3.00] [y=3.00] [width=165.00] [height=90.00]
+    RenderSVGContainer {g} at (86,0) size 199x433
+      RenderSVGContainer {g} at (86,0) size 199x433
+        [filter="diff"] RenderSVGResourceFilter {filter} at (86.50,-36) size 198x468
+        RenderSVGContainer {g} at (103,3) size 198x109 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,0.00)}]
+          [filter="shadow1"] RenderSVGResourceFilter {filter} at (3,3) size 198x108
+          RenderSVGContainer {use} at (101,1) size 169x94
+            RenderSVGContainer {g} at (101,1) size 169x94
+              RenderSVGContainer {g} at (101,1) size 169x94
+                RenderSVGRect {rect} at (115,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=20.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=20.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=20.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=20.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=20.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=20.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=20.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=20.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,20) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=20.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,21) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=21.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (115,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=55.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=55.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=55.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=55.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=55.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=55.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=55.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=55.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,55) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=55.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,56) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=56.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (101,1) size 169x94 [stroke={[type=SOLID] [color=#008000] [stroke width=4.00]}] [x=3.00] [y=3.00] [width=165.00] [height=90.00]
+        RenderSVGContainer {g} at (103,103) size 159x85 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,100.00)}]
+          [filter="shadow2"] RenderSVGResourceFilter {filter} at (3,3) size 158.40x84.60
+          RenderSVGContainer {use} at (101,101) size 169x94
+            RenderSVGContainer {g} at (101,101) size 169x94
+              RenderSVGContainer {g} at (101,101) size 169x94
+                RenderSVGRect {rect} at (115,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=20.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=20.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=20.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=20.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=20.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=20.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=20.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=20.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,120) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=20.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,121) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=21.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (115,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=55.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=55.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=55.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=55.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=55.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=55.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=55.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=55.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,155) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=55.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,156) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=56.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (101,101) size 169x94 [stroke={[type=SOLID] [color=#008000] [stroke width=4.00]}] [x=3.00] [y=3.00] [width=165.00] [height=90.00]
+        RenderSVGContainer {g} at (109,206) size 156x86 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,200.00)}]
+          [filter="shadow3"] RenderSVGResourceFilter {filter} at (9.60,6.60) size 155.10x84.60
+          RenderSVGContainer {use} at (101,201) size 169x94
+            RenderSVGContainer {g} at (101,201) size 169x94
+              RenderSVGContainer {g} at (101,201) size 169x94
+                RenderSVGRect {rect} at (115,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=20.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=20.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=20.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=20.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=20.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=20.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=20.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=20.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,220) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=20.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,221) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=21.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (115,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=55.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=55.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=55.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=55.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=55.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=55.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=55.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=55.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,255) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=55.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,256) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=56.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (101,201) size 169x94 [stroke={[type=SOLID] [color=#008000] [stroke width=4.00]}] [x=3.00] [y=3.00] [width=165.00] [height=90.00]
+        RenderSVGContainer {g} at (109,306) size 199x109 [transform={m=((1.00,0.00)(0.00,1.00)) t=(100.00,300.00)}]
+          [filter="shadow4"] RenderSVGResourceFilter {filter} at (9.60,6.60) size 198x108
+          RenderSVGContainer {use} at (101,301) size 169x94
+            RenderSVGContainer {g} at (101,301) size 169x94
+              RenderSVGContainer {g} at (101,301) size 169x94
+                RenderSVGRect {rect} at (115,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=20.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=20.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=20.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=20.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=20.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=20.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=20.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=20.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,320) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=20.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,321) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=21.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (115,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=15.10] [y=55.10] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (130,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=30.20] [y=55.20] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (145,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=45.30] [y=55.30] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (160,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=60.40] [y=55.40] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (175,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=75.50] [y=55.50] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (190,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=90.60] [y=55.60] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (205,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=105.70] [y=55.70] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (220,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=120.80] [y=55.80] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (235,355) size 9x31 [fill={[type=SOLID] [color=#FF0000]}] [x=135.90] [y=55.90] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (251,356) size 8x30 [fill={[type=SOLID] [color=#FF0000]}] [x=151.00] [y=56.00] [width=8.00] [height=30.00]
+                RenderSVGRect {rect} at (101,301) size 169x94 [stroke={[type=SOLID] [color=#008000] [stroke width=4.00]}] [x=3.00] [y=3.00] [width=165.00] [height=90.00]
index 9751e38..6181f26 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/filters/filterRes-expected.png and b/LayoutTests/platform/mac/svg/filters/filterRes-expected.png differ
index 8cb7cbc..fc5ffa4 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/filters/filterRes2-expected.png and b/LayoutTests/platform/mac/svg/filters/filterRes2-expected.png differ
index f35a8cd..fcfde4a 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/text/selection-background-color-expected.png and b/LayoutTests/platform/mac/svg/text/selection-background-color-expected.png differ
index 970e02f..f5f2151 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png and b/LayoutTests/platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png differ
index 2fc0810..d3fc81b 100644 (file)
Binary files a/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png and b/LayoutTests/platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png differ
diff --git a/LayoutTests/svg/clip-path/clip-in-clip.svg b/LayoutTests/svg/clip-path/clip-in-clip.svg
new file mode 100644 (file)
index 0000000..0d9b269
--- /dev/null
@@ -0,0 +1,19 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<defs>
+  <clipPath id="clipper" clip-path="url(#nested-clipper)">
+    <rect x="10" y="19" width="20" height="11" />
+  </clipPath>
+  
+  <clipPath id="nested-clipper">
+    <rect x="10" y="10" width="20" height="11" />
+  </clipPath>
+  
+</defs>
+
+<g clip-path="url(#clipper)">
+  <rect fill="red" x="8" y="8" width="24" height="24" />
+  <rect fill="green" x="10" y="19" width="20" height="2" />
+</g>
+
+</svg>
diff --git a/LayoutTests/svg/clip-path/clipper-placement-issue.svg b/LayoutTests/svg/clip-path/clipper-placement-issue.svg
new file mode 100644 (file)
index 0000000..039d7b2
--- /dev/null
@@ -0,0 +1,45 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!-- This tests some filter placement oddities caused by rounding
+(https://bugs.webkit.org/show_bug.cgi?id=73643).
+When opened, the test should not show any red outlines around the boxes. -->
+
+<defs>
+  <g id="paths">
+    <path d="M10 10 h20 v20 h-20 v-20 m1 1 v18 h18 v-18 h-18"/>
+    <rect x="19" y="19" width="2" height="2" />
+
+    <rect x="5.51" y="0.51" width="2" height="32.3" fill="white"/>
+    <rect x="35.4" y="0.51" width="2" height="32.3" fill="white"/>
+  </g>
+
+  <mask id="mask">
+    <use xlink:href="#paths" fill="white" x="60" />
+  </mask>
+
+  <clipPath id="clipper">
+    <!-- clipPath doesn't like use, so we copy the paths here. -->
+    <path d="M40 10 h20 v20 h-20 v-20 m1 1 v18 h18 v-18 h-18"/>
+    <rect x="49" y="19" width="2" height="2" />
+
+    <rect x="35.51" y="0.51" width="2" height="32.3" />
+    <rect x="65.4" y="0.51" width="2" height="32.3" />
+  </clipPath>
+
+</defs>
+
+<g>
+    <use xlink:href="#paths" fill="green" />
+</g>
+
+<g clip-path="url(#clipper)">
+    <rect fill="red" x="38" y="8" width="24" height="24" />
+    <use xlink:href="#paths" fill="green" x="30" />
+</g>
+
+<g mask="url(#mask)">
+    <rect fill="red" x="68" y="8" width="24" height="24" />
+    <use xlink:href="#paths" fill="green" x="60" />
+</g>
+
+</svg>
diff --git a/LayoutTests/svg/filters/filter-placement-issue.svg b/LayoutTests/svg/filters/filter-placement-issue.svg
new file mode 100644 (file)
index 0000000..3d7e4be
--- /dev/null
@@ -0,0 +1,87 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+
+<!-- This tests some filter placement oddities caused by rounding
+(https://bugs.webkit.org/show_bug.cgi?id=73643).
+When opened, the test should not show any thin red lines that
+change with zooming. -->
+
+<defs>
+<filter id="shadow1" x="0" y="0">
+<feOffset in="SourceGraphic" dx="0" dy="0" result="ofs" />
+<feComposite operator="over" in="SourceGraphic" in2="ofs" />
+</filter>
+
+<filter id="shadow2" x="0" y="0" width="0.96" height="0.94">
+<feOffset in="SourceGraphic" dx="0" dy="0" result="ofs" />
+<feComposite operator="over" in="SourceGraphic" in2="ofs" />
+</filter>
+
+<filter id="shadow3" width="0.94" height="0.94" x="0.04" y="0.04">
+<feOffset in="SourceGraphic" dx="0" dy="0" result="ofs" />
+<feComposite operator="over" in="SourceGraphic" in2="ofs" />
+</filter>
+
+<filter id="shadow4" x="0.04" y="0.04">
+<feOffset in="SourceGraphic" dx="0" dy="0" result="ofs" />
+<feComposite operator="over" in="SourceGraphic" in2="ofs" />
+</filter>
+
+<filter id="diff">
+  <feOffset in="SourceGraphic" dx="0" dy="-100" result="ofs"/>
+  <feOffset in="SourceGraphic" dx="0" dy="300" result="ofs3"/>
+  <feComposite operator="arithmetic" in="ofs" in2="SourceGraphic" k2="-1" k3="1" result="mix"/>
+  <feComposite operator="arithmetic" in="ofs3" in2="mix" k2="-1" k3="1" />
+</filter>
+
+
+<g id="rects" fill="red">
+  <rect x="15.1" y="20.1" width="8" height="30" />
+  <rect x="30.2" y="20.2" width="8" height="30" />
+  <rect x="45.3" y="20.3" width="8" height="30" />
+  <rect x="60.4" y="20.4" width="8" height="30" />
+  <rect x="75.5" y="20.5" width="8" height="30" />
+  <rect x="90.6" y="20.6" width="8" height="30" />
+  <rect x="105.7" y="20.7" width="8" height="30" />
+  <rect x="120.8" y="20.8" width="8" height="30" />
+  <rect x="135.9" y="20.9" width="8" height="30" />
+  <rect x="151" y="21" width="8" height="30" />
+
+  <rect x="15.1" y="55.1" width="8" height="30" />
+  <rect x="30.2" y="55.2" width="8" height="30" />
+  <rect x="45.3" y="55.3" width="8" height="30" />
+  <rect x="60.4" y="55.4" width="8" height="30" />
+  <rect x="75.5" y="55.5" width="8" height="30" />
+  <rect x="90.6" y="55.6" width="8" height="30" />
+  <rect x="105.7" y="55.7" width="8" height="30" />
+  <rect x="120.8" y="55.8" width="8" height="30" />
+  <rect x="135.9" y="55.9" width="8" height="30" />
+  <rect x="151" y="56" width="8" height="30" />
+
+  <rect x="3" y="3" width="165" height="90" stroke="green" stroke-width="4" fill="none" />
+</g>
+
+</defs>
+
+<g>
+
+<g filter="url(#diff)">
+<g filter="url(#shadow1)" transform="translate(100 0)">
+<use xlink:href="#rects" />
+</g>
+
+<g filter="url(#shadow2)" transform="translate(100 100)">
+<use xlink:href="#rects" />
+</g>
+
+<g filter="url(#shadow3)" transform="translate(100 200)">
+<use xlink:href="#rects" />
+</g>
+
+<g filter="url(#shadow4)" transform="translate(100 300)">
+<use xlink:href="#rects" />
+</g>
+</g>
+
+</g>
+
+</svg>
index 9c1b9c2..25849c7 100644 (file)
@@ -1,3 +1,47 @@
+2012-01-27  Branimir Lambov  <blambov@google.com>
+
+        SVG filters incorrectly move elements
+        https://bugs.webkit.org/show_bug.cgi?id=73643
+
+        Reviewed by Nikolas Zimmermann.
+
+        Fixes SVG image buffer creation to use the enclosing integer rect
+        instead of unstable rounded coordinates with scaling which was causing
+        animated images to jump around under filters. The image buffer was not 
+        aligned on a pixel boundary, and thus the positions and sizes of anything
+        drawn under that filter changed by 1-2 pixels compared to the same
+        elements drawn without an intermediate buffer, or drawn with a buffer
+        with a different target rectangle. 
+        
+        The change improves the positioning of clip paths, masks and filters.
+
+        Tests: svg/clip-path/clip-in-clip.svg
+               svg/clip-path/clipper-placement-issue.svg
+               svg/filters/filter-placement-issue.svg
+
+        * platform/graphics/filters/FETile.cpp:
+        (WebCore::FETile::platformApplySoftware):
+        * rendering/svg/RenderSVGResourceClipper.cpp:
+        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
+        * rendering/svg/RenderSVGResourceFilter.cpp:
+        (WebCore::RenderSVGResourceFilter::applyResource):
+        * rendering/svg/RenderSVGResourceGradient.cpp:
+        (WebCore::createMaskAndSwapContextForTextGradient):
+        (WebCore::clipToTextMask):
+        * rendering/svg/RenderSVGResourceMasker.cpp:
+        (WebCore::RenderSVGResourceMasker::applyResource):
+        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
+        * rendering/svg/RenderSVGResourcePattern.cpp:
+        (WebCore::RenderSVGResourcePattern::createTileImage):
+        * rendering/svg/SVGImageBufferTools.cpp:
+        (WebCore::SVGImageBufferTools::createImageBuffer):
+        (WebCore::SVGImageBufferTools::createImageBufferForPattern):
+        (WebCore::SVGImageBufferTools::clipToImageBuffer):
+        (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
+        (WebCore::SVGImageBufferTools::clampedAbsoluteSize):
+        * rendering/svg/SVGImageBufferTools.h:
+        (WebCore::SVGImageBufferTools::calcImageBufferRect):
+
 2012-01-25  Yury Semikhatsky  <yurys@chromium.org>
 
         Web Inspector: should be possible to open function declaration from script popover
index a6e1da3..e4a9508 100644 (file)
@@ -67,7 +67,7 @@ void FETile::platformApplySoftware()
     }
 
     OwnPtr<ImageBuffer> tileImage;
-    if (!SVGImageBufferTools::createImageBuffer(tileRect, tileRect, tileImage, ColorSpaceDeviceRGB, filter()->renderingMode()))
+    if (!SVGImageBufferTools::createImageBufferForPattern(tileRect, tileRect, tileImage, ColorSpaceDeviceRGB, filter()->renderingMode()))
         return;
 
     GraphicsContext* tileImageContext = tileImage->context();
index b4169a3..34db57d 100644 (file)
@@ -170,40 +170,38 @@ bool RenderSVGResourceClipper::applyClippingToContext(RenderObject* object, cons
     AffineTransform absoluteTransform;
     SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
 
-    FloatRect absoluteTargetRect = absoluteTransform.mapRect(repaintRect);
-    FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
-
-    if (shouldCreateClipData && !clampedAbsoluteTargetRect.isEmpty()) {
-        if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, clipperData->clipMaskImage, ColorSpaceDeviceRGB, Unaccelerated))
+    if (shouldCreateClipData && !repaintRect.isEmpty()) {
+        if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, clipperData->clipMaskImage, ColorSpaceDeviceRGB, Unaccelerated))
             return false;
 
         GraphicsContext* maskContext = clipperData->clipMaskImage->context();
         ASSERT(maskContext);
 
-        // The save/restore pair is needed for clipToImageBuffer - it doesn't work without it on non-Cg platforms.
-        GraphicsContextStateSaver stateSaver(*maskContext);
-        maskContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
         maskContext->concatCTM(animatedLocalTransform);
-        maskContext->concatCTM(absoluteTransform);
 
         // clipPath can also be clipped by another clipPath.
-        if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) {
-            if (RenderSVGResourceClipper* clipper = resources->clipper()) {
-                if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext))
-                    return false;
-            }
-        }
+        SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this);
+        RenderSVGResourceClipper* clipper;
+        bool succeeded;
+        if (resources && (clipper = resources->clipper())) {
+            GraphicsContextStateSaver stateSaver(*maskContext);
+
+            if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext))
+                return false;
 
-        if (!drawContentIntoMaskImage(clipperData, objectBoundingBox)) {
-            stateSaver.restore();
+            succeeded = drawContentIntoMaskImage(clipperData, objectBoundingBox);
+            // The context restore applies the clipping on non-CG platforms.
+        } else
+            succeeded = drawContentIntoMaskImage(clipperData, objectBoundingBox);
+
+        if (!succeeded)
             clipperData->clipMaskImage.clear();
-        }
     }
 
     if (!clipperData->clipMaskImage)
         return false;
 
-    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, clipperData->clipMaskImage);
+    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, repaintRect, clipperData->clipMaskImage);
     return true;
 }
 
index d72b960..cf4303d 100644 (file)
@@ -228,11 +228,14 @@ bool RenderSVGResourceFilter::applyResource(RenderObject* object, RenderStyle*,
         return false;
     }
 
-    absoluteDrawingRegion.scale(scale.width(), scale.height());
+    // Change the coordinate transformation applied to the filtered element to reflect the resolution of the filter.
+    AffineTransform effectiveTransform;
+    effectiveTransform.scale(scale.width(), scale.height());
+    effectiveTransform.multiply(filterData->shearFreeAbsoluteTransform);
 
     OwnPtr<ImageBuffer> sourceGraphic;
     RenderingMode renderingMode = object->document()->page()->settings()->acceleratedFiltersEnabled() ? Accelerated : Unaccelerated;
-    if (!SVGImageBufferTools::createImageBuffer(absoluteDrawingRegion, absoluteDrawingRegion, sourceGraphic, ColorSpaceLinearRGB, renderingMode)) {
+    if (!SVGImageBufferTools::createImageBuffer(drawingRegion, effectiveTransform, sourceGraphic, ColorSpaceLinearRGB, renderingMode)) {
         ASSERT(!m_filter.contains(object));
         filterData->savedContext = context;
         m_filter.set(object, filterData.leakPtr());
@@ -245,12 +248,6 @@ bool RenderSVGResourceFilter::applyResource(RenderObject* object, RenderStyle*,
     GraphicsContext* sourceGraphicContext = sourceGraphic->context();
     ASSERT(sourceGraphicContext);
   
-    sourceGraphicContext->translate(-absoluteDrawingRegion.x(), -absoluteDrawingRegion.y());
-    if (scale.width() != 1 || scale.height() != 1)
-        sourceGraphicContext->scale(scale);
-
-    sourceGraphicContext->concatCTM(filterData->shearFreeAbsoluteTransform);
-    sourceGraphicContext->clearRect(FloatRect(FloatPoint(), absoluteDrawingRegion.size()));
     filterData->sourceGraphicBuffer = sourceGraphic.release();
     filterData->savedContext = context;
 
index 1c022a3..ead5510 100644 (file)
@@ -70,21 +70,13 @@ static inline bool createMaskAndSwapContextForTextGradient(GraphicsContext*& con
     AffineTransform absoluteTransform;
     SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
 
-    FloatRect absoluteTargetRect = absoluteTransform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
-    FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
-    if (clampedAbsoluteTargetRect.isEmpty())
-        return false;
-
+    FloatRect repaintRect = textRootBlock->repaintRectInLocalCoordinates();
     OwnPtr<ImageBuffer> maskImage;
-    if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, maskImage, ColorSpaceDeviceRGB, Unaccelerated))
+    if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, maskImage, ColorSpaceDeviceRGB, Unaccelerated))
         return false;
 
     GraphicsContext* maskImageContext = maskImage->context();
     ASSERT(maskImageContext);
-
-    maskImageContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
-    maskImageContext->concatCTM(absoluteTransform);
-
     ASSERT(maskImage);
     savedContext = context;
     context = maskImageContext;
@@ -102,15 +94,11 @@ static inline AffineTransform clipToTextMask(GraphicsContext* context,
     RenderObject* textRootBlock = RenderSVGText::locateRenderSVGTextAncestor(object);
     ASSERT(textRootBlock);
 
-    targetRect = textRootBlock->repaintRectInLocalCoordinates();
-
     AffineTransform absoluteTransform;
     SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
 
-    FloatRect absoluteTargetRect = absoluteTransform.mapRect(targetRect);
-    FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
-
-    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, imageBuffer);
+    targetRect = textRootBlock->repaintRectInLocalCoordinates();
+    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, targetRect, imageBuffer);
 
     AffineTransform matrix;
     if (boundingBoxMode) {
index 7f78059..bf59549 100644 (file)
@@ -94,10 +94,9 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
     AffineTransform absoluteTransform;
     SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
 
-    FloatRect absoluteTargetRect = absoluteTransform.mapRect(object->repaintRectInLocalCoordinates());
-    FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
+    FloatRect repaintRect = object->repaintRectInLocalCoordinates();
 
-    if (!maskerData->maskImage && !clampedAbsoluteTargetRect.isEmpty()) {
+    if (!maskerData->maskImage && !repaintRect.isEmpty()) {
         SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
         if (!maskElement)
             return false;
@@ -106,19 +105,10 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
         const SVGRenderStyle* svgStyle = style()->svgStyle();
         ASSERT(svgStyle);
         ColorSpace colorSpace = svgStyle->colorInterpolation() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB;
-        if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, maskerData->maskImage, colorSpace, Unaccelerated))
+        if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, maskerData->maskImage, colorSpace, Unaccelerated))
             return false;
 
-        GraphicsContext* maskImageContext = maskerData->maskImage->context();
-        ASSERT(maskImageContext);
-
-        // The save/restore pair is needed for clipToImageBuffer - it doesn't work without it on non-Cg platforms.
-        maskImageContext->save();
-        maskImageContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
-        maskImageContext->concatCTM(absoluteTransform);
-
         if (!drawContentIntoMaskImage(maskerData, colorSpace, maskElement, object)) {
-            maskImageContext->restore();
             maskerData->maskImage.clear();
         }
     }
@@ -126,7 +116,7 @@ bool RenderSVGResourceMasker::applyResource(RenderObject* object, RenderStyle*,
     if (!maskerData->maskImage)
         return false;
 
-    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, maskerData->maskImage);
+    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, repaintRect, maskerData->maskImage);
     return true;
 }
 
@@ -157,8 +147,6 @@ bool RenderSVGResourceMasker::drawContentIntoMaskImage(MaskerData* maskerData, C
         SVGImageBufferTools::renderSubtreeToImageBuffer(maskerData->maskImage.get(), renderer, maskContentTransformation);
     }
 
-    maskImageContext->restore();
-
 #if !USE(CG)
     maskerData->maskImage->transformColorSpace(ColorSpaceDeviceRGB, colorSpace);
 #else
index a17ed5a..f727bb0 100644 (file)
@@ -236,7 +236,7 @@ PassOwnPtr<ImageBuffer> RenderSVGResourcePattern::createTileImage(const PatternA
 
     OwnPtr<ImageBuffer> tileImage;
 
-    if (!SVGImageBufferTools::createImageBuffer(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, tileImage, ColorSpaceDeviceRGB, Unaccelerated))
+    if (!SVGImageBufferTools::createImageBufferForPattern(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, tileImage, ColorSpaceDeviceRGB, Unaccelerated))
         return nullptr;
 
     GraphicsContext* tileImageContext = tileImage->context();
index e38d3ab..ef97a28 100644 (file)
@@ -28,7 +28,7 @@
 #include "RenderSVGContainer.h"
 #include "RenderSVGRoot.h"
 
-static float kMaxImageBufferSize = 4096;
+static int kMaxImageBufferSize = 4096;
 
 namespace WebCore {
 
@@ -52,10 +52,38 @@ void SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(
     }
 }
 
-bool SVGImageBufferTools::createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
+bool SVGImageBufferTools::createImageBuffer(const FloatRect& targetRect, const AffineTransform& absoluteTransform, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
 {
-    IntSize imageSize(roundedImageBufferSize(clampedAbsoluteTargetRect.size()));
-    IntSize unclampedImageSize(SVGImageBufferTools::roundedImageBufferSize(absoluteTargetRect.size()));
+    IntRect paintRect = calculateImageBufferRect(targetRect, absoluteTransform);
+    // Don't create empty ImageBuffers.
+    if (paintRect.isEmpty())
+        return false;
+
+    IntSize clampedSize = clampedAbsoluteSize(paintRect.size());
+    OwnPtr<ImageBuffer> image = ImageBuffer::create(clampedSize, colorSpace, renderingMode);
+    if (!image)
+        return false;
+
+    GraphicsContext* imageContext = image->context();
+    ASSERT(imageContext);
+
+    // This is done in absolute coordinates.
+    imageContext->translate(-paintRect.x(), -paintRect.y());
+
+    imageContext->concatCTM(absoluteTransform);
+
+    // This happens in local coordinates.
+    imageContext->scale(FloatSize(static_cast<float>(clampedSize.width()) / paintRect.width(),
+                                  static_cast<float>(clampedSize.height()) / paintRect.height()));
+
+    imageBuffer = image.release();
+    return true;
+}
+
+bool SVGImageBufferTools::createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
+{
+    IntSize imageSize(roundedIntSize(clampedAbsoluteTargetRect.size()));
+    IntSize unclampedImageSize(roundedIntSize(absoluteTargetRect.size()));
 
     // Don't create empty ImageBuffers.
     if (imageSize.isEmpty())
@@ -93,15 +121,17 @@ void SVGImageBufferTools::renderSubtreeToImageBuffer(ImageBuffer* image, RenderO
     contentTransformation = savedContentTransformation;
 }
 
-void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer)
+void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>& imageBuffer)
 {
     ASSERT(context);
     ASSERT(imageBuffer);
 
+    FloatRect absoluteTargetRect = calculateImageBufferRect(targetRect, absoluteTransform);
+
     // The mask image has been created in the absolute coordinate space, as the image should not be scaled.
     // So the actual masking process has to be done in the absolute coordinate space as well.
     context->concatCTM(absoluteTransform.inverse());
-    context->clipToImageBuffer(imageBuffer.get(), clampedAbsoluteTargetRect);
+    context->clipToImageBuffer(imageBuffer.get(), absoluteTargetRect);
     context->concatCTM(absoluteTransform);
 
     // When nesting resources, with objectBoundingBox as content unit types, there's no use in caching the
@@ -110,22 +140,16 @@ void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const Affi
         imageBuffer.clear();
 }
 
-IntSize SVGImageBufferTools::roundedImageBufferSize(const FloatSize& size)
+FloatRect SVGImageBufferTools::clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect)
 {
-    return IntSize(static_cast<int>(lroundf(size.width())), static_cast<int>(lroundf(size.height())));
+    const FloatSize maxImageBufferSize(kMaxImageBufferSize, kMaxImageBufferSize);
+    return FloatRect(absoluteTargetRect.location(), absoluteTargetRect.size().shrunkTo(maxImageBufferSize));
 }
 
-FloatRect SVGImageBufferTools::clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect)
+IntSize SVGImageBufferTools::clampedAbsoluteSize(const IntSize& absoluteSize)
 {
-    FloatRect clampedAbsoluteTargetRect = absoluteTargetRect;
-
-    if (clampedAbsoluteTargetRect.width() > kMaxImageBufferSize)
-        clampedAbsoluteTargetRect.setWidth(kMaxImageBufferSize);
-
-    if (clampedAbsoluteTargetRect.height() > kMaxImageBufferSize)
-        clampedAbsoluteTargetRect.setHeight(kMaxImageBufferSize);
-
-    return clampedAbsoluteTargetRect;
+    const IntSize maxImageBufferSize(kMaxImageBufferSize, kMaxImageBufferSize);
+    return absoluteSize.shrunkTo(maxImageBufferSize);
 }
 
 void SVGImageBufferTools::clear2DRotation(AffineTransform& transform)
index 7698d2c..bfd9ff6 100644 (file)
@@ -34,16 +34,25 @@ class RenderObject;
 
 class SVGImageBufferTools {
     WTF_MAKE_NONCOPYABLE(SVGImageBufferTools);
+
 public:
-    static bool createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
+    static bool createImageBuffer(const FloatRect& paintRect, const AffineTransform& absoluteTransform, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
+    // Patterns need a different float-to-integer coordinate mapping.
+    static bool createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
+
     static void renderSubtreeToImageBuffer(ImageBuffer*, RenderObject*, const AffineTransform&);
-    static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&);
+    static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>&);
 
     static void calculateTransformationToOutermostSVGCoordinateSystem(const RenderObject*, AffineTransform& absoluteTransform);
+    static IntSize clampedAbsoluteSize(const IntSize&);
     static FloatRect clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect);
-    static IntSize roundedImageBufferSize(const FloatSize&);
     static void clear2DRotation(AffineTransform&);
 
+    static IntRect calculateImageBufferRect(const FloatRect& targetRect, const AffineTransform& absoluteTransform)
+    {
+        return enclosingIntRect(absoluteTransform.mapRect(targetRect));
+    }
+
 private:
     SVGImageBufferTools() { }
     ~SVGImageBufferTools() { }