Bug 1243675 - Part 2. Add mask-clip property reftest. r=dbaron
authorAstley Chen <aschen@mozilla.com>
Sat, 02 Apr 2016 09:33:26 +0800
changeset 293347 dd6c0512cb0527d4267295d99a03de2e6f6e3f10
parent 293346 a841c9e635bb263de14ed1c1448eaf786f4bc79d
child 293348 eb10276fd4676d3f3a2a2c5f5dbaa2b8b2056288
push id30178
push usercbook@mozilla.com
push dateFri, 15 Apr 2016 09:42:06 +0000
treeherdermozilla-central@afd82f887093 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdbaron
bugs1243675
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1243675 - Part 2. Add mask-clip property reftest. r=dbaron MozReview-Commit-ID: 3Gva7UpBDsd
layout/reftests/w3c-css/submitted/masking/mask-clip-1-ref.html
layout/reftests/w3c-css/submitted/masking/mask-clip-1.html
layout/reftests/w3c-css/submitted/masking/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-clip-1-ref.html
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS mask-clip reference</title>
+    <link rel="author" title="Astley Chen" href="mailto:aschen@mozilla.com">
+    <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+    <style type="text/css">
+      div {
+        position: absolute;
+        top: 10px;
+        background-color: purple;
+      }
+
+      div.border {
+        left: 10px;
+        margin: 1px 4px;
+        width: 60px;
+        height: 25px;
+      }
+
+      div.padding {
+        left: 110px;
+        margin: 9px 10px;
+        width: 52px;
+        height: 17px;
+      }
+
+      div.content {
+        left: 210px;
+        margin: 15px 13px;
+        width: 40px;
+        height: 11px;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="color border"></div>
+    <div class="color padding"></div>
+    <div class="color content"></div>
+  </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-clip-1.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<html>
+  <head>
+    <meta charset="utf-8">
+    <title>CSS Masking: mask-clip: clip mask image</title>
+    <link rel="author" title="Astley Chen" href="mailto:aschen@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-clip">
+    <link rel="match" href="mask-clip-1-ref.html">
+    <meta name="assert" content="border-box, padding-box, and content-box values of mask-clip should clip to the appropriate boxes.">
+    <style type="text/css">
+      div {
+        /*
+         * content box: 40 x 20
+         * padding box: 52 x 38
+         * border  box: 60 x 50
+         * margin  box: 66 x 54
+         */
+        background-color: purple;
+        position: absolute;
+        top: 10px;
+        margin: 1px 2px 3px 4px;
+        border: solid transparent;
+        border-width: 8px 2px 4px 6px;
+        padding: 6px 9px 12px 3px;
+        width: 40px;
+        height: 20px;
+      }
+
+      div.mask {
+        mask-size: 100% 100%;
+        mask-origin: border-box;
+        mask-image: url(support/transparent-100x50-blue-100x50.svg);
+      }
+
+      div.border {
+        left: 10px;
+        mask-clip: border-box;
+      }
+
+      div.padding {
+        left: 110px;
+        mask-clip: padding-box;
+      }
+
+      div.content {
+        left: 210px;
+        mask-clip: content-box;
+      }
+    </style>
+  </head>
+  <body>
+    <div class="outer mask border"></div>
+    <div class="outer mask padding"></div>
+    <div class="outer mask content"></div>
+  </body>
+</html>
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -12,8 +12,11 @@ fails fails-if(cocoaWidget) == mask-comp
 fails == mask-mode-a.html mask-mode-ref.html
 fails == mask-mode-b.html mask-mode-ref.html
 
 # mask-image test cases
 fails == mask-image-1a.html mask-image-1-ref.html
 fails == mask-image-1b.html mask-image-1-ref.html
 fails == mask-image-1c.html mask-image-1-ref.html
 fails == mask-image-2.html mask-image-2-ref.html
+
+# mask-clip test cases
+fails == mask-clip-1.html mask-clip-1-ref.html