2 <!-- This test reproduces a divide-by-zero error that is hopefully fixed by
3 https://bugs.webkit.org/show_bug.cgi?id=79136. In that bug, a layer that gets
4 translated by z so that it is coplanar with the camera origin. As a result, when
5 trying to project a point from the container space to the local space, the
6 implementation had a divide-by-zero which made hit-testing results incorrect. -->
9 <style type=
"text/css">
10 /* Marquee content. */
15 -webkit-perspective: 800px;
19 -webkit-transform-style: preserve-3d
;
20 transform: translateZ
(800px)
27 background-color: green
;
29 /* This should theoretically cancel out the container's transform, and hit-testing should work. */
30 transform: translateZ
(-800px);
37 background-color: gray
;
41 background-color: orange
;
51 <script src=
"resources/hit-test-utils.js"></script>
54 { 'point': [98, 200], 'target' : 'background' },
55 { 'point': [302, 200], 'target' : 'background' },
56 { 'point': [200, 98], 'target' : 'background' },
57 { 'point': [200, 302], 'target' : 'background' },
58 { 'point': [101, 200], 'target' : 'layer' },
59 { 'point': [299, 200], 'target' : 'layer' },
60 { 'point': [200, 101], 'target' : 'layer' },
61 { 'point': [200, 299], 'target' : 'layer' },
64 window
.addEventListener('load', runTest
, false);
70 <div id=
"background"></div>
75 The text on this element should be selectable.
76 Hovering on this element should cause a highlight.
81 <div id=
"results"></div>