OLD | NEW |
1 <!-- Based on compositing/overflow/fixed-scroll-in-empty-root-layer.html --> | 1 <!-- Based on compositing/overflow/fixed-scroll-in-empty-root-layer.html --> |
2 <!DOCTYPE html> | 2 <!DOCTYPE html> |
3 <script src="resources/paint-invalidation-test.js"></script> | 3 <script src="resources/paint-invalidation-test.js"></script> |
4 <script> | 4 <script> |
5 window.expectedPaintInvalidationObjects = [ | |
6 "LayoutBlockFlow (positioned) DIV", | |
7 "LayoutBlockFlow (positioned) DIV", | |
8 ]; | |
9 function paintInvalidationTest() { | 5 function paintInvalidationTest() { |
10 window.scrollBy(0, 200); | 6 window.scrollBy(0, 200); |
11 } | 7 } |
12 onload = runPaintInvalidationTest; | 8 onload = runPaintInvalidationTest; |
13 </script> | 9 </script> |
14 <body style="height: 2000px"> | 10 <body style="height: 2000px"> |
15 Tests invalidation of fixed element when scrolled in a page with empty root la
yer. Passes if there is no red. | 11 Tests invalidation of fixed element when scrolled in a page with empty root la
yer. Passes if there is no red. |
16 <div style=" | 12 <div style=" |
17 position: fixed; | 13 position: fixed; |
18 top: 50px; | 14 top: 50px; |
19 left: 0; | 15 left: 0; |
20 width: 100px; | 16 width: 100px; |
21 height: 100px; | 17 height: 100px; |
22 background: green"> | 18 background: green"> |
23 </div> | 19 </div> |
24 <!-- This div makes all of the contents of the page be in sublayers of the roo
t layer, so root layer is empty. --> | 20 <!-- This div makes all of the contents of the page be in sublayers of the roo
t layer, so root layer is empty. --> |
25 <div style=" | 21 <div style=" |
26 position: absolute; | 22 position: absolute; |
27 z-index: -1; | 23 z-index: -1; |
28 backface-visibility: hidden; | 24 backface-visibility: hidden; |
29 top: 250px; | 25 top: 250px; |
30 left: 0; | 26 left: 0; |
31 background-color: red; | 27 background-color: red; |
32 width: 100px; | 28 width: 100px; |
33 height: 100px"> | 29 height: 100px"> |
34 </div> | 30 </div> |
35 </body> | 31 </body> |
OLD | NEW |