OLD | NEW |
| 1 <!-- Based on fast/repaint/fixed-under-composited-absolute-scrolled.html --> |
1 <!DOCTYPE html> | 2 <!DOCTYPE html> |
2 <script src="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 id='fixed'", |
| 7 ]; |
| 8 function paintInvalidationTest() { |
5 document.getElementById('fixed').style.height = '200px'; | 9 document.getElementById('fixed').style.height = '200px'; |
6 } | 10 } |
7 onload = function() { | 11 onload = function() { |
8 // Scroll before repaint test to test correct scroll offset of invalidation re
ct | 12 // Scroll before repaint test to test correct scroll offset of invalidation re
ct |
9 // for fixed-position element when it needs repaint. | 13 // for fixed-position element when it needs repaint. |
10 window.scrollTo(0, 400); | 14 window.scrollTo(0, 400); |
11 runRepaintTest(); | 15 runPaintInvalidationTest(); |
12 }; | 16 }; |
13 </script> | 17 </script> |
14 <style> | 18 <style> |
15 #indicator { | 19 #indicator { |
16 position: absolute; | 20 position: absolute; |
17 height: 200px; | 21 height: 200px; |
18 width: 100px; | 22 width: 100px; |
19 top: 400px; | 23 top: 400px; |
20 left: 0; | 24 left: 0; |
21 background-color: red; | 25 background-color: red; |
(...skipping 16 matching lines...) Expand all Loading... |
38 background-color: green; | 42 background-color: green; |
39 } | 43 } |
40 </style> | 44 </style> |
41 Tests paint invalidation of fixed element under a composited absolute element on
resize after scrolled. | 45 Tests paint invalidation of fixed element under a composited absolute element on
resize after scrolled. |
42 Passes if there is a 100x200 green rectangle and no red. | 46 Passes if there is a 100x200 green rectangle and no red. |
43 <div id="indicator"></div> | 47 <div id="indicator"></div> |
44 <div id="absolute"> | 48 <div id="absolute"> |
45 <div id="fixed"> | 49 <div id="fixed"> |
46 </div> | 50 </div> |
47 </div> | 51 </div> |
OLD | NEW |