OLD | NEW |
| (Empty) |
1 <!-- Based on fast/repaint/fixed-under-composited-fixed-scrolled.html --> | |
2 <!DOCTYPE html> | |
3 <script src="resources/paint-invalidation-test.js"></script> | |
4 <script> | |
5 function paintInvalidationTest() { | |
6 document.getElementById('fixed').style.display = 'none'; | |
7 } | |
8 onload = function() { | |
9 // Scroll before repaint test to test correct scroll offset of invalidation re
ct | |
10 // for fixed-position element when it needs repaint. | |
11 window.scrollTo(0, 400); | |
12 runPaintInvalidationTest(); | |
13 }; | |
14 </script> | |
15 <style> | |
16 body { | |
17 height: 2000px; | |
18 } | |
19 #fixed-container { | |
20 position: fixed; | |
21 top: 0; | |
22 left: 0; | |
23 width: 100%; | |
24 height: 100%; | |
25 background-color: green; | |
26 backface-visibility: hidden; | |
27 } | |
28 #fixed { | |
29 position: fixed; | |
30 top: 100px; | |
31 left: 100px; | |
32 width: 200px; | |
33 height: 200px; | |
34 background-color: red; | |
35 } | |
36 </style> | |
37 Tests paint invalidation of fixed elements under a composited fixed element afte
r scrolled. | |
38 Passes if there is only green background. | |
39 <div id="fixed-container"> | |
40 <div id="fixed"></div> | |
41 </div> | |
OLD | NEW |