<feImage> has problems referencing local elements
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jan 2012 12:42:42 +0000 (12:42 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 23 Jan 2012 12:42:42 +0000 (12:42 +0000)
commitaa13bdb9511d30519fc949d473f946640543b0e2
tree8fe9cf2b04191ac2133fb01aa2631b975e65fcb9
parentf5150c8ab1afd71c9faf2fe2a3ce9b63818dbce1
<feImage> has problems referencing local elements
https://bugs.webkit.org/show_bug.cgi?id=76800

Reviewed by Zoltan Herczeg.

Source/WebCore:

<feImage> referencing local elements are currently rendered into an ImageBuffer
by SVGFEImageElement, using the local coordinates of the referenced renderer.

This approach is buggy and should be avoided, by moving the rendering fully
into SVGFEImage, which takes care of respecting the correct transformations.

This fixes <feImage> + local references, which currently breaks two tests in trunk.
Covered by existing tests.

* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion):
* svg/SVGFEImageElement.cpp:
(WebCore::SVGFEImageElement::build):
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::FEImage):
(WebCore::FEImage::createWithImage):
(WebCore::FEImage::createWithIRIReference):
(WebCore::FEImage::determineAbsolutePaintRect):
(WebCore::FEImage::referencedRenderer):
(WebCore::FEImage::platformApplySoftware):
(WebCore::FEImage::externalRepresentation):
* svg/graphics/filters/SVGFEImage.h:
(WebCore::FEImage::~FEImage):
* svg/graphics/filters/SVGFilter.h:
(WebCore::SVGFilter::absoluteTransform):

LayoutTests:

Update svg/filters/feImage-reference-* results, which are fixed now.

* platform/chromium/test_expectations.txt : Updated.
* platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png: Update for marginal change.
* svg/filters/feImage-reference-invalidation-expected.png:
* svg/filters/feImage-reference-svg-primitive-expected.png:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105612 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/svg/W3C-SVG-1.1/filters-composite-02-b-expected.png
LayoutTests/svg/filters/feImage-reference-invalidation-expected.png
LayoutTests/svg/filters/feImage-reference-svg-primitive-expected.png
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
Source/WebCore/svg/SVGFEImageElement.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.h
Source/WebCore/svg/graphics/filters/SVGFilter.h