3 <title>Hit testing on backface
</title>
4 <style type=
"text/css" media=
"screen">
7 outline:
2px solid orange;
12 border:
1px solid black;
16 display: inline-block;
19 background-color: gray;
26 <script type=
"text/javascript" charset=
"utf-8">
29 var results = document.getElementById('results');
30 results.innerHTML += s + '
<br>';
35 var firstHit = document.elementFromPoint(
120,
150);
36 var secondHit = document.elementFromPoint(
300,
150);
38 var box1 = document.getElementById('box1');
39 var box2 = document.getElementById('box1');
40 var container = document.getElementById('container');
43 log('Found box1 on left: PASS');
45 log('Found ' + firstHit.id + ' on left: FAIL');
47 if (secondHit == container)
48 log('Found container on right: PASS');
50 log('Found ' + secondHit.id + ' on right: FAIL');
55 <body onload=
"runTest()">
57 <p>There are two boxes below, both rotated
180° in Y. The rightmost one has backface-visibility: hidden, so you can't see it.
</p>
59 <div class=
"box" id=
"box1" style=
"transform: translateZ(1px) rotateY(180deg)"></div>
60 <div class=
"box" id=
"box2" style=
"transform: translateZ(1px) rotateY(180deg); -webkit-backface-visibility: hidden;"></div>