<feImage> doesn't work with local references when using primitiveUnits="objectBoundin...
authorzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 13:54:21 +0000 (13:54 +0000)
committerzimmermann@webkit.org <zimmermann@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 13:54:21 +0000 (13:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77205

Reviewed by Antti Koivisto.

Source/WebCore:

Consider following testcase:
<svg width="1000" height="500">
<defs>
    <circle id="c" cx="50%" cy="50%" r="10%"/>
    <filter id="f" filterUnits="userSpaceOnUse" x="0" y="0" width="100" height="100" primitiveUnits="objectBoundingBox">
        <feImage xlink:href="#c"/>
    </filter>
</defs>
<rect width="100" height="100" filter="url(#f)"/>
</svg>

The <svg> has a viewport of 1000x50. The <circle> in the <defs> element is resolved as <circle cx="500" cy="250" r="79"/>,
as the context for this element (looking at it isolated!) is the viewport of the <svg>. We then setup a 0x0 - 100x100 rect
in user space, which gets filtered, by a filter, also defined in user space (for simplicity), but with primitiveUnits="objectBoundingBox".

That means that the default subregion of the filter effect <feImage/> which has no inputs, is defined in the SVG 1.1 spec to be equal to
the filter region, which is 0x0-100x100 in user space. This <feImage/> is supposed to produce a 100x100 image, containing a circle in the
middle (aka. <circle cx="50" cy="50".../>), but it doesn't, as the <circle> it's trying to paint, is laid out at 500x250, and thus outside
the 100x100 sized image buffer.

So how to resolve this?
The RenderSVGShape thats owned by the <circle> generates its Path value by calling cx().value(lengthContext) and the SVGLengthContext here
resolves to the <svg>. That happens on _layout_. If we would want to change the SVGLengthContext in this case (what I originally planned!)
to carry a custom 100x100 viewport, we'd need to relayout. Unfortunately this is not an option, as this would mean that
SVGImageBufferTools::renderSubtreeToImageBuffer, would need to relayout its children first, but we produce the filter images when painting.
This is very dangerous and has just recently been fixed so that SVGImageBufferTools can ASSERT(!item->needsLayout()) when painting the
subtree to an image buffer.

The only sane solution I see, that does not require relayouts, is to make a map between the <circle> bounding box in user space (500x250
center point) to the filter primitive subregion space (here: 100x100 center point), and concat that transformation before painting the
subtree to the image buffer. Of course this approach only works if all values of the <circle> are relative. If someone uses
<circle id="c" cx="50%" cy="666"> the transformation that I'm looking for is undefined. We'd really need to create a new Path here, to
resolve only cx against the new viewport, and not cy.

Though in practice it turns out this is not a problem. All use cases of feImage + primitiveUnits="objectBoundingBox" link to elements
that are completely defined in percentual values, as this is really the only thing which makes sense - otherwise you can always switch
back to primtiveUnits="userSpaceOnUse". Anyhow, I'm going to fix all known wild-life test cases by my approach, and say we don't support
using mixed length units when referencing those elements from feImages with primitiveUnits="objectBoundingBox".

Adding lots of new testcases, trying all the different feImage modes.

Tests: svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
       svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
       svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
       svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
       svg/filters/feImage-position.svg
       svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
       svg/filters/feImage-subregions-preseveAspectRatio-none.svg
       svg/filters/feImage-subregions.svg

* rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
(WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Reverse logic, simplifying the code a bit. Remove FEImage special cases (absoluteSubregion).
* svg/SVGLengthContext.h: Make determineViewport() public, for use in FEImage.
* svg/graphics/filters/SVGFEImage.cpp:
(WebCore::FEImage::determineAbsolutePaintRect): Don't apply preserveAspectRatio transformation for local elements, it's not defined and breaks content.
(WebCore::FEImage::platformApplySoftware): Figure out the absolute subregion by utilizing filterPrimitiveSubregion() as FETurbulence does.
                                           Map between filter primitive subregion and target object space for primitiveUnits="objectBoundingBox" support on SVG element references.
* svg/graphics/filters/SVGFEImage.h: Remove absoluteSubregion member & setter, it's no longer needed.

LayoutTests:

Add new test cases covering all combinations of filterUnits/primitiveUnits and <feImage>.

* platform/chromium/test_expectations.txt:
* platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png: Added.
* platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt: Added.
* platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png: Added.
* platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt: Added.
* platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png: Added.
* platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt: Added.
* platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png: Added.
* platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt: Added.
* platform/mac/svg/filters/feImage-position-expected.png: Added.
* platform/mac/svg/filters/feImage-position-expected.txt: Added.
* platform/mac/svg/filters/feImage-subregions-expected.png: Added.
* platform/mac/svg/filters/feImage-subregions-expected.txt: Added.
* platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png: Added.
* platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt: Added.
* platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png: Added.
* platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt: Added.
* svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg: Added.
* svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg: Added.
* svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg: Added.
* svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg: Added.
* svg/filters/feImage-position.svg: Added.
* svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg: Added.
* svg/filters/feImage-subregions-preseveAspectRatio-none.svg: Added.
* svg/filters/feImage-subregions.svg: Added.
* svg/filters/resources/green.png: Added.

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

32 files changed:
LayoutTests/ChangeLog
LayoutTests/platform/chromium/test_expectations.txt
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-position-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-position-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png [new file with mode: 0644]
LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt [new file with mode: 0644]
LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-position.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none.svg [new file with mode: 0644]
LayoutTests/svg/filters/feImage-subregions.svg [new file with mode: 0644]
LayoutTests/svg/filters/resources/green.png [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/rendering/svg/RenderSVGResourceFilterPrimitive.cpp
Source/WebCore/svg/SVGLengthContext.h
Source/WebCore/svg/graphics/filters/SVGFEImage.cpp
Source/WebCore/svg/graphics/filters/SVGFEImage.h

index e588092..1997aa5 100644 (file)
@@ -1,5 +1,41 @@
 2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
 
+        <feImage> doesn't work with local references when using primitiveUnits="objectBoundingBox"
+        https://bugs.webkit.org/show_bug.cgi?id=77205
+
+        Reviewed by Antti Koivisto.
+
+        Add new test cases covering all combinations of filterUnits/primitiveUnits and <feImage>.
+
+        * platform/chromium/test_expectations.txt:
+        * platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png: Added.
+        * platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-position-expected.png: Added.
+        * platform/mac/svg/filters/feImage-position-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-subregions-expected.png: Added.
+        * platform/mac/svg/filters/feImage-subregions-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png: Added.
+        * platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt: Added.
+        * platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png: Added.
+        * platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt: Added.
+        * svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg: Added.
+        * svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg: Added.
+        * svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg: Added.
+        * svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg: Added.
+        * svg/filters/feImage-position.svg: Added.
+        * svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg: Added.
+        * svg/filters/feImage-subregions-preseveAspectRatio-none.svg: Added.
+        * svg/filters/feImage-subregions.svg: Added.
+        * svg/filters/resources/green.png: Added.
+
+2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
+
         <feImage> DOM mutation problems
         https://bugs.webkit.org/show_bug.cgi?id=77198
 
index 41e6567..3d03493 100644 (file)
@@ -3965,6 +3965,14 @@ BUGWK77198 : svg/filters/feImage-target-add-to-document.svg = IMAGE
 BUGWK77198 : svg/filters/feImage-target-reappend-to-document.svg = IMAGE
 BUGWK77198 : svg/filters/feImage-target-changes-id.svg = IMAGE
 BUGWK77198 : svg/filters/feImage-target-id-change.svg = IMAGE
+BUGWK77205 : svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-position.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-subregions-preseveAspectRatio-none.svg = IMAGE+TEXT IMAGE
+BUGWK77205 : svg/filters/feImage-subregions.svg = IMAGE+TEXT IMAGE
 
 // Change error (misspelling) underlines from Windows look to Mac look.
 BUG_CARYCLARK MAC : editing/deleting/delete-3928305-fix.html = IMAGE
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png
new file mode 100644 (file)
index 0000000..3800efe
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox-expected.txt
new file mode 100644 (file)
index 0000000..111bc28
--- /dev/null
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x800
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 800x800
+  RenderSVGRoot {svg} at (0,0) size 370x370
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGPath {circle} at (200,200) size 400x400 [fill={[type=SOLID] [color=#008000]}] [cx=400.00] [cy=400.00] [r=200.00]
+      RenderSVGResourceFilter {filter} [id="filter1a-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1b-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2a-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2b-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+    RenderSVGContainer {g} at (0,0) size 350x200
+      RenderSVGRect {rect} at (49,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter1a-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (150,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (199,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (150,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+    RenderSVGContainer {g} at (0,130) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
+      RenderSVGRect {rect} at (39,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+      RenderSVGRect {rect} at (0,130) size 221x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,130) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (189,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+        RenderSVGRect {rect} at (130,130) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png
new file mode 100644 (file)
index 0000000..3371e25
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse-expected.txt
new file mode 100644 (file)
index 0000000..a8f121e
--- /dev/null
@@ -0,0 +1,55 @@
+layer at (0,0) size 800x800
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 800x800
+  RenderSVGRoot {svg} at (0,0) size 650x520
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGPath {circle} at (200,200) size 400x400 [fill={[type=SOLID] [color=#008000]}] [cx=400.00] [cy=400.00] [r=200.00]
+      RenderSVGPath {circle} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [cx=100.00] [cy=100.00] [r=50.00]
+      RenderSVGResourceFilter {filter} [id="filter1a-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1b-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2a-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2b-rel"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1a-abs"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter1b-abs"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2a-abs"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2b-abs"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGContainer {g} at (0,0) size 650x200
+      RenderSVGRect {rect} at (49,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter1a-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (150,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (199,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (150,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1a-abs"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (300,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,0.00)}]
+        RenderSVGRect {rect} at (349,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (300,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (450,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(450.00,0.00)}]
+        RenderSVGRect {rect} at (499,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (450,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-abs"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+    RenderSVGContainer {g} at (0,130) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
+      RenderSVGRect {rect} at (39,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+      RenderSVGRect {rect} at (0,130) size 221x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,130) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (189,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+        RenderSVGRect {rect} at (130,130) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+    RenderSVGContainer {g} at (0,280) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,300.00)}]
+      RenderSVGRect {rect} at (29,329) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=30.00] [y=30.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,280) size 221x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-abs"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,280) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (179,329) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=30.00] [y=30.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (130,280) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-abs"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png
new file mode 100644 (file)
index 0000000..3800efe
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox-expected.txt
new file mode 100644 (file)
index 0000000..c56246b
--- /dev/null
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x800
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 800x800
+  RenderSVGRoot {svg} at (0,0) size 370x370
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGPath {circle} at (200,200) size 400x400 [fill={[type=SOLID] [color=#008000]}] [cx=400.00] [cy=400.00] [r=200.00]
+      RenderSVGResourceFilter {filter} [id="filter1a-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1b-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2a-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2b-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=objectBoundingBox]
+        [feImage image-size="400x400"]
+    RenderSVGContainer {g} at (0,0) size 350x200
+      RenderSVGRect {rect} at (49,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter1a-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (150,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (199,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (150,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+    RenderSVGContainer {g} at (0,130) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
+      RenderSVGRect {rect} at (39,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+      RenderSVGRect {rect} at (0,130) size 220x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,130) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (189,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+        RenderSVGRect {rect} at (130,130) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png
new file mode 100644 (file)
index 0000000..3371e25
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse-expected.txt
new file mode 100644 (file)
index 0000000..ea52279
--- /dev/null
@@ -0,0 +1,55 @@
+layer at (0,0) size 800x800
+  RenderView at (0,0) size 785x585
+layer at (0,0) size 800x800
+  RenderSVGRoot {svg} at (0,0) size 650x520
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGPath {circle} at (200,200) size 400x400 [fill={[type=SOLID] [color=#008000]}] [cx=400.00] [cy=400.00] [r=200.00]
+      RenderSVGPath {circle} at (50,50) size 100x100 [fill={[type=SOLID] [color=#008000]}] [cx=100.00] [cy=100.00] [r=50.00]
+      RenderSVGResourceFilter {filter} [id="filter1a-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1b-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2a-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter2b-rel"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="400x400"]
+      RenderSVGResourceFilter {filter} [id="filter1a-abs"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter1b-abs"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2a-abs"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2b-abs"] [filterUnits=userSpaceOnUse] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGContainer {g} at (0,0) size 650x200
+      RenderSVGRect {rect} at (49,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter1a-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (150,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (199,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (150,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1a-abs"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (300,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(300.00,0.00)}]
+        RenderSVGRect {rect} at (349,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (300,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-rel"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+      RenderSVGContainer {g} at (450,0) size 200x200 [transform={m=((1.00,0.00)(0.00,1.00)) t=(450.00,0.00)}]
+        RenderSVGRect {rect} at (499,49) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=50.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (450,0) size 200x200 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter1b-abs"] RenderSVGResourceFilter {filter} at (0,0) size 200x200
+    RenderSVGContainer {g} at (0,130) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,150.00)}]
+      RenderSVGRect {rect} at (39,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+      RenderSVGRect {rect} at (0,130) size 220x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,130) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (189,189) size 122x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=40.00] [y=40.00] [width=120.00] [height=120.00]
+        RenderSVGRect {rect} at (130,130) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-rel"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+    RenderSVGContainer {g} at (0,280) size 370x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,300.00)}]
+      RenderSVGRect {rect} at (29,329) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=30.00] [y=30.00] [width=100.00] [height=100.00]
+      RenderSVGRect {rect} at (0,280) size 220x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+        [filter="filter2a-abs"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
+      RenderSVGContainer {g} at (130,280) size 240x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,0.00)}]
+        RenderSVGRect {rect} at (179,329) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=30.00] [y=30.00] [width=100.00] [height=100.00]
+        RenderSVGRect {rect} at (130,280) size 240x240 [fill={[type=SOLID] [color=#FF0000]}] [x=0.00] [y=0.00] [width=200.00] [height=200.00]
+          [filter="filter2b-abs"] RenderSVGResourceFilter {filter} at (-20,-20) size 240x240
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-position-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-position-expected.png
new file mode 100644 (file)
index 0000000..b6da2f3
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-position-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-position-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-position-expected.txt
new file mode 100644 (file)
index 0000000..ce80d46
--- /dev/null
@@ -0,0 +1,10 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (0,0) size 441x221
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+      RenderSVGResourceFilter {filter} [id="filter"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGRect {rect} at (0,0) size 441x221 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+      [filter="filter"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.png
new file mode 100644 (file)
index 0000000..c674a25
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-subregions-expected.txt
new file mode 100644 (file)
index 0000000..8f9f4ac
--- /dev/null
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (9,0) size 582x481
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+      RenderSVGResourceFilter {filter} [id="filter1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGContainer {g} at (10,0) size 481x480 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,10.00)}]
+      RenderSVGRect {rect} at (10,0) size 481x231 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter1"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (10,240) size 481x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (10,240) size 481x240 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter2"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGContainer {g} at (110,0) size 480x480 [transform={m=((1.00,0.00)(0.00,1.00)) t=(150.00,10.00)}]
+      RenderSVGRect {rect} at (110,0) size 480x231 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter3"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (110,240) size 480x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (110,240) size 480x240 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter4"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGRect {rect} at (49,9) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=10.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (9,239) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=10.00] [y=240.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (249,9) size 342x222 [stroke={[type=SOLID] [color=#FF0000]}] [x=250.00] [y=10.00] [width=340.00] [height=220.00]
+    RenderSVGRect {rect} at (229,239) size 242x242 [stroke={[type=SOLID] [color=#FF0000]}] [x=230.00] [y=240.00] [width=240.00] [height=240.00]
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png
new file mode 100644 (file)
index 0000000..d382d7a
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-expected.txt
new file mode 100644 (file)
index 0000000..a1fd043
--- /dev/null
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderSVGRoot {svg} at (9,0) size 682x481
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGRect {rect} at (0,0) size 100x100 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+      RenderSVGResourceFilter {filter} [id="filter1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGContainer {g} at (10,0) size 481x480 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,10.00)}]
+      RenderSVGRect {rect} at (10,0) size 481x231 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter1"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (10,240) size 481x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (10,240) size 481x240 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter2"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGContainer {g} at (210,0) size 480x480 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,10.00)}]
+      RenderSVGRect {rect} at (210,0) size 480x231 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter3"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (210,240) size 480x240 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (210,240) size 480x240 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter4"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGRect {rect} at (49,9) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=10.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (9,239) size 102x102 [stroke={[type=SOLID] [color=#FF0000]}] [x=10.00] [y=240.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (249,9) size 442x222 [stroke={[type=SOLID] [color=#FF0000]}] [x=250.00] [y=10.00] [width=440.00] [height=220.00]
+    RenderSVGRect {rect} at (209,239) size 482x242 [stroke={[type=SOLID] [color=#FF0000]}] [x=210.00] [y=240.00] [width=480.00] [height=240.00]
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png
new file mode 100644 (file)
index 0000000..2f8a200
Binary files /dev/null and b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.png differ
diff --git a/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt b/LayoutTests/platform/mac/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox-expected.txt
new file mode 100644 (file)
index 0000000..608d778
--- /dev/null
@@ -0,0 +1,30 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 400x500
+  RenderSVGRoot {svg} at (4,95) size 342x246
+    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
+      RenderSVGRect {rect} at (0,100) size 50x50 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=100.00] [height=100.00]
+      RenderSVGResourceFilter {filter} [id="filter1"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter2"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter3"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+      RenderSVGResourceFilter {filter} [id="filter4"] [filterUnits=objectBoundingBox] [primitiveUnits=userSpaceOnUse]
+        [feImage image-size="100x100"]
+    RenderSVGContainer {g} at (5,95) size 241x245 [transform={m=((1.00,0.00)(0.00,1.00)) t=(50.00,10.00)}]
+      RenderSVGRect {rect} at (5,95) size 241x120 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter1"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (5,220) size 241x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (5,220) size 241x120 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter2"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGContainer {g} at (105,95) size 240x245 [transform={m=((1.00,0.00)(0.00,1.00)) t=(250.00,10.00)}]
+      RenderSVGRect {rect} at (105,95) size 240x120 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+        [filter="filter3"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+      RenderSVGContainer {g} at (105,220) size 240x120 [transform={m=((1.00,0.00)(0.00,1.00)) t=(0.00,250.00)}]
+        RenderSVGRect {rect} at (105,220) size 240x120 [fill={[type=SOLID] [color=#008000]}] [x=0.00] [y=0.00] [width=400.00] [height=200.00]
+          [filter="filter4"] RenderSVGResourceFilter {filter} at (-40,-20) size 480x240
+    RenderSVGRect {rect} at (24,104) size 52x52 [stroke={[type=SOLID] [color=#FF0000]}] [x=50.00] [y=10.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (4,219) size 52x52 [stroke={[type=SOLID] [color=#FF0000]}] [x=10.00] [y=240.00] [width=100.00] [height=100.00]
+    RenderSVGRect {rect} at (124,104) size 222x112 [stroke={[type=SOLID] [color=#FF0000]}] [x=250.00] [y=10.00] [width=440.00] [height=220.00]
+    RenderSVGRect {rect} at (104,219) size 242x122 [stroke={[type=SOLID] [color=#FF0000]}] [x=210.00] [y=240.00] [width=480.00] [height=240.00]
diff --git a/LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg b/LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
new file mode 100644 (file)
index 0000000..716cbfd
--- /dev/null
@@ -0,0 +1,54 @@
+<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Each green rect needs to be fully enclosed in the red frame rect</title>
+<circle id="circle-rel" cx="50%" cy="50%" r="25%" fill="green"/>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-rel" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-rel" primitiveUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against objectBoundingBox as well -->
+    <feImage x="0%" y="0%" width="100%" height="100%" xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-rel" primitiveUnits="objectBoundingBox">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-rel" primitiveUnits="objectBoundingBox">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-rel.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=120%, x/y=-10%) -->
+    <feImage x="-10%" y="-10%" width="120%" height="120%" xlink:href="#circle-rel" />
+</filter>
+</defs>
+
+<g>
+    <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter1a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-rel)"/>
+    </g>
+
+</g>
+
+<g transform="translate(0, 150)">
+    <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-rel)"/>
+    </g>
+</g>
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg b/LayoutTests/svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
new file mode 100644 (file)
index 0000000..621c70f
--- /dev/null
@@ -0,0 +1,105 @@
+<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Each green rect needs to be fully enclosed in the red frame rect</title>
+<circle id="circle-rel" cx="50%" cy="50%" r="25%" fill="green"/>
+<circle id="circle-abs" cx="100" cy="100" r="50" fill="green"/>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-rel" x="0" y="0" width="1" height="1">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-rel" x="0" y="0" width="1" height="1">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter1a-rel.
+         We need following result values: x=0, y=0. width=200, height=200 (that is 25% in percentages!) -->
+    <feImage x="0%" y="0%" width="25%" height="25%" xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-rel">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-rel">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-rel.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=30%, x/y=-2.5%) -->
+    <feImage x="-2.5%" y="-2.5%" width="30%" height="30%" xlink:href="#circle-rel" />
+</filter>
+
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-abs" x="0" y="0" width="1" height="1">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-abs" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-abs" x="0" y="0" width="1" height="1">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter1a-abs.
+         We need following result values: x=0, y=0. width=200, height=200 (that is 25% in percentages!) -->
+    <feImage x="0%" y="0%" width="25%" height="25%" xlink:href="#circle-abs" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-abs">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-abs" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-abs">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-abs.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=30%, x/y=-2.5%) -->
+    <feImage x="-2.5%" y="-2.5%" width="30%" height="30%" xlink:href="#circle-abs" />
+</filter>
+</defs>
+
+<g>
+    <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter1a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1a-abs)"/>
+    </g>
+
+    <g transform="translate(300, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-rel)"/>
+    </g>
+
+    <g transform="translate(450, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-abs)"/>
+    </g>
+</g>
+
+<g transform="translate(0, 150)">
+    <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-rel)"/>
+    </g>
+</g>
+
+<g transform="translate(0, 300)">
+    <rect x="30" y="30" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-abs)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="30" y="30" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-abs)"/>
+    </g>
+</g>
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg b/LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
new file mode 100644 (file)
index 0000000..a8b6fdc
--- /dev/null
@@ -0,0 +1,54 @@
+<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Each green rect needs to be fully enclosed in the red frame rect</title>
+<circle id="circle-rel" cx="50%" cy="50%" r="25%" fill="green"/>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-rel" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-rel" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against objectBoundingBox as well -->
+    <feImage x="0%" y="0%" width="100%" height="100%" xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-rel" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-rel" primitiveUnits="objectBoundingBox" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-rel.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=120%, x/y=-10%) -->
+    <feImage x="-10%" y="-10%" width="120%" height="120%" xlink:href="#circle-rel" />
+</filter>
+</defs>
+
+<g>
+    <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter1a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-rel)"/>
+    </g>
+
+</g>
+
+<g transform="translate(0, 150)">
+    <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-rel)"/>
+    </g>
+</g>
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg b/LayoutTests/svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
new file mode 100644 (file)
index 0000000..4a99371
--- /dev/null
@@ -0,0 +1,105 @@
+<svg width="800" height="800" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Each green rect needs to be fully enclosed in the red frame rect</title>
+<circle id="circle-rel" cx="50%" cy="50%" r="25%" fill="green"/>
+<circle id="circle-abs" cx="100" cy="100" r="50" fill="green"/>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-rel" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-rel" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter1a-rel.
+         We need following result values: x=0, y=0. width=200, height=200 (that is 25% in percentages!) -->
+    <feImage x="0%" y="0%" width="25%" height="25%" xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-rel" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-rel" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-rel" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-rel.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=30%, x/y=-2.5%) -->
+    <feImage x="-2.5%" y="-2.5%" width="30%" height="30%" xlink:href="#circle-rel" />
+</filter>
+
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1a-abs" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-abs" />
+</filter>
+
+<!-- Filter region at 0%, 0%, 100% x 100% of target bounding box: x=0, y=0, w=200, h=200 -->
+<filter id="filter1b-abs" filterUnits="userSpaceOnUse" x="0" y="0" width="200" height="200">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter1a-abs.
+         We need following result values: x=0, y=0. width=200, height=200 (that is 25% in percentages!) -->
+    <feImage x="0%" y="0%" width="25%" height="25%" xlink:href="#circle-abs" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2a-abs" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion == default filter region -->
+    <feImage xlink:href="#circle-abs" />
+</filter>
+
+<!-- Default filter region at -10%, -10% x 120% x 120% of target bounding box: x=-20, y=-20, w=240, h=240 -->
+<filter id="filter2b-abs" filterUnits="userSpaceOnUse" x="-20" y="-20" width="240" height="240">
+    <!-- Default effect subregion != default filter region, as the length values below are resolved against the 800x800 viewport! -->
+    <!-- So simply using x="0%" y="0%" width="100%" height="100%" is wrong, if you want to get the same effect as filter2a-abs.
+         We need following result values: x=-20, y=-20. width=240, height=240 (that is w/h=30%, x/y=-2.5%) -->
+    <feImage x="-2.5%" y="-2.5%" width="30%" height="30%" xlink:href="#circle-abs" />
+</filter>
+</defs>
+
+<g>
+    <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter1a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1a-abs)"/>
+    </g>
+
+    <g transform="translate(300, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-rel)"/>
+    </g>
+
+    <g transform="translate(450, 0)">
+        <rect x="50" y="50" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter1b-abs)"/>
+    </g>
+</g>
+
+<g transform="translate(0, 150)">
+    <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-rel)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="40" y="40" width="120" height="120" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-rel)"/>
+    </g>
+</g>
+
+<g transform="translate(0, 300)">
+    <rect x="30" y="30" width="100" height="100" fill="none" stroke="red"/>
+    <rect width="200" height="200" fill="red" filter="url(#filter2a-abs)"/>
+
+    <g transform="translate(150, 0)">
+        <rect x="30" y="30" width="100" height="100" fill="none" stroke="red"/>
+        <rect width="200" height="200" fill="red" filter="url(#filter2b-abs)"/>
+    </g>
+</g>
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-position.svg b/LayoutTests/svg/filters/feImage-position.svg
new file mode 100644 (file)
index 0000000..c466f24
--- /dev/null
@@ -0,0 +1,11 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Filtered rectangle should be at position 0x0</title>
+<rect id="rect"  width="100" height="100" fill="green"/>
+<filter id="filter" >
+    <feImage x="0%" y="0%" width="100%" height="100%" xlink:href="#rect"/>
+</filter>
+</defs>
+<rect width="400" height="200" fill="green" filter="url(#filter)"/>
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg b/LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
new file mode 100644 (file)
index 0000000..1739081
--- /dev/null
@@ -0,0 +1,43 @@
+<svg viewBox="0 0 800 600" width="400" height="500" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Green rectangles should be within the red frames</title>
+<rect id="rect"  width="100" height="100" fill="green"/>
+
+<filter id="filter1" >
+    <feImage preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" xlink:href="#rect"/>
+</filter>
+
+<filter id="filter2" >
+    <feImage preserveAspectRatio="none" xlink:href="#rect"/>
+</filter>
+
+<filter id="filter3" >
+    <feImage preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" xlink:href="resources/green.png"/>
+</filter>
+
+<filter id="filter4" >
+    <feImage preserveAspectRatio="none" xlink:href="resources/green.png"/>
+</filter>
+</defs>
+
+<g transform="translate(50, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter1)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter2)"/>
+</g>
+</g>
+
+<g transform="translate(250, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter3)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter4)"/>
+</g>
+</g>
+
+<rect fill="none" stroke="red" x="50" y="10" width="100" height="100"/>
+<rect fill="none" stroke="red" x="10" y="240" width="100" height="100"/>
+<rect fill="none" stroke="red" x="250" y="10" width="440" height="220"/>
+<rect fill="none" stroke="red" x="210" y="240" width="480" height="240"/>
+
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none.svg b/LayoutTests/svg/filters/feImage-subregions-preseveAspectRatio-none.svg
new file mode 100644 (file)
index 0000000..ef642fc
--- /dev/null
@@ -0,0 +1,43 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Green rectangles should be within the red frames</title>
+<rect id="rect"  width="100" height="100" fill="green"/>
+
+<filter id="filter1" >
+    <feImage preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" xlink:href="#rect"/>
+</filter>
+
+<filter id="filter2" >
+    <feImage preserveAspectRatio="none" xlink:href="#rect"/>
+</filter>
+
+<filter id="filter3" >
+    <feImage preserveAspectRatio="none" x="0%" y="0%" width="100%" height="100%" xlink:href="resources/green.png"/>
+</filter>
+
+<filter id="filter4" >
+    <feImage preserveAspectRatio="none" xlink:href="resources/green.png"/>
+</filter>
+</defs>
+
+<g transform="translate(50, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter1)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter2)"/>
+</g>
+</g>
+
+<g transform="translate(250, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter3)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter4)"/>
+</g>
+</g>
+
+<rect fill="none" stroke="red" x="50" y="10" width="100" height="100"/>
+<rect fill="none" stroke="red" x="10" y="240" width="100" height="100"/>
+<rect fill="none" stroke="red" x="250" y="10" width="440" height="220"/>
+<rect fill="none" stroke="red" x="210" y="240" width="480" height="240"/>
+
+</svg>
+
diff --git a/LayoutTests/svg/filters/feImage-subregions.svg b/LayoutTests/svg/filters/feImage-subregions.svg
new file mode 100644 (file)
index 0000000..492b968
--- /dev/null
@@ -0,0 +1,43 @@
+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<defs>
+<title>Green rectangles should be within the red frames</title>
+<rect id="rect"  width="100" height="100" fill="green"/>
+
+<filter id="filter1" >
+    <feImage x="0%" y="0%" width="100%" height="100%" xlink:href="#rect"/>
+</filter>
+
+<filter id="filter2" >
+    <feImage xlink:href="#rect"/>
+</filter>
+
+<filter id="filter3" >
+    <feImage x="0%" y="0%" width="100%" height="100%" xlink:href="resources/green.png"/>
+</filter>
+
+<filter id="filter4" >
+    <feImage xlink:href="resources/green.png"/>
+</filter>
+</defs>
+
+<g transform="translate(50, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter1)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter2)"/>
+</g>
+</g>
+
+<g transform="translate(150, 10)">
+<rect width="400" height="200" fill="green" filter="url(#filter3)"/>
+<g transform="translate(0, 250)">
+<rect width="400" height="200" fill="green" filter="url(#filter4)"/>
+</g>
+</g>
+
+<rect fill="none" stroke="red" x="50" y="10" width="100" height="100"/>
+<rect fill="none" stroke="red" x="10" y="240" width="100" height="100"/>
+<rect fill="none" stroke="red" x="250" y="10" width="340" height="220"/>
+<rect fill="none" stroke="red" x="230" y="240" width="240" height="240"/>
+
+</svg>
+
diff --git a/LayoutTests/svg/filters/resources/green.png b/LayoutTests/svg/filters/resources/green.png
new file mode 100644 (file)
index 0000000..09f6705
Binary files /dev/null and b/LayoutTests/svg/filters/resources/green.png differ
index 64baf19..115109f 100644 (file)
@@ -1,3 +1,69 @@
+2012-01-27  Nikolas Zimmermann  <nzimmermann@rim.com>
+
+        <feImage> doesn't work with local references when using primitiveUnits="objectBoundingBox"
+        https://bugs.webkit.org/show_bug.cgi?id=77205
+
+        Reviewed by Antti Koivisto.
+
+        Consider following testcase:
+        <svg width="1000" height="500">
+        <defs>
+            <circle id="c" cx="50%" cy="50%" r="10%"/>
+            <filter id="f" filterUnits="userSpaceOnUse" x="0" y="0" width="100" height="100" primitiveUnits="objectBoundingBox">
+                <feImage xlink:href="#c"/>
+            </filter>
+        </defs>
+        <rect width="100" height="100" filter="url(#f)"/>
+        </svg>
+
+        The <svg> has a viewport of 1000x50. The <circle> in the <defs> element is resolved as <circle cx="500" cy="250" r="79"/>,
+        as the context for this element (looking at it isolated!) is the viewport of the <svg>. We then setup a 0x0 - 100x100 rect
+        in user space, which gets filtered, by a filter, also defined in user space (for simplicity), but with primitiveUnits="objectBoundingBox".
+
+        That means that the default subregion of the filter effect <feImage/> which has no inputs, is defined in the SVG 1.1 spec to be equal to
+        the filter region, which is 0x0-100x100 in user space. This <feImage/> is supposed to produce a 100x100 image, containing a circle in the
+        middle (aka. <circle cx="50" cy="50".../>), but it doesn't, as the <circle> it's trying to paint, is laid out at 500x250, and thus outside
+        the 100x100 sized image buffer.
+
+        So how to resolve this?
+        The RenderSVGShape thats owned by the <circle> generates its Path value by calling cx().value(lengthContext) and the SVGLengthContext here
+        resolves to the <svg>. That happens on _layout_. If we would want to change the SVGLengthContext in this case (what I originally planned!)
+        to carry a custom 100x100 viewport, we'd need to relayout. Unfortunately this is not an option, as this would mean that
+        SVGImageBufferTools::renderSubtreeToImageBuffer, would need to relayout its children first, but we produce the filter images when painting.
+        This is very dangerous and has just recently been fixed so that SVGImageBufferTools can ASSERT(!item->needsLayout()) when painting the
+        subtree to an image buffer.
+
+        The only sane solution I see, that does not require relayouts, is to make a map between the <circle> bounding box in user space (500x250
+        center point) to the filter primitive subregion space (here: 100x100 center point), and concat that transformation before painting the
+        subtree to the image buffer. Of course this approach only works if all values of the <circle> are relative. If someone uses
+        <circle id="c" cx="50%" cy="666"> the transformation that I'm looking for is undefined. We'd really need to create a new Path here, to
+        resolve only cx against the new viewport, and not cy.
+
+        Though in practice it turns out this is not a problem. All use cases of feImage + primitiveUnits="objectBoundingBox" link to elements
+        that are completely defined in percentual values, as this is really the only thing which makes sense - otherwise you can always switch
+        back to primtiveUnits="userSpaceOnUse". Anyhow, I'm going to fix all known wild-life test cases by my approach, and say we don't support
+        using mixed length units when referencing those elements from feImages with primitiveUnits="objectBoundingBox".
+
+        Adding lots of new testcases, trying all the different feImage modes.
+
+        Tests: svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-objectBoundingBox.svg
+               svg/filters/feImage-filterUnits-objectBoundingBox-primitiveUnits-userSpaceOnUse.svg
+               svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-objectBoundingBox.svg
+               svg/filters/feImage-filterUnits-userSpaceOnUse-primitiveUnits-userSpaceOnUse.svg
+               svg/filters/feImage-position.svg
+               svg/filters/feImage-subregions-preseveAspectRatio-none-with-viewBox.svg
+               svg/filters/feImage-subregions-preseveAspectRatio-none.svg
+               svg/filters/feImage-subregions.svg
+
+        * rendering/svg/RenderSVGResourceFilterPrimitive.cpp:
+        (WebCore::RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion): Reverse logic, simplifying the code a bit. Remove FEImage special cases (absoluteSubregion).
+        * svg/SVGLengthContext.h: Make determineViewport() public, for use in FEImage.
+        * svg/graphics/filters/SVGFEImage.cpp:
+        (WebCore::FEImage::determineAbsolutePaintRect): Don't apply preserveAspectRatio transformation for local elements, it's not defined and breaks content.
+        (WebCore::FEImage::platformApplySoftware): Figure out the absolute subregion by utilizing filterPrimitiveSubregion() as FETurbulence does.
+                                                   Map between filter primitive subregion and target object space for primitiveUnits="objectBoundingBox" support on SVG element references.
+        * svg/graphics/filters/SVGFEImage.h: Remove absoluteSubregion member & setter, it's no longer needed.
+
 2012-01-26  Vsevolod Vlasov  <vsevik@chromium.org>
 
         Web Inspector: Scripts panel: fix event dispatching between FileSelector and EditorContainer.
index 183140b..f3da929 100644 (file)
@@ -64,42 +64,38 @@ void RenderSVGResourceFilterPrimitive::styleDidChange(StyleDifference diff, cons
 
 FloatRect RenderSVGResourceFilterPrimitive::determineFilterPrimitiveSubregion(FilterEffect* effect)
 {
-    FloatRect uniteRect;
-    FloatRect subregion = effect->effectBoundaries();
     SVGFilter* filter = static_cast<SVGFilter*>(effect->filter());
     ASSERT(filter);
 
-    if (effect->filterEffectType() != FilterEffectTypeTile) {
-        // FETurbulence, FEImage and FEFlood don't have input effects, take the filter region as unite rect.
-        if (unsigned numberOfInputEffects = effect->inputEffects().size()) {
-            for (unsigned i = 0; i < numberOfInputEffects; ++i)
-                uniteRect.unite(determineFilterPrimitiveSubregion(effect->inputEffect(i)));
-        } else
-            uniteRect = filter->filterRegionInUserSpace();
-    } else {
-        determineFilterPrimitiveSubregion(effect->inputEffect(0));
-        uniteRect = filter->filterRegionInUserSpace();
-    }
+    // FETile, FETurbulence, FEFlood don't have input effects, take the filter region as unite rect.
+    FloatRect subregion;
+    if (unsigned numberOfInputEffects = effect->inputEffects().size()) {
+        subregion = determineFilterPrimitiveSubregion(effect->inputEffect(0));
+        for (unsigned i = 1; i < numberOfInputEffects; ++i)
+            subregion.unite(determineFilterPrimitiveSubregion(effect->inputEffect(i)));
+    } else
+        subregion = filter->filterRegionInUserSpace();
+
+    // After calling determineFilterPrimitiveSubregion on the target effect, reset the subregion again for <feTile>.
+    if (effect->filterEffectType() == FilterEffectTypeTile)
+        subregion = filter->filterRegionInUserSpace();
+
+    FloatRect effectBoundaries = effect->effectBoundaries();
+    if (effect->hasX())
+        subregion.setX(effectBoundaries.x());
+    if (effect->hasY())
+        subregion.setY(effectBoundaries.y());
+    if (effect->hasWidth())
+        subregion.setWidth(effectBoundaries.width());
+    if (effect->hasHeight())
+        subregion.setHeight(effectBoundaries.height());
 
-    if (!effect->hasX())
-        subregion.setX(uniteRect.x());
-    if (!effect->hasY())
-        subregion.setY(uniteRect.y());
-    if (!effect->hasWidth())
-        subregion.setWidth(uniteRect.width());
-    if (!effect->hasHeight())
-        subregion.setHeight(uniteRect.height());
     effect->setFilterPrimitiveSubregion(subregion);
 
     FloatRect absoluteSubregion = filter->absoluteTransform().mapRect(subregion);
     FloatSize filterResolution = filter->filterResolution();
     absoluteSubregion.scale(filterResolution.width(), filterResolution.height());
 
-    // FEImage needs the unclipped subregion in absolute coordinates to determine the correct
-    // destination rect in combination with preserveAspectRatio.
-    if (effect->filterEffectType() == FilterEffectTypeImage)
-        static_cast<FEImage*>(effect)->setAbsoluteSubregion(absoluteSubregion);
-
     // Clip every filter effect to the filter region.
     FloatRect absoluteScaledFilterRegion = filter->filterRegion();
     absoluteScaledFilterRegion.scale(filterResolution.width(), filterResolution.height());
index 28ff030..f350a7d 100644 (file)
@@ -68,6 +68,8 @@ public:
     float convertValueToUserUnits(float, SVGLengthMode, SVGLengthType fromUnit, ExceptionCode&) const;
     float convertValueFromUserUnits(float, SVGLengthMode, SVGLengthType toUnit, ExceptionCode&) const;
 
+    bool determineViewport(float& width, float& height) const;
+
 private:
     SVGLengthContext(const SVGElement*, const FloatRect& viewport);
 
@@ -80,8 +82,6 @@ private:
     float convertValueFromUserUnitsToEXS(float value, ExceptionCode&) const;
     float convertValueFromEXSToUserUnits(float value, ExceptionCode&) const;
 
-    bool determineViewport(float& width, float& height) const;
-
     const SVGElement* m_context;
     FloatRect m_overridenViewport;
 };
index fa86cd0..439c66a 100644 (file)
@@ -33,6 +33,7 @@
 #include "SVGFilter.h"
 #include "SVGImageBufferTools.h"
 #include "SVGPreserveAspectRatio.h"
+#include "SVGStyledElement.h"
 #include "SVGURIReference.h"
 #include "TextStream.h"
 
@@ -66,14 +67,16 @@ PassRefPtr<FEImage> FEImage::createWithIRIReference(Filter* filter, Document* do
 
 void FEImage::determineAbsolutePaintRect()
 {
+    SVGFilter* svgFilter = static_cast<SVGFilter*>(filter());
+
+    FloatRect paintRect = svgFilter->absoluteTransform().mapRect(filterPrimitiveSubregion());
     FloatRect srcRect;
-    if (m_image)
+    if (m_image) {
         srcRect.setSize(m_image->size());
-    else if (RenderObject* renderer = referencedRenderer())
-        srcRect = static_cast<SVGFilter*>(filter())->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
+        m_preserveAspectRatio.transformRect(paintRect, srcRect);
+    } else if (RenderObject* renderer = referencedRenderer())
+        srcRect = svgFilter->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
 
-    FloatRect paintRect(m_absoluteSubregion);
-    m_preserveAspectRatio.transformRect(paintRect, srcRect);
     if (clipsToBounds())
         paintRect.intersect(maxEffectRect());
     else
@@ -101,24 +104,41 @@ void FEImage::platformApplySoftware()
     if (!resultImage)
         return;
 
+    SVGFilter* svgFilter = static_cast<SVGFilter*>(filter());
+    FloatRect destRect = svgFilter->absoluteTransform().mapRect(filterPrimitiveSubregion());
+
+    FloatRect srcRect;
+    if (renderer)
+        srcRect = svgFilter->absoluteTransform().mapRect(renderer->repaintRectInLocalCoordinates());
+    else {
+        srcRect = FloatRect(FloatPoint(), m_image->size());
+        m_preserveAspectRatio.transformRect(destRect, srcRect);
+    }
+
+    IntPoint paintLocation = absolutePaintRect().location();
+    destRect.move(-paintLocation.x(), -paintLocation.y());
+
     if (renderer) {
-        const AffineTransform& absoluteTransform = static_cast<SVGFilter*>(filter())->absoluteTransform();
+        const AffineTransform& absoluteTransform = svgFilter->absoluteTransform();
         resultImage->context()->concatCTM(absoluteTransform);
 
+        SVGElement* contextNode = static_cast<SVGElement*>(renderer->node());
+        if (contextNode->isStyled() && static_cast<SVGStyledElement*>(contextNode)->hasRelativeLengths()) {
+            SVGLengthContext lengthContext(contextNode);
+            float width = 0;
+            float height = 0;
+
+            // If we're referencing an element with percentage units, eg. <rect with="30%"> those values were resolved against the viewport.
+            // Build up a transformation that maps from the viewport space to the filter primitive subregion.
+            if (lengthContext.determineViewport(width, height))
+                resultImage->context()->concatCTM(makeMapBetweenRects(FloatRect(0, 0, width, height), destRect));
+        }
+
         AffineTransform contentTransformation;
         SVGImageBufferTools::renderSubtreeToImageBuffer(resultImage, renderer, contentTransformation);
-
-        resultImage->context()->concatCTM(absoluteTransform.inverse());
         return;
     }
 
-    FloatRect srcRect(FloatPoint(), m_image->size());
-    FloatRect destRect(m_absoluteSubregion);
-    m_preserveAspectRatio.transformRect(destRect, srcRect);
-
-    IntPoint paintLocation = absolutePaintRect().location();
-    destRect.move(-paintLocation.x(), -paintLocation.y());
-
     resultImage->context()->drawImage(m_image.get(), ColorSpaceDeviceRGB, destRect, srcRect);
 }
 
index 53ef0e1..5bad950 100644 (file)
@@ -38,8 +38,6 @@ public:
     static PassRefPtr<FEImage> createWithImage(Filter*, PassRefPtr<Image>, const SVGPreserveAspectRatio&);
     static PassRefPtr<FEImage> createWithIRIReference(Filter*, Document*, const String&, const SVGPreserveAspectRatio&);
 
-    void setAbsoluteSubregion(const FloatRect& absoluteSubregion) { m_absoluteSubregion = absoluteSubregion; }
-
     virtual void platformApplySoftware();
     virtual void dump();
 
@@ -59,7 +57,6 @@ private:
     Document* m_document;
     String m_href;
     SVGPreserveAspectRatio m_preserveAspectRatio;
-    FloatRect m_absoluteSubregion;
 };
 
 } // namespace WebCore