Bug 1304991 - Part 2. mask/clip/opacity combination test. draft
authorcku <cku@mozilla.com>
Mon, 26 Sep 2016 18:35:59 +0800
changeset 417822 ff4a8dc6a754623424111b7e0ee1494647de4aac
parent 417821 72629ee209f675e482544d7257324cc8b46e40af
child 532194 7948f278d426555ea39ff245e98b62934935e5b7
push id30517
push userbmo:cku@mozilla.com
push dateTue, 27 Sep 2016 07:11:58 +0000
bugs1304991
milestone52.0a1
Bug 1304991 - Part 2. mask/clip/opacity combination test. MozReview-Commit-ID: LiLmrqUA2c2
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01-ref.xhtml
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01a.xhtml
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01b.xhtml
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01c.xhtml
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01d.xhtml
layout/reftests/svg/svg-integration/mask-clipPath-opacity-01e.xhtml
layout/reftests/svg/svg-integration/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01-ref.xhtml
@@ -0,0 +1,14 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 50px;
+    height: 100px;
+    background-color: rgba(0,0,255,0.5);
+  }
+</style>
+</head>
+<body>
+  <div/>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01a.xhtml
@@ -0,0 +1,20 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 100px;
+    height: 100px;
+    mask: url(#m1);
+    background-color: blue;
+  }
+</style>
+</head>
+<body>
+  <div/>
+  <svg:svg height="0">
+    <svg:mask id="m1" style="mask-type:alpha">
+      <svg:rect x="0" y="0" width="50" height="100" style="stroke:none; fill: #ffffff" fill-opacity="0.5"/>
+    </svg:mask>
+  </svg:svg>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01b.xhtml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 100px;
+    height: 100px;
+    opacity: 0.5;
+    mask:url(#m1);
+    background-color: blue;
+  }
+</style>
+</head>
+<body>
+  <div/>
+  <svg:svg height="0">
+    <svg:mask id="m1" style="mask-type:alpha">
+      <svg:rect x="0" y="0" width="50" height="100" style="stroke:none; fill: #ffffff"/>
+    </svg:mask>
+  </svg:svg>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01c.xhtml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 100px;
+    height: 100px;
+    clip-path: url(#c1);
+    background-color: blue;
+    opacity: 0.5;
+  }
+</style>
+</head>
+<body>
+  <div/>
+  <svg:svg height="0">
+    <svg:clipPath id="c1">
+      <svg:rect x="0" y="0" width="50" height="100"/>
+    </svg:clipPath>
+  </svg:svg>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01d.xhtml
@@ -0,0 +1,21 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 100px;
+    height: 100px;
+    clip-path: url(#c1);
+    background-color: blue;
+    opacity: 0.5;
+  }
+</style>
+</head>
+<body>
+  <div/>
+  <svg:svg height="0">
+    <svg:clipPath id="c1">
+      <svg:rect x="0" y="0" width="50" height="100"/>
+    </svg:clipPath>
+  </svg:svg>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/mask-clipPath-opacity-01e.xhtml
@@ -0,0 +1,25 @@
+<html xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+<head>
+<style>
+  div {
+    width: 100px;
+    height: 100px;
+    clip-path: url(#c1);
+    mask:url(#m1);
+    background-color: blue;
+    opacity: 0.5;
+  }
+</style>
+</head>
+<body>
+  <div/>
+  <svg:svg height="0">
+    <svg:mask id="m1" style="mask-type:alpha">
+      <svg:rect x="0" y="0" width="100" height="100" style="stroke:none; fill: #ffffff"/>
+    </svg:mask>
+    <svg:clipPath id="c1">
+      <svg:rect x="0" y="0" width="50" height="100"/>
+    </svg:clipPath>
+  </svg:svg>
+</body>
+</html>
--- a/layout/reftests/svg/svg-integration/reftest.list
+++ b/layout/reftests/svg/svg-integration/reftest.list
@@ -33,8 +33,13 @@ random == mask-html-01-extref-02.xhtml m
 fuzzy-if(B2G&&browserIsRemote,1,2300) == mask-html-zoomed-01.xhtml mask-html-01-ref.svg
 # Skil XBL test case on B2G
 skip-if(B2G||Mulet) == mask-html-xbl-bound-01.html mask-html-01-ref.svg # Initial mulet triage: parity with B2G/B2G Desktop
 == 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
 == patterned-svg-under-transformed-html-02.xhtml ../pass.svg
 
+fuzzy(1,5000) == mask-clipPath-opacity-01a.xhtml mask-clipPath-opacity-01-ref.xhtml
+fuzzy(1,5000) == mask-clipPath-opacity-01b.xhtml mask-clipPath-opacity-01-ref.xhtml
+fuzzy(1,5000) == mask-clipPath-opacity-01c.xhtml mask-clipPath-opacity-01-ref.xhtml
+fuzzy(1,5000) == mask-clipPath-opacity-01d.xhtml mask-clipPath-opacity-01-ref.xhtml
+fuzzy(1,5000) == mask-clipPath-opacity-01e.xhtml mask-clipPath-opacity-01-ref.xhtml