Bug 1246762 - Add reftests for |clip-path: inset()|s with rounded corners ; r?dholbert draft
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 18 Aug 2016 19:59:42 +0530
changeset 404187 8119137153beef5413216aecb0b16b82a5ea2bae
parent 404054 1288a28bc496d441e7298587b308134f2d9e6c6c
child 529124 1f38d324559e0be297626dc41a9e472a030af8cb
push id27147
push userbmo:manishearth@gmail.com
push dateTue, 23 Aug 2016 03:55:09 +0000
reviewersdholbert
bugs1246762
milestone51.0a1
Bug 1246762 - Add reftests for |clip-path: inset()|s with rounded corners ; r?dholbert MozReview-Commit-ID: G6LhuffpQfe
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002-ref.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002a.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002b.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002c.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-003-ref.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-003.html
layout/reftests/svg/svg-integration/clip-path/reftest.list
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002-ref.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Reference for clip-path's inset function (with rounded corners) 002</title>
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 180px;
+      height: 180px;
+      background-color: green;
+      position: relative;
+      top: 10px;
+      left: 10px;
+      border-radius: 20px;
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002a.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Test clip-path property and inset function with uniformly rounded corners</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-002-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 100px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(10px round 20px);
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002b.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Test clip-path property and inset function with uniformly rounded corners</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-002-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 100px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(10px round 20px 20px 20px 20px);
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-002c.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Test clip-path property and inset function with uniformly rounded corners</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-002-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 100px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(10px round 20px / 20px);
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-003-ref.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Ref test for clip-path's inset function (with different rounded corners) 003</title>
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 180px;
+      height: 180px;
+      background-color: green;
+      position: relative;
+      top: 10px;
+      left: 10px;
+      border-radius: 10px 20px 30px 40px / 50px 60px 70px 80px;
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners, with different radii</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-003.html
@@ -0,0 +1,26 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<!DOCTYPE html>
+<html>
+<head>
+  <title>CSS Masking: Test clip-path property and inset function with different rounded corners</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-003-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 100px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(10px round 10px 20px 30px 40px / 50px 60px 70px 80px);
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green rect not touching the sides with rounded corners, with different radii</p>
+  <div id="square"></div>
+</body>
+</html>
--- a/layout/reftests/svg/svg-integration/clip-path/reftest.list
+++ b/layout/reftests/svg/svg-integration/clip-path/reftest.list
@@ -45,9 +45,14 @@ default-preferences pref(layout.css.clip
 == clip-path-ellipse-004.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-005.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-006.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-007.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-008.html clip-path-ellipse-001-ref.html
 
 == clip-path-inset-001a.html clip-path-inset-001-ref.html
 == clip-path-inset-001b.html clip-path-inset-001-ref.html
-== clip-path-inset-001c.html clip-path-inset-001-ref.html
\ No newline at end of file
+== clip-path-inset-001c.html clip-path-inset-001-ref.html
+# Anti-aliasing behavior for masking and borders is different
+fuzzy(64,146) == clip-path-inset-002a.html clip-path-inset-002-ref.html
+fuzzy(64,146) == clip-path-inset-002b.html clip-path-inset-002-ref.html
+fuzzy(64,146) == clip-path-inset-002c.html clip-path-inset-002-ref.html
+fuzzy(64,340) == clip-path-inset-003.html clip-path-inset-003-ref.html
\ No newline at end of file