| OLD | NEW |
| (Empty) |
| 1 <!-- Based on fast/repaint/fixed-child-of-transformed-scrolled.html --> | |
| 2 <!DOCTYPE html> | |
| 3 <script src="resources/paint-invalidation-test.js"></script> | |
| 4 <script> | |
| 5 function paintInvalidationTest() { | |
| 6 document.getElementById('fixed').style.backgroundColor = 'green'; | |
| 7 } | |
| 8 onload = function() { | |
| 9 document.getElementById('transformed').scrollTop = 50; | |
| 10 runPaintInvalidationTest(); | |
| 11 } | |
| 12 </script> | |
| 13 <style> | |
| 14 #transformed { | |
| 15 position: absolute; | |
| 16 top: 50px; | |
| 17 left: 100px; | |
| 18 transform: translateX(0); | |
| 19 overflow: scroll; | |
| 20 width: 300px; | |
| 21 height: 300px; | |
| 22 } | |
| 23 #fixed { | |
| 24 position: fixed; | |
| 25 top: 150px; | |
| 26 left: 100px; | |
| 27 width: 100px; | |
| 28 height: 100px; | |
| 29 background-color: red; | |
| 30 } | |
| 31 /* to make the transformed container scrollable */ | |
| 32 #content { | |
| 33 width: 1000px; | |
| 34 height: 1000px; | |
| 35 } | |
| 36 </style> | |
| 37 Tests invalidation of a fixed-position child of a transformed scrolled element. | |
| 38 Passes if there is a green box at the center of the scrollable area. | |
| 39 <div id="transformed"> | |
| 40 <div id="fixed"></div> | |
| 41 <div id="content"></div> | |
| 42 </div> | |
| OLD | NEW |