OLD | NEW |
| (Empty) |
1 <!DOCTYPE html> | |
2 | |
3 <html> | |
4 <head> | |
5 <style> | |
6 body { | |
7 height: 5000px; | |
8 margin: 0; | |
9 } | |
10 .fixed { | |
11 position: fixed; | |
12 left: 100px; | |
13 top: 100px; | |
14 width: 200px; | |
15 height: 100px; | |
16 background-color: green; | |
17 } | |
18 | |
19 .forcer { | |
20 position: absolute; | |
21 top: 3100px; | |
22 left: 100px; | |
23 height: 100px; | |
24 width: 100px; | |
25 background-color: red; | |
26 -webkit-transform: translateZ(0); | |
27 } | |
28 | |
29 .child { | |
30 position: absolute; | |
31 left: -9000px; | |
32 top: -9000px; | |
33 height: 10px; | |
34 width: 10px; | |
35 background-color: red; | |
36 } | |
37 </style> | |
38 <script> | |
39 if (window.testRunner) { | |
40 testRunner.dumpAsText(); | |
41 testRunner.waitUntilDone(); | |
42 } | |
43 | |
44 function doTest() | |
45 { | |
46 window.scrollTo(0, 3000); | |
47 // Force layout, which updates the fixed layer bounds. | |
48 document.getElementById('layers').innerText = ''; | |
49 if (window.testRunner) { | |
50 document.getElementById('layers').innerText = window.internals.layer
TreeAsText(document); | |
51 testRunner.notifyDone(); | |
52 } | |
53 } | |
54 | |
55 window.addEventListener('load', doTest, false); | |
56 </script> | |
57 </head> | |
58 | |
59 <body> | |
60 <div class="forcer"></div> | |
61 | |
62 <div class="fixed"> | |
63 <div class="child"></div> | |
64 </div> | |
65 | |
66 <pre id="layers">Layer tree goes here in DRT</pre> | |
67 </body> | |
68 </html> | |
69 | |
OLD | NEW |