OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <html> | |
3 <head> | |
4 <style> | |
5 .non-layer-viewport-constrained { | |
6 position: fixed; | |
7 } | |
8 | |
9 .box { | |
10 width: 50px; | |
11 height: 50px; | |
12 } | |
13 | |
14 .container { | |
15 overflow: scroll; | |
16 border: 1px solid black; | |
17 } | |
18 | |
19 .container-element { | |
20 position: relative; | |
21 background-color: blue; | |
22 margin: 10px; | |
23 } | |
24 | |
25 #sibling { | |
26 top: 220px; | |
27 left: 10px; | |
28 background-color: green; | |
29 } | |
30 | |
31 #parent { | |
32 position: absolute; | |
33 left: 10px; | |
34 top: 10px; | |
35 width: 200px; | |
36 height: 200px; | |
37 } | |
38 | |
39 #description { | |
40 position: absolute; | |
41 top: 300px; | |
42 left: 10px; | |
43 } | |
44 | |
45 #console { | |
46 position: absolute; | |
47 top: 290px; | |
48 left: 10px; | |
49 } | |
50 | |
51 </style> | |
52 <script src="../../fast/js/resources/js-test-pre.js"></script> | |
jamesr
2013/08/26 18:17:16
did you forget to include -post.js?
| |
53 <script> | |
54 if (window.testRunner) { | |
55 // Our fixed position element must not be composited; this is a trigger for | |
56 // forcing main thread compositing. | |
57 window.internals.settings.setForceCompositingMode(true); | |
58 window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(f alse); | |
59 window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled( true); | |
60 } | |
61 | |
62 function runTest() { | |
63 if (window.internals) { | |
64 shouldBeUndefined(internals.mainThreadScrollingReasons(document)); | |
65 } else { | |
66 debug("This test requires window.internals."); | |
67 description("This test ensures that when the main frame cannot be " + | |
68 "scrolled, we ignore reasons for scrolling on the main " + | |
69 "thread that only matter when the main frame scrolls"); | |
70 } | |
71 } | |
72 | |
73 window.onload = runTest; | |
74 </script> | |
75 </head> | |
76 <body> | |
77 <div class="non-layer-viewport-constrained box" id="sibling"></div> | |
78 <div class="container" id="parent"> | |
79 <div class="box container-element"></div> | |
80 <div class="box container-element"></div> | |
81 <div class="box container-element"></div> | |
82 <div class="box container-element"></div> | |
83 <div class="box container-element"></div> | |
84 </div> | |
85 </body> | |
86 </html> | |
OLD | NEW |