Bug 1320036 - Part 2. Reftest. draft
authorcku <cku@mozilla.com>
Wed, 15 Mar 2017 18:39:00 +0800
changeset 499029 06b2ebbe1a820cfd1fc9228b6cde97250e410e75
parent 499028 95cf80425bbaad823a9c48cdb59b76e11cbe0674
child 549264 f08d55a23b6cbfe52273f507dfc2fe1b0c114f99
push id49319
push userbmo:cku@mozilla.com
push dateWed, 15 Mar 2017 10:59:57 +0000
bugs1320036
milestone55.0a1
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
layout/reftests/svg/filters/filter-region-01a.html
layout/reftests/svg/filters/filter-region-01b.html
layout/reftests/svg/filters/reftest.list
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