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