5 body {padding:
0;margin:
0;}
14 border:
50px solid red;
15 transform-origin:
0 0;
16 transform: translate(
50px,
50px) scale(
0.5);
17 background-color: green;
18 clip-path: polygon(
0 0,
200px
0,
0 200px) content-box;
21 <title>clip-path with polygon() hit test
</title>
22 <script src=
"/tests/SimpleTest/SimpleTest.js"></script>
23 <link rel=
"stylesheet" type=
"text/css" href=
"/tests/SimpleTest/test.css" />
26 <p style=
"margin-top: 110px">
28 var a
= document
.getElementById("a");
29 isnot(a
, document
.elementFromPoint(199, 199), "a shouldn't be found");
30 isnot(a
, document
.elementFromPoint(199, 250), "a shouldn't be found");
31 isnot(a
, document
.elementFromPoint(250, 199), "a shouldn't be found");
32 isnot(a
, document
.elementFromPoint(255, 255), "a shouldn't be found");
33 isnot(a
, document
.elementFromPoint(301, 200), "a shouldn't be found");
34 isnot(a
, document
.elementFromPoint(200, 301), "a shouldn't be found");
35 is(a
, document
.elementFromPoint(200, 200), "a should be found");
36 is(a
, document
.elementFromPoint(299, 200), "a should be found");
37 is(a
, document
.elementFromPoint(200, 299), "a should be found");
38 is(a
, document
.elementFromPoint(250, 250), "a should be found");