Bug 1320036 - Part 2. Reftest.
There are two reftest
filter-region-01.html tests on filtered outer svg element. FF can not pass this
test without Part 2.
filter-region-02.html tests on filtered inner svg element, FF can pass this test
without Part 2. I add this in case we make a mistake in the future.
MozReview-Commit-ID: 1iwQWh0C7DH
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/filters/filter-region-01a.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<body style="background-color: lime;">
+<svg width="0" height="0">
+ <filter id="myFilter" filterUnits="objectBoundingBox" x="0" y="0" width="50%" height="50%">
+ <feMerge>
+ <feMergeNode/>
+ </feMerge>
+ </filter>
+</svg>
+
+<!-- This outer svg element should be totally covered by the next filtered outer svg element. -->
+<svg style="position: fixed;" x="0" y ="0" width="120" height="120">
+ <rect x="10" y="10" width="100" height="100" fill="red"/>
+</svg>
+
+<svg filter="url(#myFilter)" style="position: fixed;" x="0" y ="0" width="240" height="240">
+ <rect x="10" y="10" width="100" height="100" fill="lime"/>
+</svg>
+
+</body>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/filters/filter-region-01b.html
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<body style="background-color: lime;">
+<svg width="0" height="0">
+ <filter id="myFilter" filterUnits="objectBoundingBox" x="0" y="0" width="50%" height="50%">
+ <feMerge>
+ <feMergeNode/>
+ </feMerge>
+ </filter>
+</svg>
+
+<svg style="position: fixed;" x="0" y ="0" width="400" height="400">
+ <!-- This filtered inner element should be covered by the next outer svg element. -->
+ <svg filter="url(#myFilter)" style="position: fixed;" x="0" y ="0" width="200" height="200">
+ <rect x="10" y="10" width="120" height="120" fill="red"/>
+ </svg>
+</svg>
+
+<svg style="position: fixed;" x="0" y ="0" width="120" height="120">
+ <rect x="10" y="10" width="100" height="100" fill="lime"/>
+</svg>
+
+</body>
\ No newline at end of file
--- a/layout/reftests/svg/filters/reftest.list
+++ b/layout/reftests/svg/filters/reftest.list
@@ -78,16 +78,18 @@ fails == filter-marked-line-01.svg pass.
== filter-marked-line-06.svg pass.svg
== filter-marked-line-07.svg pass.svg
== filter-marked-line-08.svg pass.svg
== filter-marked-line-09.svg pass.svg
== filter-nested-filtering-01.svg pass.svg
== filter-nested-filtering-02.svg pass.svg
== filter-patterned-rect-01.svg pass.svg
== filter-patterned-rect-02.svg pass.svg
+== filter-region-01a.html pass.svg
+== filter-region-01b.html pass.svg
== feColorMatrix-saturate-01.svg pass.svg
== feComponentTransfer-03.svg pass.svg
== feComponentTransfer-04.svg pass.svg
== feComposite-arguments-01.svg pass.svg
fuzzy(1,26732) == feComposite-paint-01.svg feComposite-paint-01-ref.svg
fuzzy(1,10000) == feConvolveMatrix-bias-01.svg feConvolveMatrix-bias-01-ref.svg