Bug 1323912 - Part 6. Test cases. draft
authorcku <cku@mozilla.com>
Wed, 04 Jan 2017 14:16:06 +0800
changeset 456121 e3e3864855658043dd0575a0288ce11c99141f3e
parent 456120 68f9e28692502d37a13fe5e87478b08339d6768d
child 541151 ea0adc873ac6deea0abfa6d2acb7f9ffc32129db
push id40410
push userbmo:cku@mozilla.com
push dateThu, 05 Jan 2017 02:50:43 +0000
bugs1323912
milestone53.0a1
Bug 1323912 - Part 6. Test cases. mask-opacity-1d.hmtl: vertify the change in Part 4. Before we land Part 4, the rendering result in FF is not correct. mask-opacity-1e.hmtl: vertify the change in Part 5. MozReview-Commit-ID: GcbDCvr9ttF
layout/reftests/w3c-css/submitted/masking/mask-opacity-1d.html
layout/reftests/w3c-css/submitted/masking/mask-opacity-1e.html
layout/reftests/w3c-css/submitted/masking/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-opacity-1d.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-image: mask with opacity</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="https://www.w3.org/TR/css-masking-1/#the-mask-image">
+    <link rel="match" href="mask-opacity-1-ref.html">
+    <meta name="assert" content="Test checks whether apply opacity to masked element correctly or not.">
+    <svg height="0">
+      <mask id="myMask" 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 {
+        position: absolute;
+        left: 10px;
+        top: 10px;
+        background-color: rgb(0,0,255);
+        width: 100px;
+        height: 100px;
+        mask-image: url(#myMask), url(#myMask);
+        opacity: 0.5;
+      }
+    </style>
+  </head>
+  <body>
+    <div></div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-opacity-1e.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-image: mask with opacity</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="https://www.w3.org/TR/css-masking-1/#the-mask-image">
+    <link rel="match" href="mask-opacity-1-ref.html">
+    <meta name="assert" content="Test checks whether apply opacity to masked element correctly or not.">
+    <style type="text/css">
+      #outter {
+        position: absolute;
+        left: 10px;
+        top: 10px;
+        width: 100px;
+        height: 100px;
+        mask-image: url(support/blue-100x50-transparent-100x50.png),
+                    url(support/blue-100x50-transparent-100x50.png);
+        opacity: 0.5;
+      }
+
+      #inner {
+        width: 100px;
+        height: 100px;
+        box-sizing:border-box;
+        background-color: blue;
+        border: 1px solid transparent;
+        will-change: transform;
+      }
+    </style>
+  </head>
+  <body>
+    <div id="outter"><div id="inner"></div></div>
+  </body>
+</html>
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -106,10 +106,12 @@ fuzzy-if(winWidget,9,98) == clip-path-ge
 == clip-path-localRef-1.html clip-path-localRef-1-ref.html
 
 default-preferences
 
 # mask with opacity test cases
 fuzzy(1,5000) == mask-opacity-1a.html mask-opacity-1-ref.html
 fuzzy(1,5000) == mask-opacity-1b.html mask-opacity-1-ref.html
 fuzzy(1,5000) == mask-opacity-1c.html mask-opacity-1-ref.html
+fuzzy(1,5000) == mask-opacity-1d.html mask-opacity-1-ref.html
+fuzzy(1,5000) == mask-opacity-1e.html mask-opacity-1-ref.html
 
 == clip-path-mix-blend-mode-1.html clip-path-mix-blend-mode-1-ref.html
\ No newline at end of file