| OLD | NEW |
| (Empty) |
| 1 <!-- Based on fast/repaint/fixed-under-composited-absolute-scrolled.html --> | |
| 2 <!DOCTYPE html> | |
| 3 <script src="resources/paint-invalidation-test.js"></script> | |
| 4 <script> | |
| 5 function paintInvalidationTest() { | |
| 6 document.getElementById('fixed').style.height = '200px'; | |
| 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 #indicator { | |
| 17 position: absolute; | |
| 18 height: 200px; | |
| 19 width: 100px; | |
| 20 top: 400px; | |
| 21 left: 0; | |
| 22 background-color: red; | |
| 23 } | |
| 24 #absolute { | |
| 25 position: absolute; | |
| 26 top: 2000px; | |
| 27 width: 1px; | |
| 28 height: 1px; | |
| 29 background-color: red; | |
| 30 backface-visibility: hidden; | |
| 31 z-index: 1000; | |
| 32 } | |
| 33 #fixed { | |
| 34 position: fixed; | |
| 35 top: 0; | |
| 36 left: 0; | |
| 37 width: 100px; | |
| 38 height: 100px; | |
| 39 background-color: green; | |
| 40 } | |
| 41 </style> | |
| 42 Tests paint invalidation of fixed element under a composited absolute element on
resize after scrolled. | |
| 43 Passes if there is a 100x200 green rectangle and no red. | |
| 44 <div id="indicator"></div> | |
| 45 <div id="absolute"> | |
| 46 <div id="fixed"> | |
| 47 </div> | |
| 48 </div> | |
| OLD | NEW |