OLD | NEW |
1 <html> | 1 <html> |
2 <!-- This test reproduces a divide-by-zero error that is hopefully fixed by | 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 | 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 resul
t, when | 4 translated by z so that it is coplanar with the camera origin. As a resul
t, when |
5 trying to project a point from the container space to the local space, th
e | 5 trying to project a point from the container space to the local space, th
e |
6 implementation had a divide-by-zero which made hit-testing results incorr
ect. --> | 6 implementation had a divide-by-zero which made hit-testing results incorr
ect. --> |
7 | 7 |
8 <head> | 8 <head> |
9 <style type="text/css"> | 9 <style type="text/css"> |
10 /* Marquee content. */ | 10 /* Marquee content. */ |
11 #camera { | 11 #camera { |
12 position: absolute; | 12 position: absolute; |
13 top: 100px; | 13 top: 100px; |
14 left: 100px; | 14 left: 100px; |
15 -webkit-perspective: 800px; | 15 -webkit-perspective: 800px; |
16 } | 16 } |
17 | 17 |
18 #container { | 18 #container { |
19 -webkit-transform-style: preserve-3d; | 19 -webkit-transform-style: preserve-3d; |
20 -webkit-transform: translateZ(800px) | 20 transform: translateZ(800px) |
21 } | 21 } |
22 | 22 |
23 #layer { | 23 #layer { |
24 position: absolute; | 24 position: absolute; |
25 width: 200px; | 25 width: 200px; |
26 height: 200px; | 26 height: 200px; |
27 background-color: green; | 27 background-color: green; |
28 | 28 |
29 /* This should theoretically cancel out the container's transform, and h
it-testing should work. */ | 29 /* This should theoretically cancel out the container's transform, and h
it-testing should work. */ |
30 -webkit-transform: translateZ(-800px); | 30 transform: translateZ(-800px); |
31 } | 31 } |
32 | 32 |
33 #background { | 33 #background { |
34 position: absolute; | 34 position: absolute; |
35 width: 400px; | 35 width: 400px; |
36 height: 400px; | 36 height: 400px; |
37 background-color: gray; | 37 background-color: gray; |
38 } | 38 } |
39 | 39 |
40 #layer:hover { | 40 #layer:hover { |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 The text on this element should be selectable. | 75 The text on this element should be selectable. |
76 Hovering on this element should cause a highlight. | 76 Hovering on this element should cause a highlight. |
77 </div> | 77 </div> |
78 </div> | 78 </div> |
79 </div> | 79 </div> |
80 | 80 |
81 <div id="results"></div> | 81 <div id="results"></div> |
82 | 82 |
83 </body> | 83 </body> |
84 </html> | 84 </html> |
OLD | NEW |