Bug 1313898 - Part 5. mask and clip-path integration reftests.
MozReview-Commit-ID: 7g0VHJ0ucUX
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-and-clipPath-1-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Masking: mask with clip-path</title>
+ <link rel="author" title="CJ Ku" href="mailto:cku@mozilla.com">
+ <link rel="author" title="Mozilla" href="https://www.mozilla.org">
+ <style type="text/css">
+ div {
+ background-color: purple;
+ width: 50px;
+ height: 50px;
+ }
+ </style>
+ </head>
+ <body>
+ <div></div>
+ </body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-and-clipPath-1a.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Masking: mask with clip-path</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-and-clipPath-1-ref.html">
+ <meta name="assert" content="Test checks whether mask works with clip-path correctly or not.">
+ <style type="text/css">
+ div {
+ background-color: purple;
+ width: 100px;
+ height: 100px;
+ }
+
+ div.mask-by-png {
+ mask-image: url(support/transparent-100x50-blue-100x50.png);
+ clip-path: url(#myClip);
+ }
+ </style>
+ </head>
+ <body>
+ <div class="mask-by-png"></div>
+ </body>
+ <svg height="0">
+ <defs>
+ <clipPath id="myClip">
+ <rect x="0" y="0" width="50" height="100"/>
+ </clipPath>
+ </defs>
+ </svg>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-and-clipPath-1b.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Masking: mask with clip-path</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-and-clipPath-1-ref.html">
+ <meta name="assert" content="Test checks whether mask works with clip-path correctly or not.">
+ <style type="text/css">
+ div {
+ background-color: purple;
+ width: 100px;
+ height: 100px;
+ }
+
+ div.mask-by-png {
+ mask-image: url(#myMask);
+ clip-path: url(#myClip);
+ }
+ </style>
+ </head>
+ <body>
+ <div class="mask-by-png"></div>
+ </body>
+ <svg height="0">
+ <defs>
+ <mask id="myMask" x="0" y="0" width="1" height="1">
+ <rect x="0" y="0" width="100" height="50" style="stroke:none; fill: #ffffff"/>
+ </mask>
+ <clipPath id="myClip">
+ <rect x="0" y="0" width="50" height="100"/>
+ </clipPath>
+ </defs>
+ </svg>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/w3c-css/submitted/masking/mask-and-clipPath-1c.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8">
+ <title>CSS Masking: mask with clip-path</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-and-clipPath-1-ref.html">
+ <meta name="assert" content="Test checks whether mask works with clip-path correctly or not.">
+ <style type="text/css">
+ div.outter {
+ margin: 0px;
+ padding: 0px;
+ width: 200px;
+ height: 200px;
+ transform: translate(-10px, -10px);
+ }
+
+ div.mask-by-png {
+ background-color: purple;
+ width: 100px;
+ height: 100px;
+ mask-image: url(support/transparent-100x50-blue-100x50.png);
+ clip-path: url(#myClip);
+ transform: translate(10px, 10px);
+ }
+ </style>
+ </head>
+ <body>
+ <div class="outter">
+ <div class="mask-by-png"></div>
+ </div>
+ </body>
+ <svg height="0">
+ <defs>
+ <clipPath id="myClip">
+ <rect x="0" y="0" width="50" height="100"/>
+ </clipPath>
+ </defs>
+ </svg>
+</html>
--- a/layout/reftests/w3c-css/submitted/masking/reftest.list
+++ b/layout/reftests/w3c-css/submitted/masking/reftest.list
@@ -104,9 +104,14 @@ fuzzy-if(winWidget,9,98) == clip-path-ge
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
-== clip-path-mix-blend-mode-1.html clip-path-mix-blend-mode-1-ref.html
\ No newline at end of file
+== clip-path-mix-blend-mode-1.html clip-path-mix-blend-mode-1-ref.html
+
+# mask and clip-path integration test cases.
+== mask-and-clipPath-1a.html mask-and-clipPath-1-ref.html
+== mask-and-clipPath-1b.html mask-and-clipPath-1-ref.html
+== mask-and-clipPath-1c.html mask-and-clipPath-1-ref.html