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