OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 /* To ensure full viewport repaint when viewport is resized. */ |
| 4 body { |
| 5 background-image: linear-gradient(red, blue); |
| 6 background-attachment: fixed; |
| 7 margin: 0; |
| 8 } |
| 9 #container { |
| 10 width: 200px; |
| 11 height: 200px; |
| 12 border: 1px solid black; |
| 13 overflow: scroll; |
| 14 } |
| 15 #child { |
| 16 width: 100px; |
| 17 height: 100px; |
| 18 } |
| 19 </style> |
| 20 <script src="resources/text-based-repaint.js" type="text/javascript"></script> |
| 21 <script> |
| 22 if (window.testRunner) { |
| 23 testRunner.useUnfortunateSynchronousResizeMode(); |
| 24 } |
| 25 function repaintTest() { |
| 26 // Invalidation of horizontal scrollbar should be tracked. |
| 27 document.getElementById('child').style.width = '2000px'; |
| 28 } |
| 29 window.onload = function() { |
| 30 // Trigger a full viewport repaint to test if scrollbar damages are cleared |
| 31 // even if we shortcut children invalidations. |
| 32 window.resizeTo(1000, 600); |
| 33 // Invalidation of vertical scrollbar before the repaint test should not be
tracked during repaintTest(). |
| 34 document.getElementById('child').style.height = '2000px'; |
| 35 runRepaintTest(); |
| 36 }; |
| 37 </script> |
| 38 <div style="height: 50px"> |
| 39 Tests if scrollbar damage flag is cleared during a full viewport invalidation. |
| 40 Passes if the result repaint rects contain the horizontal scrollbar but not the
vertical scrollbar. |
| 41 </div> |
| 42 <div id="container"> |
| 43 <div id="child"></div> |
| 44 </div> |
OLD | NEW |