Bug 1246762 - Add reftests for non-rounded |clip-path: inset()|s ; r?dholbert draft
authorManish Goregaokar <manishsmail@gmail.com>
Thu, 18 Aug 2016 19:59:20 +0530
changeset 404054 1288a28bc496d441e7298587b308134f2d9e6c6c
parent 404048 c0ed295e61d550cb288efbe148c0cab692a11cd3
child 404055 006eea6e93fb81b6af3bff034e62cb3a581051ae
child 404056 ba9dee504e69d4ab274fbb37ca76dcaae2070387
child 404058 e8be0f8e17bb4f9bdeb669ac40d0a03af7739dcc
child 404059 02e09d8bdb9802f2dfad5a75ea285443282a9c88
child 404187 8119137153beef5413216aecb0b16b82a5ea2bae
push id27090
push userbmo:manishearth@gmail.com
push dateMon, 22 Aug 2016 18:53:41 +0000
reviewersdholbert
bugs1246762
milestone51.0a1
Bug 1246762 - Add reftests for non-rounded |clip-path: inset()|s ; r?dholbert MozReview-Commit-ID: HSRZq2NLPcW
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001-ref.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001a.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001b.html
layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001c.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-001-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 001</title>
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 100px;
+      height: 100px;
+      border: solid green 40px;
+      background-color: green;
+      position: relative;
+      top: 10px;
+      left: 10px;
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green square not touching the edges</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001a.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 10px on all sides</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-001-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);
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green square not touching the edges</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001b.html
@@ -0,0 +1,28 @@
+<!--
+     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 insets on each side</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-001-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 120px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(10px 20px);
+      position: relative;
+      left: -10px;
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green square not touching the edges</p>
+  <div id="square"></div>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/svg/svg-integration/clip-path/clip-path-inset-001c.html
@@ -0,0 +1,29 @@
+<!--
+     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 insets for all 4 sides</title>
+  <link rel="help" href="https://drafts.csswg.org/css-shapes/#typedef-basic-shape">
+  <link rel="match" href="clip-path-inset-001-ref.html">
+  <link rel="author" title="Manish Goregaokar" href="mailto:manish@mozilla.com">
+  <style type="text/css">
+    #square {
+      width: 110px;
+      height: 100px;
+      border: solid green 50px;
+      background-color: green;
+      clip-path: inset(5px 10px 15px 20px);
+      position: relative;
+      left: -10px;
+      top: 5px;
+    }
+  </style>
+</head>
+<body>
+  <p>The test passes if there is a green square not touching the edges</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
@@ -42,8 +42,12 @@ default-preferences pref(layout.css.clip
 == clip-path-ellipse-001.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-002.html clip-path-ellipse-001-ref.html
 == clip-path-ellipse-003.html clip-path-ellipse-001-ref.html
 == 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