3 <title>Point mapping through
3D transforms with origins
</title>
4 <script src=
"point-mapping-helpers.js" type=
"text/javascript" charset=
"utf-8"></script>
6 <script type=
"text/javascript" charset=
"utf-8">
10 // Scroll so that frame view offsets are non-zero
11 // window.scrollTo(
20,
100);
13 // document.getElementById('overflow').scrollLeft =
80;
14 // document.getElementById('overflow').scrollTop =
60;
16 // In non-test mode, show the mouse coords for testing
17 if (!window.testRunner)
18 document.body.addEventListener('mousemove', mousemoved, false);
20 dispatchEvent(
48,
48, 'box1',
6,
6);
21 dispatchEvent(
70,
41, 'box2',
3,
3);
22 dispatchEvent(
185,
164, 'box2',
97,
97);
23 dispatchEvent(
338,
64, 'box7',
3,
3);
24 dispatchEvent(
92,
310, 'box10',
3,
3);
25 dispatchEvent(
217,
444, 'box10',
96,
96);
26 dispatchEvent(
337,
309, 'box13',
2,
2);
27 dispatchEvent(
360,
334, 'box14',
2,
2);
28 dispatchEvent(
500,
484, 'box14',
96,
96);
31 <style type=
"text/css" media=
"screen">
35 border:
1px solid black;
40 display: inline-block;
43 border:
1px solid black;
50 -webkit-box-sizing: border-box;
51 background-color: #DDD;
52 border:
1px solid black;
56 outline:
3px solid orange;
63 border:
1px solid black;
64 -webkit-box-sizing: border-box;
65 -webkit-perspective:
400;
66 -webkit-perspective-origin:
20%
80%;
75 border:
1px solid black;
76 background-color: #AAA;
77 -webkit-box-sizing: border-box;
78 transform: translateZ(
100px) rotateY(-
40deg);
79 -webkit-transform-origin:
20%
40%;
84 background-color: #C0D69E;
88 background-color: blue;
106 <body onclick=
"clicked(event)">
108 <div id=
"results"></div>
111 <!-- Simple transformed div in perpsective -->
112 <div class=
"container box" id=
"box1">
113 <div class=
"transformed box" id=
"box2">
119 <!-- Transformed div in perpsective with non-layer child -->
120 <div class=
"container box" id=
"box5">
121 <div class=
"transformed box" id=
"box6">
122 <div class=
"inner box" id=
"box7">
130 <!-- Transformed div in perpsective with layer child -->
131 <div class=
"container box" id=
"box8">
132 <div class=
"transformed box" id=
"box9">
133 <div class=
"inner box" style=
"position: relative" id=
"box10">
140 <!-- Transformed div in perpsective with child having layer child -->
141 <div class=
"container box" id=
"box11">
142 <div class=
"transformed box" id=
"box12">
143 <div class=
"layer box" id=
"box13">
144 <div class=
"inner box" style=
"position: relative" id=
"box14">
151 <div id=
"mousepos"></div>