OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <script src="../resources/text-based-repaint.js"></script> | 2 <script src="../resources/text-based-repaint.js"></script> |
3 <script> | 3 <script> |
4 function repaintTest() { | 4 function repaintTest() { |
5 window.scrollBy(0, 200); | 5 window.scrollBy(0, 200); |
6 } | 6 } |
7 onload = runRepaintAndPixelTest; | 7 onload = runRepaintAndPixelTest; |
8 </script> | 8 </script> |
9 <body style="height: 2000px"> | 9 <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. | 10 Tests invalidation of fixed element when scrolled in a page with empty root la
yer. Passes if there is no red. |
11 <!-- Using 99% opacity on fixed pos element to ensure it is not automatically
promoted. --> | |
12 <div style=" | 11 <div style=" |
13 position: fixed; | 12 position: fixed; |
14 opacity: 0.99; | |
15 top: 50px; | 13 top: 50px; |
16 left: 0; | 14 left: 0; |
17 width: 100px; | 15 width: 100px; |
18 height: 100px; | 16 height: 100px; |
19 background: green"> | 17 background: green"> |
20 </div> | 18 </div> |
21 <!-- This div makes all of the contents of the page be in sublayers of the roo
t layer, so root layer is empty. --> | 19 <!-- This div makes all of the contents of the page be in sublayers of the roo
t layer, so root layer is empty. --> |
22 <div style=" | 20 <div style=" |
23 position: absolute; | 21 position: absolute; |
24 z-index: -1; | 22 z-index: -1; |
25 backface-visibility: hidden; | 23 backface-visibility: hidden; |
26 top: 250px; | 24 top: 250px; |
27 left: 0; | 25 left: 0; |
28 background-color: red; | 26 background-color: red; |
29 width: 100px; | 27 width: 100px; |
30 height: 100px"> | 28 height: 100px"> |
31 </div> | 29 </div> |
32 </body> | 30 </body> |
OLD | NEW |