| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/run-after-layout-and-paint.js"></script> | 2 <script src="../../resources/run-after-layout-and-paint.js"></script> |
| 3 <script src="resources/text-based-repaint.js"></script> | 3 <script src="resources/text-based-repaint.js"></script> |
| 4 <script> | 4 <script> |
| 5 function repaintTest() { | 5 function repaintTest() { |
| 6 getSelection().removeAllRanges(); | 6 getSelection().removeAllRanges(); |
| 7 } | 7 } |
| 8 onload = function() { | 8 onload = function() { |
| 9 getSelection().selectAllChildren(document.getElementById('div')); | 9 getSelection().selectAllChildren(document.getElementById('div')); |
| 10 runAfterLayoutAndPaint(function() { | 10 runAfterLayoutAndPaint(function() { |
| 11 document.getElementById('div').style.top = '300px'; | 11 document.getElementById('div').style.top = '300px'; |
| 12 runRepaintTest(); | 12 runRepaintAndPixelTest(); |
| 13 }); | 13 }); |
| 14 }; | 14 }; |
| 15 </script> | 15 </script> |
| 16 <style> | 16 <style> |
| 17 img { | 17 img { |
| 18 vertical-align: text-bottom; | 18 vertical-align: text-bottom; |
| 19 width: 50px; | 19 width: 50px; |
| 20 height: 50px; | 20 height: 50px; |
| 21 } | 21 } |
| 22 div { | 22 div { |
| 23 position: absolute; | 23 position: absolute; |
| 24 top: 100px; | 24 top: 100px; |
| 25 left: 100px; | 25 left: 100px; |
| 26 } | 26 } |
| 27 </style> | 27 </style> |
| 28 Tests paint invalidation of selection when its cleared after the container is mo
ved.<br> | 28 Tests paint invalidation of selection when its cleared after the container is mo
ved.<br> |
| 29 Passes if no selection left. | 29 Passes if no selection left. |
| 30 <div id="div"> | 30 <div id="div"> |
| 31 <img></img> | 31 <img></img> |
| 32 </div> | 32 </div> |
| OLD | NEW |