summaryrefslogtreecommitdiffstats
path: root/layout/style/test/test_clip-path_polygon.html
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /layout/style/test/test_clip-path_polygon.html
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'layout/style/test/test_clip-path_polygon.html')
-rw-r--r--layout/style/test/test_clip-path_polygon.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/layout/style/test/test_clip-path_polygon.html b/layout/style/test/test_clip-path_polygon.html
new file mode 100644
index 000000000..9f25accd1
--- /dev/null
+++ b/layout/style/test/test_clip-path_polygon.html
@@ -0,0 +1,41 @@
+<html>
+<head>
+<style>
+body {padding: 0;margin:0;}
+div {
+ width: 200px;
+ height: 200px;
+ position: fixed;
+ top: 50px;
+ left: 50px;
+ margin: 50;
+ padding: 50;
+ border: 50px solid red;
+ transform-origin: 0 0;
+ transform: translate(50px, 50px) scale(0.5);
+ background-color: green;
+ clip-path: polygon(0 0, 200px 0, 0 200px) content-box;*/
+}
+</style>
+<title>clip-path with polygon() hit test</title>
+<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<div id="a"></div>
+<p style="margin-top: 110px">
+<script>
+var a = document.getElementById("a");
+if (SpecialPowers.getBoolPref("layout.css.clip-path-shapes.enabled")) {
+ isnot(a, document.elementFromPoint(199, 199), "a shouldn't be found");
+ isnot(a, document.elementFromPoint(199, 250), "a shouldn't be found");
+ isnot(a, document.elementFromPoint(250, 199), "a shouldn't be found");
+ isnot(a, document.elementFromPoint(255, 255), "a shouldn't be found");
+ isnot(a, document.elementFromPoint(301, 200), "a shouldn't be found");
+ isnot(a, document.elementFromPoint(200, 301), "a shouldn't be found");
+}
+is(a, document.elementFromPoint(200, 200), "a should be found");
+is(a, document.elementFromPoint(299, 200), "a should be found");
+is(a, document.elementFromPoint(200, 299), "a should be found");
+is(a, document.elementFromPoint(250, 250), "a should be found");
+</script>
+</html> \ No newline at end of file