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