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