Bug 1275451: Part 2. SVG mask composition reftests draft
authorCJKu <cku@mozilla.com>
Thu, 26 May 2016 16:07:50 +0800
changeset 371270 95eb777b8c349f0e76a9b7e00ab9c1ae9e43d0ef
parent 371269 72e2f78232a57e73e1275075991b1f8d61851695
child 521955 9ee15cf8c6f6c5202ac6d462c43d79f3c2614e49
push id19287
push userbmo:cku@mozilla.com
push dateThu, 26 May 2016 08:58:47 +0000
bugs1275451
milestone49.0a1
Bug 1275451: Part 2. SVG mask composition reftests MozReview-Commit-ID: Cm727rK5MZ0
layout/reftests/w3c-css/submitted/masking/mask-composite-1c.html
layout/reftests/w3c-css/submitted/masking/mask-composite-2c.html
layout/reftests/w3c-css/submitted/masking/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-composite-1c.html
@@ -0,0 +1,56 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-composite: compose svg mask</title>
+    <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <link rel="help" href="http://www.w3.org/TR/css-masking-1/#the-mask-composite">
+    <link rel="match" href="mask-composite-1-ref.html">
+    <meta name="assert" content="Test checks that vector-mask-image can be composed correctly by different mask-composite value.">
+    <svg height="0">
+      <mask id="rectMask" x="0" y="0" width="100" height="100" >
+        <rect x="0" y="50" width="100" height="50" style="stroke:none; fill: #ffffff"/>
+      </mask>
+    </svg>
+    <style type="text/css">
+      div {
+        background-color: blue;
+        position: absolute;
+        margin: 0px;
+        padding: 0px;
+        width: 100px;
+        height: 100px;
+        top:10px;
+        mask-image: url(#rectMask),
+                    url(#rectMask);
+      }
+
+      div.add {
+        left: 10px;
+        mask-composite: add;
+      }
+
+      div.substract {
+        left: 120px;
+        mask-composite: substract;
+      }
+
+      div.intersect {
+        left: 230px;
+        mask-composite: intersect;
+      }
+
+      div.exclude {
+        left: 340px;
+        mask-composite: exclude;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="add"></div>
+    <div class="substract"></div>
+    <div class="intersect"></div>
+    <div class="exclude"></div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-composite-2c.html
@@ -0,0 +1,59 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-composite: compose SVG mask</title>
+    <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <link rel="help" href="http://www.w3.org/TR/css-masking-1/#the-mask-composite">
+    <link rel="match" href="mask-composite-2-ref.html">
+    <meta name="assert" content="Test checks that vector-mask-image can be composed correctly by different mask-composite value.">
+    <svg height="0">
+      <mask id="rectMask1" x="0" y="0" width="100" height="100" >
+        <rect x="0" y="50" width="100" height="50" style="stroke:none; fill: #ffffff"/>
+      </mask>
+      <mask id="rectMask2" x="0" y="0" width="100" height="100" >
+        <rect x="0" y="0" width="100" height="50" style="stroke:none; fill: #ffffff"/>
+      </mask>
+    </svg>
+    <style type="text/css">
+      div {
+        background-color: blue;
+        position: absolute;
+        margin: 0px;
+        padding: 0px;
+        width: 100px;
+        height: 100px;
+        top:10px;
+        mask-image: url(#rectMask1),
+                    url(#rectMask2);
+      }
+
+      div.add {
+        left: 10px;
+        mask-composite: add;
+      }
+
+      div.substract {
+        left: 120px;
+        mask-composite: substract;
+      }
+
+      div.intersect {
+        left: 230px;
+        mask-composite: intersect;
+      }
+
+      div.exclude {
+        left: 340px;
+        mask-composite: exclude;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="add"></div>
+    <div class="substract"></div>
+    <div class="intersect"></div>
+    <div class="exclude"></div>
+  </body>
+</html>
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -1,17 +1,19 @@
 # All mask properties test cases are meant to be failed
 # until bug 1251161 is fixed, which means enabling mask shorthand.
 # To enable it in compile time, refer to bug 1243734
 
 # mask-composite test cases
 fails == mask-composite-1a.html mask-composite-1-ref.html
 fails == mask-composite-1b.html mask-composite-1-ref.html
+fails == mask-composite-1c.html mask-composite-1-ref.html
 fails == mask-composite-2a.html mask-composite-2-ref.html
 fails == mask-composite-2b.html mask-composite-2-ref.html
+fails == mask-composite-2c.html mask-composite-2-ref.html
 
 # mask-mode test cases
 fails == mask-mode-a.html mask-mode-ref.html
 fails == mask-mode-b.html mask-mode-ref.html
 fails == mask-type.html mask-type-ref.html
 
 # mask-image test cases
 fails == mask-image-1a.html mask-image-1-ref.html