Bug 1228354 - Part2. Add test case for mask-mode. r=heycam
authorEthan Lin <ethlin@mozilla.com>
Thu, 24 Mar 2016 01:33:00 +0100
changeset 290921 296179ddbd84f1c893edb3a3b71f508b619a5f54
parent 290920 dad9f126f0556cf06fcaaf09ddb86e726f2588c9
child 290922 8898c7f8ea957a2a1527ab37a48b01b37a4bcb3e
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1228354
milestone48.0a1
Bug 1228354 - Part2. Add test case for mask-mode. r=heycam
layout/reftests/w3c-css/submitted/masking/mask-mode-a.html
layout/reftests/w3c-css/submitted/masking/mask-mode-b.html
layout/reftests/w3c-css/submitted/masking/mask-mode-ref.html
layout/reftests/w3c-css/submitted/masking/reftest.list
layout/reftests/w3c-css/submitted/masking/support/blue-100x100.png
layout/reftests/w3c-css/submitted/masking/support/blue-100x100.svg
layout/reftests/w3c-css/submitted/masking/support/blue-luminance-100x100.svg
layout/reftests/w3c-css/submitted/masking/support/green-100x100.png
layout/reftests/w3c-css/submitted/masking/support/green-100x100.svg
layout/reftests/w3c-css/submitted/masking/support/green-luminance-100x100.svg
layout/reftests/w3c-css/submitted/masking/support/red-100x100.png
layout/reftests/w3c-css/submitted/masking/support/red-100x100.svg
layout/reftests/w3c-css/submitted/masking/support/red-luminance-100x100.svg
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-mode-a.html
@@ -0,0 +1,60 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-mode with vector image</title>
+    <link rel="author" title="Ethan Lin" href="mailto:ethlin@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <link rel="help" href="https://www.w3.org/TR/css-masking-1/#propdef-mask-mode">
+    <link rel="match" href="mask-mode-ref.html">
+    <meta name="assert" content="Test checks that mask an SVG image referenced by mask-image is correct with different mask mode.">
+    <style type="text/css">
+      div {
+        background-color: blue;
+        position: absolute;
+        margin: 0px;
+        padding: 0px;
+        width: 100px;
+        height: 100px;
+        top: 10px;
+      }
+
+      div.auto {
+        left: 10px;
+        mask-mode: match-source;
+        mask-image: url(support/blue-100x100.svg);
+      }
+
+      div.alpha {
+        left: 120px;
+        mask-mode: alpha;
+        mask-image: url(support/blue-100x100.svg);
+      }
+
+      div.luminance1 {
+        left: 230px;
+        mask-mode: luminance;
+        mask-image: url(support/blue-100x100.svg);
+      }
+
+      div.luminance2 {
+        left: 340px;
+        mask-mode: luminance;
+        mask-image: url(support/red-100x100.svg);
+      }
+
+      div.luminance3 {
+        left: 450px;
+        mask-mode: luminance;
+        mask-image: url(support/green-100x100.svg);
+      }
+    </style>
+  </head>
+  <body>
+    <div class="auto"></div>
+    <div class="alpha"></div>
+    <div class="luminance1"></div>
+    <div class="luminance2"></div>
+    <div class="luminance3"></div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-mode-b.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-mode with raster image</title>
+    <link rel="author" title="Ethan Lin" href="mailto:ethlin@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <link rel="help" href="https://www.w3.org/TR/css-masking-1/#propdef-mask-mode">
+    <link rel="match" href="mask-mode-ref.html">
+    <meta name="assert" content="Test checks that mask a PNG image referenced by mask-image is correct with different mask mode.">
+    <style type="text/css">
+      div {
+        background-color: blue;
+        position: absolute;
+        margin: 0px;
+        padding: 0px;
+        width: 100px;
+        height: 100px;
+        top: 10px;
+      }
+
+      div.auto {
+        left: 10px;
+        mask-mode: match-source;
+        mask-image: url(support/blue-100x100.png);
+      }
+
+      div.alpha {
+        left: 120px;
+        mask-mode: alpha;
+        mask-image: url(support/blue-100x100.png);
+      }
+
+      div.luminance1 {
+        left: 230px;
+        mask-mode: luminance;
+        mask-image: url(support/blue-100x100.png);
+      }
+
+      div.luminance2 {
+        left: 340px;
+        mask-mode: luminance;
+        mask-image: url(support/red-100x100.png);
+      }
+
+      div.luminance3 {
+        left: 450px;
+        mask-mode: luminance;
+        mask-image: url(support/green-100x100.png);
+      }
+    </style>
+  </head>
+  <body>
+    <div class="auto"></div>
+    <div class="alpha"></div>
+    <div class="luminance1"></div>
+    <div class="luminance2"></div>
+    <div class="luminance3"></div>
+  </body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-mode-ref.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS mask-mode reference</title>
+    <link rel="author" title="Ethan Lin" href="mailto:ethlin@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <style type="text/css">
+      div {
+        background-color: white;
+        position: absolute;
+        margin: 0px;
+        padding: 0px;
+        width: 100px;
+        height: 100px;
+        top: 10px;
+      }
+
+      div.auto {
+        left: 10px;
+        background-image: url(support/blue-100x100.svg);
+      }
+
+      div.alpha {
+        left: 120px;
+        background-image: url(support/blue-100x100.svg);
+      }
+
+      div.luminance1 {
+        left: 230px;
+        background-image: url(support/blue-luminance-100x100.svg);
+      }
+
+      div.luminance2 {
+        left: 340px;
+        background-image: url(support/red-luminance-100x100.svg);
+      }
+
+      div.luminance3 {
+        left: 450px;
+        background-image: url(support/green-luminance-100x100.svg);
+      }
+    </style>
+  </head>
+  <body>
+    <div class="auto"></div>
+    <div class="alpha"></div>
+    <div class="luminance1"></div>
+    <div class="luminance2"></div>
+    <div class="luminance3"></div>
+  </body>
+</html>
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -1,4 +1,6 @@
 fails == mask-composite-1a.html mask-composite-1-ref.html # bug 1251161
 fails == mask-composite-1b.html mask-composite-1-ref.html # bug 1251161
 fails fails-if(cocoaWidget) == mask-composite-2a.html mask-composite-2-ref.html # bug 1231643;  bug 1251161
 fails fails-if(cocoaWidget) == mask-composite-2b.html mask-composite-2-ref.html # bug 1231643; bug 1251161
+fails == mask-mode-a.html mask-mode-ref.html # bug 1251161
+fails == mask-mode-b.html mask-mode-ref.html # bug 1251161
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..3b72d5ce53c07b68fe508bb57aa61a933dbda768
GIT binary patch
literal 40279
zc%1Fru`7gO9KiA4>*{d2$>7orRvDE4fKFU;Nw+A2B(u&97LkoI$s&VAHWMQw1NT3O
zEc_AYy}_VNy6(Q0@8|7#p0{Uu>f5_Ly@yMcxqNOk7ZLgLd}%pdH(FyLo6cLWr`2@H
zt}o1$qS<;b?ygSKox!d7mF<Y3;nqmv?7Wa}_Segcv;8lbLS}OG{qpHKVl2v~>FQ1r
zwf*D0B%;|2Vf1zT0Q$)wFb07!2#i5s3<6^i7=yqV1jZmR27xgMj6q-w0%H&ugTNRB
z#vm{Tf$51LjothD_g#Q)pQV#}BF=we5Ez5N7zD;3Fb07!2#i5s3<6^i7=yqV1jZmR
z27xgMj6q-w0%H&ugTNT1&2E#4qjuc|Fb<4CU<?9d5Ez5N7zD;3Fb07!2#i5s3<6^i
z7=yqV1jZmR27xgMj6q-w0%H)EP6ipsJ#PNT{{sA(Uki*uU<?9d5Ez5N7zD;3Fb07!
z2#i5s3<6^i7=yqV1jZmR27xgMj6q-w0%MTh)h@=15yhLX-UUdeij6l5!59R_ATS1j
zF$j!7U<?9d5Ez5N7zD;3Fb07!2#i5s3<6^i7=yqV1m>gC_wYHgdfs|3&sIv;GiwK5
DD)})y
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/blue-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="blue" fill-opacity="1"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/blue-luminance-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="RGB(238,238,255)" fill-opacity="1"/>
+</svg>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..d65838b7f02b830e2fc05b7e20fee2e2d7ebd45d
GIT binary patch
literal 40279
zc%1FrAxi^M0KoBg8@M?UgF%r6tJnlTfO4`OvY|2r+Ym92X|O4RLBSxyB8D}aNuyPh
z#ZMrLN&F0Y6AXe$Wcv^QzvJCIUN|27x%RljrD|!oFi{903@7DyC7m}qBR`Pd8&9XT
zbQ)M+EXCoybG2_STItGQqrA2i!q8}EMB(gwJYCFfCzXZVV|Hw0Hd{Yyyo4|rl6bDR
z6NTp9@ox0_24Q4+y#ak^5Ez5N7zD;3Fb07!2#i5s3<6^i7=yqV1jZmR27xgMj6q-w
z0%H&ugTVAfkdxNx!`E4WUhk!w`XbJMVh|XEz!(I^ATS1jF$j!7U<?9d5Ez5N7zD;3
zFb07!2#i5s3<6^i7=yqV<d0oP(?@@G7Qi?#27xgMj6q-w0%H&ugTNRB#vm{TfiVb-
zL0}95V-OgFz!(I^ATS1jF$j!7V7eJ3U%1=+kN*YuHNO@ZgTNRB#vm{TfiVb-L0}95
zV-OgFz!(I^ATS1jF$j!7U<?9d5Ez5N7zD;3KWnz9iXjxQdU_Thnkn8tTL{J=Fb07!
z2#i5s3<6^i7=yqV1jZmR27xgMj6q-w0%H&ugTNRB#vm}SmCWt(+d;eYoGeu1%lZ2L
E2SS`Mod5s;
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/green-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="lime" fill-opacity="1"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/green-luminance-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="RGB(73,73,255)" fill-opacity="1"/>
+</svg>
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..43b8e542a924441a4028d8e3e888bdde82d831e3
GIT binary patch
literal 40279
zc%1Frp-Tf%0D$p#4(FUKS%xf_1Q87W2g=4a)FHBB6A`Op8blDqreG3_7}jhi4F-*x
zmaU?};vZm}w_p%VGPZB*`yKDz@xt-o<J#j+Rw~6zdLkV{$dpU@)p*`)k5n?g*WNCw
z@s!+HEapS2eKj7g&*PQRT4`-3gt77Vh{EMnHeMXrEiV^FUK82G)bRcGK`n&IP|nX+
z_o7fgIy;P7A%24}hI+jL{bmptgTNRB#vm{TfiVb-L0}95V-OgFz!(I^ATS1jF$j!7
zU<?9d5Ez5N^hJ=H{l|}=vjDx`OE>jJoIzp`7=yqV1jZmR27xgMj6q-w0%H&ugTNRB
z#vm{TfiVb-L0}95V-OgFz!;>%?xLB~PMrlX4vaxy3<6^i7=yqV1jZmR27xgMj6q-w
z0%H&ugTNRB#vm{TfiVb-L0}95V-T2b21%u#w+8XQ0RQIK0%H&ugTNRB#vm{TfiVb-
zL0}95V-OgFz!(I^ATS1jF$j!7U<?9d5Ez5N802sD#&j-(+-*<K0z`AU=DUSp3<6^i
z7=yqV1jZmR27xgMj6q-w0%H&ugTNRB#vm{TfiVb-L0}95^SLzi)cksxZ9kU_mHf@Z
G`tdjTnK3f}
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/red-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="red" fill-opacity="1"/>
+</svg>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/support/red-luminance-100x100.svg
@@ -0,0 +1,4 @@
+<?xml version="1.0"?>
+<svg xmlns="http://www.w3.org/2000/svg">
+  <rect x="0" y="0" width="100%" height="100%" fill="RGB(201,201,255)" fill-opacity="1"/>
+</svg>