OLD | NEW |
---|---|
(Empty) | |
1 <html> | |
2 <head> | |
3 <style type="text/css"> | |
4 .container | |
5 { | |
6 position: absolute; | |
7 height: 200px; | |
8 width:200px; | |
9 background-color: gray; | |
10 } | |
11 | |
12 .nopreserve { | |
13 top: 0; | |
14 left: 0; | |
15 } | |
16 | |
17 .preserve { | |
18 top: 250px; | |
19 left: 0; | |
20 -webkit-transform-style: preserve-3d; | |
21 -moz-transform-style: preserve-3d; | |
22 } | |
23 | |
24 .box { | |
25 width: 100%; | |
26 position: absolute; | |
27 height: 100%; | |
28 top: 0; | |
29 } | |
30 | |
31 .red { | |
32 background-color: red; | |
33 -webkit-transform: perspective( 600px ) rotateY( 45deg ); | |
34 -moz-transform: perspective( 600px ) rotateY( 45deg ); | |
35 transform: perspective( 600px ) rotateY( 45deg ); | |
36 } | |
37 | |
38 .blue { | |
39 background-color: blue; | |
40 -webkit-transform: perspective( 600px ) rotateY( -45deg ); | |
41 -moz-transform: perspective( 600px ) rotateY( -45deg ); | |
42 transform: perspective( 600px ) rotateY( -45deg ); | |
43 } | |
44 | |
45 /* target1 contain points with negative z-offsets */ | |
46 #target | |
47 { | |
48 position: relative; | |
49 height: 160px; | |
50 width: 160px; | |
51 margin: 20px; | |
52 background-color: #DDD; | |
53 -webkit-transform: rotate3d(0, 1, 0, -45deg); | |
54 -webkit-transform-origin: right; | |
55 } | |
56 | |
57 | |
58 #results { | |
59 margin-top: 460px; | |
60 } | |
61 </style> | |
62 <script src="resources/hit-test-utils.js"></script> | |
63 <script> | |
64 const hitTestData = [ | |
65 | |
66 { 'point': [10, 100], 'target' : 'container-nopreserve' }, | |
67 { 'point': [20, 100], 'target' : 'target2' }, | |
68 { 'point': [80, 100], 'target' : 'target1' }, | |
69 { 'point': [100, 100], 'target' : 'target1' }, | |
70 { 'point': [120, 100], 'target' : 'target1' }, | |
71 { 'point': [180, 100], 'target' : 'target1' }, | |
72 { 'point': [190, 100], 'target' : 'container-nopreserve' }, | |
73 | |
74 { 'point': [10, 250], 'target' : 'container-preserve' }, | |
75 { 'point': [20, 250], 'target' : 'target4' }, | |
76 { 'point': [80, 250], 'target' : 'target4' }, | |
77 { 'point': [100, 250], 'target' : 'target4' }, | |
78 { 'point': [120, 250], 'target' : 'target3' }, | |
79 { 'point': [180, 250], 'target' : 'target3' }, | |
80 { 'point': [190, 250], 'target' : 'container-preserve' }, | |
81 | |
82 ]; | |
83 window.addEventListener('load', runTest, false); | |
84 </script> | |
85 </head> | |
86 <body> | |
87 | |
Julien - ping for review
2013/11/25 03:40:17
We should have a description of what is tested and
| |
88 <div id="container-nopreserve" class="container nopreserve"> | |
89 <div id="target2" class="box red"> | |
90 </div> | |
91 <div id="target1" class="box blue"> | |
92 </div> | |
93 </div> | |
94 | |
95 <div id="container-preserve" class="container preserve"> | |
96 <div id="target3" class="box blue"> | |
97 </div> | |
98 <div id="target4" class="box red"> | |
99 </div> | |
100 </div> | |
101 | |
102 <div id="results"></div> | |
103 | |
104 </body> | |
105 </html> | |
OLD | NEW |