Changeset 106108 in webkit


Ignore:
Timestamp:
Jan 27, 2012 4:38:57 AM (12 years ago)
Author:
Nikolas Zimmermann
Message:

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 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):
Location:
trunk
Files:
13 added
3 deleted
97 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106107 r106108  
     12012-01-27 Branimir Lambov <blambov@google.com>
     2
     3        SVG filters incorrectly move elements
     4        https://bugs.webkit.org/show_bug.cgi?id=73643
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        New tests and updated expectations.
     9
     10        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
     11        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
     12        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
     13        * platform/chromium-linux/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
     14        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.png: Removed.
     15        * platform/chromium-linux/svg/W3C-SVG-1.1/fonts-elem-04-b-expected.txt: Removed.
     16        * platform/chromium-linux/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
     17        * platform/chromium-linux/svg/batik/filters/feTile-expected.png:
     18        * platform/chromium-linux/svg/clip-path/clipper-placement-issue-expected.png: Added.
     19        * platform/chromium-linux/svg/clip-path/deep-nested-clip-in-mask-different-unitTypes-expected.png:
     20        * platform/chromium-linux/svg/custom/feComponentTransfer-Discrete-expected.png:
     21        * platform/chromium-linux/svg/custom/feComponentTransfer-Gamma-expected.png:
     22        * platform/chromium-linux/svg/custom/feComponentTransfer-Linear-expected.png:
     23        * platform/chromium-linux/svg/custom/feComponentTransfer-Table-expected.png:
     24        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
     25        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
     26        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
     27        * platform/chromium-linux/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
     28        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
     29        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
     30        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
     31        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
     32        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
     33        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
     34        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
     35        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
     36        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
     37        * platform/chromium-linux/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
     38        * platform/chromium-linux/svg/filters/big-sized-filter-expected.png: Added.
     39        * platform/chromium-linux/svg/filters/feDropShadow-expected.png:
     40        * platform/chromium-linux/svg/filters/filter-placement-issue-expected.png: Added.
     41        * platform/chromium-linux/svg/filters/filterRes-expected.png:
     42        * platform/chromium-linux/svg/filters/filterRes-expected.txt: Removed.
     43        * platform/chromium-linux/svg/filters/filterRes2-expected.png: Added.
     44        * platform/chromium-linux/svg/wicd/test-scalable-background-image1-expected.png:
     45        * platform/chromium-win/svg/as-background-image/svg-as-background-2-expected.png:
     46        * platform/chromium-win/svg/filters/big-sized-filter-expected.png:
     47        * platform/chromium/test_expectations.txt:
     48        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
     49        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
     50        * platform/mac-snowleopard/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
     51        * platform/mac-snowleopard/svg/custom/absolute-sized-content-with-resources-expected.png:
     52        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Discrete-expected.png:
     53        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Gamma-expected.png:
     54        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Linear-expected.png:
     55        * platform/mac-snowleopard/svg/custom/feComponentTransfer-Table-expected.png:
     56        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
     57        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
     58        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
     59        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
     60        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
     61        * platform/mac-snowleopard/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
     62        * platform/mac/svg/W3C-SVG-1.1/filters-color-01-b-expected.png:
     63        * platform/mac/svg/W3C-SVG-1.1/filters-comptran-01-b-expected.png:
     64        * platform/mac/svg/W3C-SVG-1.1/filters-example-01-b-expected.png:
     65        * platform/mac/svg/W3C-SVG-1.1/filters-morph-01-f-expected.png:
     66        * platform/mac/svg/W3C-SVG-1.1/masking-path-01-b-expected.png:
     67        * platform/mac/svg/W3C-SVG-1.1/pservers-grad-08-b-expected.png:
     68        * platform/mac/svg/as-background-image/svg-as-background-6-expected.png:
     69        * platform/mac/svg/batik/filters/feTile-expected.png:
     70        * platform/mac/svg/batik/masking/maskRegions-expected.png:
     71        * platform/mac/svg/clip-path/clip-in-clip-expected.png: Added.
     72        * platform/mac/svg/clip-path/clip-in-clip-expected.txt: Added.
     73        * platform/mac/svg/clip-path/clipper-placement-issue-expected.png: Added.
     74        * platform/mac/svg/clip-path/clipper-placement-issue-expected.txt: Added.
     75        * platform/mac/svg/custom/absolute-sized-content-with-resources-expected.png:
     76        * platform/mac/svg/custom/feComponentTransfer-Discrete-expected.png:
     77        * platform/mac/svg/custom/feComponentTransfer-Gamma-expected.png:
     78        * platform/mac/svg/custom/feComponentTransfer-Linear-expected.png:
     79        * platform/mac/svg/custom/feComponentTransfer-Table-expected.png:
     80        * platform/mac/svg/custom/grayscale-gradient-mask-2-expected.png:
     81        * platform/mac/svg/custom/grayscale-gradient-mask-expected.png:
     82        * platform/mac/svg/custom/js-late-gradient-and-object-creation-expected.png:
     83        * platform/mac/svg/custom/js-late-gradient-creation-expected.png:
     84        * platform/mac/svg/custom/text-rotated-gradient-expected.png:
     85        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr-expected.png:
     86        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr-expected.png:
     87        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr-expected.png:
     88        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop-expected.png:
     89        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-type-prop-expected.png:
     90        * platform/mac/svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-values-prop-expected.png:
     91        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-height-attr-expected.png:
     92        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr-expected.png:
     93        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-width-attr-expected.png:
     94        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-x-attr-expected.png:
     95        * platform/mac/svg/dynamic-updates/SVGMaskElement-dom-y-attr-expected.png:
     96        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-height-prop-expected.png:
     97        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop-expected.png:
     98        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-width-prop-expected.png:
     99        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-x-prop-expected.png:
     100        * platform/mac/svg/dynamic-updates/SVGMaskElement-svgdom-y-prop-expected.png:
     101        * platform/mac/svg/filters/big-sized-filter-expected.png:
     102        * platform/mac/svg/filters/feDropShadow-expected.png:
     103        * platform/mac/svg/filters/filter-placement-issue-expected.png: Added.
     104        * platform/mac/svg/filters/filter-placement-issue-expected.txt: Added.
     105        * platform/mac/svg/filters/filterRes-expected.png:
     106        * platform/mac/svg/filters/filterRes2-expected.png:
     107        * platform/mac/svg/text/selection-background-color-expected.png:
     108        * platform/mac/svg/transforms/text-with-mask-with-svg-transform-expected.png:
     109        * platform/mac/svg/zoom/page/zoom-mask-with-percentages-expected.png:
     110        * svg/clip-path/clip-in-clip.svg: Added.
     111        * svg/clip-path/clipper-placement-issue.svg: Added.
     112        * svg/filters/filter-placement-issue.svg: Added.
     113
    11142012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
    2115
  • trunk/LayoutTests/platform/chromium/test_expectations.txt

    r106107 r106108  
    4040BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/dom/Window/window-postmessage-clone-deep-array.html = PASS
    4141BUGCR24182 SLOW SNOWLEOPARD DEBUG : fast/frames/calculate-percentage.html = PASS
    42 BUGCR24182 SLOW DEBUG : svg/filters/big-sized-filter.svg = PASS
     42// BUGCR24182 SLOW DEBUG : svg/filters/big-sized-filter.svg = PASS
    4343// See BUGCR104797
    4444
     
    36963696BUGWK73607 GPU LINUX DEBUG : fast/canvas/canvas-overloads-strokeText.html = TIMEOUT TEXT PASS
    36973697
     3698// Tests needing rebaseline after bug 73643 patch
     3699BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-color-01-b.svg = IMAGE
     3700BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-comptran-01-b.svg = IMAGE
     3701//BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-example-01-b.svg = IMAGE
     3702BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/filters-morph-01-f.svg = IMAGE
     3703BUGWK73643 WIN MAC : svg/W3C-SVG-1.1/masking-path-01-b.svg = IMAGE
     3704//BUGWK73643 WIN MAC : svg/batik/filters/feTile.svg = IMAGE
     3705BUGWK73643 MAC : svg/batik/filters/feTile.svg = IMAGE
     3706BUGWK73643 WIN MAC : svg/clip-path/clipper-placement-issue.svg = IMAGE
     3707//BUGWK73643 WIN MAC : svg/clip-path/deep-nested-clip-in-mask-different-unitTypes.svg = IMAGE
     3708BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Discrete.svg = IMAGE
     3709BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Gamma.svg = IMAGE
     3710BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Linear.svg = IMAGE
     3711BUGWK73643 WIN MAC : svg/custom/feComponentTransfer-Table.svg = IMAGE
     3712BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-in-attr.html = IMAGE
     3713BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-type-attr.html = IMAGE
     3714BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-dom-values-attr.html = IMAGE
     3715BUGWK73643 WIN MAC : svg/dynamic-updates/SVGFEColorMatrixElement-svgdom-in-prop.html = IMAGE
     3716BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-height-attr.html = IMAGE
     3717BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-maskContentUnits-attr.html = IMAGE
     3718BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-width-attr.html = IMAGE
     3719BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-x-attr.html = IMAGE
     3720BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-dom-y-attr.html = IMAGE
     3721BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-height-prop.html = IMAGE
     3722BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-maskContentUnits-prop.html = IMAGE
     3723BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-width-prop.html = IMAGE
     3724BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-x-prop.html = IMAGE
     3725BUGWK73643 WIN MAC : svg/dynamic-updates/SVGMaskElement-svgdom-y-prop.html = IMAGE
     3726BUGWK73643 WIN MAC : svg/filters/feDropShadow.svg = IMAGE
     3727BUGWK73643 WIN MAC : svg/filters/filterRes.svg = IMAGE
     3728BUGWK73643 SLOW DEBUG WIN MAC : svg/filters/big-sized-filter.svg = IMAGE
     3729BUGWK73643 SLOW DEBUG LINUX : svg/filters/big-sized-filter.svg = PASS
     3730BUGWK73643 RELEASE WIN MAC : svg/filters/big-sized-filter.svg = IMAGE
     3731BUGWK73643 WIN MAC : svg/filters/filter-placement-issue.svg = IMAGE
     3732//BUGWK73643 WIN MAC : svg/filters/filterRes.svg = IMAGE
     3733BUGWK73643 WIN MAC : svg/filters/filterRes2.svg = IMAGE
     3734BUGWK73643 WIN MAC : svg/as-background-image/svg-as-background-2.html = IMAGE
     3735BUGWK73643 WIN MAC : svg/wicd/test-scalable-background-image1.xhtml = IMAGE
     3736
    36983737BUGWK73681 : http/tests/appcache/video.html = TIMEOUT PASS
    36993738
  • trunk/Source/WebCore/ChangeLog

    r106101 r106108  
     12012-01-27  Branimir Lambov  <blambov@google.com>
     2
     3        SVG filters incorrectly move elements
     4        https://bugs.webkit.org/show_bug.cgi?id=73643
     5
     6        Reviewed by Nikolas Zimmermann.
     7
     8        Fixes SVG image buffer creation to use the enclosing integer rect
     9        instead of unstable rounded coordinates with scaling which was causing
     10        animated images to jump around under filters. The image buffer was not
     11        aligned on a pixel boundary, and thus the positions and sizes of anything
     12        drawn under that filter changed by 1-2 pixels compared to the same
     13        elements drawn without an intermediate buffer, or drawn with a buffer
     14        with a different target rectangle.
     15       
     16        The change improves the positioning of clip paths, masks and filters.
     17
     18        Tests: svg/clip-path/clip-in-clip.svg
     19               svg/clip-path/clipper-placement-issue.svg
     20               svg/filters/filter-placement-issue.svg
     21
     22        * platform/graphics/filters/FETile.cpp:
     23        (WebCore::FETile::platformApplySoftware):
     24        * rendering/svg/RenderSVGResourceClipper.cpp:
     25        (WebCore::RenderSVGResourceClipper::applyClippingToContext):
     26        * rendering/svg/RenderSVGResourceFilter.cpp:
     27        (WebCore::RenderSVGResourceFilter::applyResource):
     28        * rendering/svg/RenderSVGResourceGradient.cpp:
     29        (WebCore::createMaskAndSwapContextForTextGradient):
     30        (WebCore::clipToTextMask):
     31        * rendering/svg/RenderSVGResourceMasker.cpp:
     32        (WebCore::RenderSVGResourceMasker::applyResource):
     33        (WebCore::RenderSVGResourceMasker::drawContentIntoMaskImage):
     34        * rendering/svg/RenderSVGResourcePattern.cpp:
     35        (WebCore::RenderSVGResourcePattern::createTileImage):
     36        * rendering/svg/SVGImageBufferTools.cpp:
     37        (WebCore::SVGImageBufferTools::createImageBuffer):
     38        (WebCore::SVGImageBufferTools::createImageBufferForPattern):
     39        (WebCore::SVGImageBufferTools::clipToImageBuffer):
     40        (WebCore::SVGImageBufferTools::clampedAbsoluteTargetRect):
     41        (WebCore::SVGImageBufferTools::clampedAbsoluteSize):
     42        * rendering/svg/SVGImageBufferTools.h:
     43        (WebCore::SVGImageBufferTools::calcImageBufferRect):
     44
    1452012-01-25  Yury Semikhatsky  <yurys@chromium.org>
    246
  • trunk/Source/WebCore/platform/graphics/filters/FETile.cpp

    r102088 r106108  
    6868
    6969    OwnPtr<ImageBuffer> tileImage;
    70     if (!SVGImageBufferTools::createImageBuffer(tileRect, tileRect, tileImage, ColorSpaceDeviceRGB, filter()->renderingMode()))
     70    if (!SVGImageBufferTools::createImageBufferForPattern(tileRect, tileRect, tileImage, ColorSpaceDeviceRGB, filter()->renderingMode()))
    7171        return;
    7272
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceClipper.cpp

    r105986 r106108  
    171171    SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
    172172
    173     FloatRect absoluteTargetRect = absoluteTransform.mapRect(repaintRect);
    174     FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
    175 
    176     if (shouldCreateClipData && !clampedAbsoluteTargetRect.isEmpty()) {
    177         if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, clipperData->clipMaskImage, ColorSpaceDeviceRGB, Unaccelerated))
     173    if (shouldCreateClipData && !repaintRect.isEmpty()) {
     174        if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, clipperData->clipMaskImage, ColorSpaceDeviceRGB, Unaccelerated))
    178175            return false;
    179176
     
    181178        ASSERT(maskContext);
    182179
    183         // The save/restore pair is needed for clipToImageBuffer - it doesn't work without it on non-Cg platforms.
    184         GraphicsContextStateSaver stateSaver(*maskContext);
    185         maskContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
    186180        maskContext->concatCTM(animatedLocalTransform);
    187         maskContext->concatCTM(absoluteTransform);
    188181
    189182        // clipPath can also be clipped by another clipPath.
    190         if (SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this)) {
    191             if (RenderSVGResourceClipper* clipper = resources->clipper()) {
    192                 if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext))
    193                     return false;
    194             }
    195         }
    196 
    197         if (!drawContentIntoMaskImage(clipperData, objectBoundingBox)) {
    198             stateSaver.restore();
     183        SVGResources* resources = SVGResourcesCache::cachedResourcesForRenderObject(this);
     184        RenderSVGResourceClipper* clipper;
     185        bool succeeded;
     186        if (resources && (clipper = resources->clipper())) {
     187            GraphicsContextStateSaver stateSaver(*maskContext);
     188
     189            if (!clipper->applyClippingToContext(this, objectBoundingBox, repaintRect, maskContext))
     190                return false;
     191
     192            succeeded = drawContentIntoMaskImage(clipperData, objectBoundingBox);
     193            // The context restore applies the clipping on non-CG platforms.
     194        } else
     195            succeeded = drawContentIntoMaskImage(clipperData, objectBoundingBox);
     196
     197        if (!succeeded)
    199198            clipperData->clipMaskImage.clear();
    200         }
    201199    }
    202200
     
    204202        return false;
    205203
    206     SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, clipperData->clipMaskImage);
     204    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, repaintRect, clipperData->clipMaskImage);
    207205    return true;
    208206}
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceFilter.cpp

    r102088 r106108  
    229229    }
    230230
    231     absoluteDrawingRegion.scale(scale.width(), scale.height());
     231    // Change the coordinate transformation applied to the filtered element to reflect the resolution of the filter.
     232    AffineTransform effectiveTransform;
     233    effectiveTransform.scale(scale.width(), scale.height());
     234    effectiveTransform.multiply(filterData->shearFreeAbsoluteTransform);
    232235
    233236    OwnPtr<ImageBuffer> sourceGraphic;
    234237    RenderingMode renderingMode = object->document()->page()->settings()->acceleratedFiltersEnabled() ? Accelerated : Unaccelerated;
    235     if (!SVGImageBufferTools::createImageBuffer(absoluteDrawingRegion, absoluteDrawingRegion, sourceGraphic, ColorSpaceLinearRGB, renderingMode)) {
     238    if (!SVGImageBufferTools::createImageBuffer(drawingRegion, effectiveTransform, sourceGraphic, ColorSpaceLinearRGB, renderingMode)) {
    236239        ASSERT(!m_filter.contains(object));
    237240        filterData->savedContext = context;
     
    246249    ASSERT(sourceGraphicContext);
    247250 
    248     sourceGraphicContext->translate(-absoluteDrawingRegion.x(), -absoluteDrawingRegion.y());
    249     if (scale.width() != 1 || scale.height() != 1)
    250         sourceGraphicContext->scale(scale);
    251 
    252     sourceGraphicContext->concatCTM(filterData->shearFreeAbsoluteTransform);
    253     sourceGraphicContext->clearRect(FloatRect(FloatPoint(), absoluteDrawingRegion.size()));
    254251    filterData->sourceGraphicBuffer = sourceGraphic.release();
    255252    filterData->savedContext = context;
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceGradient.cpp

    r103907 r106108  
    7171    SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
    7272
    73     FloatRect absoluteTargetRect = absoluteTransform.mapRect(textRootBlock->repaintRectInLocalCoordinates());
    74     FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
    75     if (clampedAbsoluteTargetRect.isEmpty())
    76         return false;
    77 
     73    FloatRect repaintRect = textRootBlock->repaintRectInLocalCoordinates();
    7874    OwnPtr<ImageBuffer> maskImage;
    79     if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, maskImage, ColorSpaceDeviceRGB, Unaccelerated))
     75    if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, maskImage, ColorSpaceDeviceRGB, Unaccelerated))
    8076        return false;
    8177
    8278    GraphicsContext* maskImageContext = maskImage->context();
    8379    ASSERT(maskImageContext);
    84 
    85     maskImageContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
    86     maskImageContext->concatCTM(absoluteTransform);
    87 
    8880    ASSERT(maskImage);
    8981    savedContext = context;
     
    10395    ASSERT(textRootBlock);
    10496
    105     targetRect = textRootBlock->repaintRectInLocalCoordinates();
    106 
    10797    AffineTransform absoluteTransform;
    10898    SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(textRootBlock, absoluteTransform);
    10999
    110     FloatRect absoluteTargetRect = absoluteTransform.mapRect(targetRect);
    111     FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
    112 
    113     SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, imageBuffer);
     100    targetRect = textRootBlock->repaintRectInLocalCoordinates();
     101    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, targetRect, imageBuffer);
    114102
    115103    AffineTransform matrix;
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourceMasker.cpp

    r105978 r106108  
    9595    SVGImageBufferTools::calculateTransformationToOutermostSVGCoordinateSystem(object, absoluteTransform);
    9696
    97     FloatRect absoluteTargetRect = absoluteTransform.mapRect(object->repaintRectInLocalCoordinates());
    98     FloatRect clampedAbsoluteTargetRect = SVGImageBufferTools::clampedAbsoluteTargetRect(absoluteTargetRect);
    99 
    100     if (!maskerData->maskImage && !clampedAbsoluteTargetRect.isEmpty()) {
     97    FloatRect repaintRect = object->repaintRectInLocalCoordinates();
     98
     99    if (!maskerData->maskImage && !repaintRect.isEmpty()) {
    101100        SVGMaskElement* maskElement = static_cast<SVGMaskElement*>(node());
    102101        if (!maskElement)
     
    107106        ASSERT(svgStyle);
    108107        ColorSpace colorSpace = svgStyle->colorInterpolation() == CI_LINEARRGB ? ColorSpaceLinearRGB : ColorSpaceDeviceRGB;
    109         if (!SVGImageBufferTools::createImageBuffer(absoluteTargetRect, clampedAbsoluteTargetRect, maskerData->maskImage, colorSpace, Unaccelerated))
     108        if (!SVGImageBufferTools::createImageBuffer(repaintRect, absoluteTransform, maskerData->maskImage, colorSpace, Unaccelerated))
    110109            return false;
    111110
    112         GraphicsContext* maskImageContext = maskerData->maskImage->context();
    113         ASSERT(maskImageContext);
    114 
    115         // The save/restore pair is needed for clipToImageBuffer - it doesn't work without it on non-Cg platforms.
    116         maskImageContext->save();
    117         maskImageContext->translate(-clampedAbsoluteTargetRect.x(), -clampedAbsoluteTargetRect.y());
    118         maskImageContext->concatCTM(absoluteTransform);
    119 
    120111        if (!drawContentIntoMaskImage(maskerData, colorSpace, maskElement, object)) {
    121             maskImageContext->restore();
    122112            maskerData->maskImage.clear();
    123113        }
     
    127117        return false;
    128118
    129     SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, clampedAbsoluteTargetRect, maskerData->maskImage);
     119    SVGImageBufferTools::clipToImageBuffer(context, absoluteTransform, repaintRect, maskerData->maskImage);
    130120    return true;
    131121}
     
    158148    }
    159149
    160     maskImageContext->restore();
    161 
    162150#if !USE(CG)
    163151    maskerData->maskImage->transformColorSpace(ColorSpaceDeviceRGB, colorSpace);
  • trunk/Source/WebCore/rendering/svg/RenderSVGResourcePattern.cpp

    r105978 r106108  
    237237    OwnPtr<ImageBuffer> tileImage;
    238238
    239     if (!SVGImageBufferTools::createImageBuffer(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, tileImage, ColorSpaceDeviceRGB, Unaccelerated))
     239    if (!SVGImageBufferTools::createImageBufferForPattern(absoluteTileBoundaries, clampedAbsoluteTileBoundaries, tileImage, ColorSpaceDeviceRGB, Unaccelerated))
    240240        return nullptr;
    241241
  • trunk/Source/WebCore/rendering/svg/SVGImageBufferTools.cpp

    r105978 r106108  
    2929#include "RenderSVGRoot.h"
    3030
    31 static float kMaxImageBufferSize = 4096;
     31static int kMaxImageBufferSize = 4096;
    3232
    3333namespace WebCore {
     
    5353}
    5454
    55 bool SVGImageBufferTools::createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
     55bool SVGImageBufferTools::createImageBuffer(const FloatRect& targetRect, const AffineTransform& absoluteTransform, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
    5656{
    57     IntSize imageSize(roundedImageBufferSize(clampedAbsoluteTargetRect.size()));
    58     IntSize unclampedImageSize(SVGImageBufferTools::roundedImageBufferSize(absoluteTargetRect.size()));
     57    IntRect paintRect = calculateImageBufferRect(targetRect, absoluteTransform);
     58    // Don't create empty ImageBuffers.
     59    if (paintRect.isEmpty())
     60        return false;
     61
     62    IntSize clampedSize = clampedAbsoluteSize(paintRect.size());
     63    OwnPtr<ImageBuffer> image = ImageBuffer::create(clampedSize, colorSpace, renderingMode);
     64    if (!image)
     65        return false;
     66
     67    GraphicsContext* imageContext = image->context();
     68    ASSERT(imageContext);
     69
     70    // This is done in absolute coordinates.
     71    imageContext->translate(-paintRect.x(), -paintRect.y());
     72
     73    imageContext->concatCTM(absoluteTransform);
     74
     75    // This happens in local coordinates.
     76    imageContext->scale(FloatSize(static_cast<float>(clampedSize.width()) / paintRect.width(),
     77                                  static_cast<float>(clampedSize.height()) / paintRect.height()));
     78
     79    imageBuffer = image.release();
     80    return true;
     81}
     82
     83bool SVGImageBufferTools::createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer, ColorSpace colorSpace, RenderingMode renderingMode)
     84{
     85    IntSize imageSize(roundedIntSize(clampedAbsoluteTargetRect.size()));
     86    IntSize unclampedImageSize(roundedIntSize(absoluteTargetRect.size()));
    5987
    6088    // Don't create empty ImageBuffers.
     
    94122}
    95123
    96 void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>& imageBuffer)
     124void SVGImageBufferTools::clipToImageBuffer(GraphicsContext* context, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>& imageBuffer)
    97125{
    98126    ASSERT(context);
    99127    ASSERT(imageBuffer);
    100128
     129    FloatRect absoluteTargetRect = calculateImageBufferRect(targetRect, absoluteTransform);
     130
    101131    // The mask image has been created in the absolute coordinate space, as the image should not be scaled.
    102132    // So the actual masking process has to be done in the absolute coordinate space as well.
    103133    context->concatCTM(absoluteTransform.inverse());
    104     context->clipToImageBuffer(imageBuffer.get(), clampedAbsoluteTargetRect);
     134    context->clipToImageBuffer(imageBuffer.get(), absoluteTargetRect);
    105135    context->concatCTM(absoluteTransform);
    106136
     
    111141}
    112142
    113 IntSize SVGImageBufferTools::roundedImageBufferSize(const FloatSize& size)
     143FloatRect SVGImageBufferTools::clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect)
    114144{
    115     return IntSize(static_cast<int>(lroundf(size.width())), static_cast<int>(lroundf(size.height())));
     145    const FloatSize maxImageBufferSize(kMaxImageBufferSize, kMaxImageBufferSize);
     146    return FloatRect(absoluteTargetRect.location(), absoluteTargetRect.size().shrunkTo(maxImageBufferSize));
    116147}
    117148
    118 FloatRect SVGImageBufferTools::clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect)
     149IntSize SVGImageBufferTools::clampedAbsoluteSize(const IntSize& absoluteSize)
    119150{
    120     FloatRect clampedAbsoluteTargetRect = absoluteTargetRect;
    121 
    122     if (clampedAbsoluteTargetRect.width() > kMaxImageBufferSize)
    123         clampedAbsoluteTargetRect.setWidth(kMaxImageBufferSize);
    124 
    125     if (clampedAbsoluteTargetRect.height() > kMaxImageBufferSize)
    126         clampedAbsoluteTargetRect.setHeight(kMaxImageBufferSize);
    127 
    128     return clampedAbsoluteTargetRect;
     151    const IntSize maxImageBufferSize(kMaxImageBufferSize, kMaxImageBufferSize);
     152    return absoluteSize.shrunkTo(maxImageBufferSize);
    129153}
    130154
  • trunk/Source/WebCore/rendering/svg/SVGImageBufferTools.h

    r102088 r106108  
    3535class SVGImageBufferTools {
    3636    WTF_MAKE_NONCOPYABLE(SVGImageBufferTools);
     37
    3738public:
    38     static bool createImageBuffer(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
     39    static bool createImageBuffer(const FloatRect& paintRect, const AffineTransform& absoluteTransform, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
     40    // Patterns need a different float-to-integer coordinate mapping.
     41    static bool createImageBufferForPattern(const FloatRect& absoluteTargetRect, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&, ColorSpace, RenderingMode);
     42
    3943    static void renderSubtreeToImageBuffer(ImageBuffer*, RenderObject*, const AffineTransform&);
    40     static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& clampedAbsoluteTargetRect, OwnPtr<ImageBuffer>&);
     44    static void clipToImageBuffer(GraphicsContext*, const AffineTransform& absoluteTransform, const FloatRect& targetRect, OwnPtr<ImageBuffer>&);
    4145
    4246    static void calculateTransformationToOutermostSVGCoordinateSystem(const RenderObject*, AffineTransform& absoluteTransform);
     47    static IntSize clampedAbsoluteSize(const IntSize&);
    4348    static FloatRect clampedAbsoluteTargetRect(const FloatRect& absoluteTargetRect);
    44     static IntSize roundedImageBufferSize(const FloatSize&);
    4549    static void clear2DRotation(AffineTransform&);
     50
     51    static IntRect calculateImageBufferRect(const FloatRect& targetRect, const AffineTransform& absoluteTransform)
     52    {
     53        return enclosingIntRect(absoluteTransform.mapRect(targetRect));
     54    }
    4655
    4756private:
Note: See TracChangeset for help on using the changeset viewer.