Bug 852100 - Part 2. A test case for varifying pixel snap with svg filter. draft
authorcku <cku@mozilla.com>
Wed, 16 Aug 2017 00:16:30 +0800
changeset 646651 779b700096e8308b94070f79bb01eb1d27754826
parent 646650 b657869877b663658453a7fd39248527253a0606
child 726314 3f9d9264755ab00355cd88ff3c4d7b91c7e6050c
push id74196
push userbmo:cku@mozilla.com
push dateTue, 15 Aug 2017 16:17:22 +0000
bugs852100
milestone57.0a1
Bug 852100 - Part 2. A test case for varifying pixel snap with svg filter. MozReview-Commit-ID: 67QnlEYYTBl
layout/reftests/svg/svg-integration/filter-pixel-snap-ref.xhtml
layout/reftests/svg/svg-integration/filter-pixel-snap.xhtml
layout/reftests/svg/svg-integration/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/filter-pixel-snap-ref.xhtml
@@ -0,0 +1,29 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body>
+<div style="position:absolute;left:10.5px;top:10.5px;">
+  <svg  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 100" width="800" height="100">
+    <defs>
+      <filter x="8" y="8" width="400" height="40" id="shift" filterUnits="userSpaceOnUse">
+        <feOffset dx="0" dy="0"/>
+      </filter>
+
+      <g id="shape">
+        <rect x="10" y="10" width ="60" height="20" stroke="green" stroke-width="1" fill="lightgreen"/>
+      </g>
+    </defs>
+    <g>
+      <use xlink:href="#shape"/>
+      <g transform="translate(100 0)">
+        <use xlink:href="#shape"/>
+      </g>
+    </g>
+  </svg>
+</div>
+</body>
+</html>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/filter-pixel-snap.xhtml
@@ -0,0 +1,29 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html xmlns="http://www.w3.org/1999/xhtml"
+     xmlns:svg="http://www.w3.org/2000/svg"
+     xmlns:xlink="http://www.w3.org/1999/xlink">
+<body>
+<div style="position:absolute;left:10.5px;top:10.5px;">
+  <svg  xmlns="http://www.w3.org/2000/svg" viewBox="0 0 800 100" width="800" height="100">
+    <defs>
+      <filter x="8" y="8" width="400" height="40" id="shift" filterUnits="userSpaceOnUse">
+        <feOffset dx="0" dy="0"/>
+      </filter>
+
+      <g id="shape">
+        <rect x="10" y="10" width ="60" height="20" stroke="green" stroke-width="1" fill="lightgreen"/>
+      </g>
+    </defs>
+    <g>
+      <use xlink:href="#shape"/>
+      <g transform="translate(100 0)" filter="url(#shift)">
+        <use xlink:href="#shape"/>
+      </g>
+    </g>
+  </svg>
+</div>
+</body>
+</html>
\ No newline at end of file
--- a/layout/reftests/svg/svg-integration/reftest.list
+++ b/layout/reftests/svg/svg-integration/reftest.list
@@ -22,16 +22,17 @@ fuzzy-if(Android,255,30) == clipPath-htm
 == conditions-outer-svg-02.xhtml ../pass.svg
 == dynamic-conditions-outer-svg-01.xhtml ../pass.svg
 == dynamic-conditions-outer-svg-02.xhtml ../pass.svg
 == dynamic-conditions-outer-svg-03.xhtml ../pass.svg
 == dynamic-conditions-outer-svg-04.xhtml ../pass.svg
 == filter-html-01.xhtml filter-html-01-ref.svg
 random-if(Android) random-if(styloVsGecko) == filter-html-01-extref.xhtml filter-html-01-ref.svg # Android: bug 1198380
 == filter-html-zoomed-01.xhtml filter-html-01-ref.svg
+== filter-pixel-snap.xhtml filter-pixel-snap-ref.xhtml
 fuzzy-if(webrender,1,125414) == mask-html-01.xhtml mask-html-01-ref.svg
 fuzzy-if(webrender,1,125414) == mask-html-01-extref-01.xhtml mask-html-01-ref.svg
 random == mask-html-01-extref-02.xhtml mask-html-01-ref.svg # random due to bug 877661
 fuzzy-if(webrender,1,125414) == mask-html-zoomed-01.xhtml mask-html-01-ref.svg
 fuzzy-if(webrender,1,125414) == mask-html-xbl-bound-01.html mask-html-01-ref.svg
 == mask-transformed-html-01.xhtml ../pass.svg
 == mask-transformed-html-02.xhtml ../pass.svg
 fuzzy-if(skiaContent,1,5) == patterned-svg-under-transformed-html-01.xhtml ../pass.svg