| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <style> | 2 <style> |
| 3 .mv-tile{ | 3 .mv-tile{ |
| 4 display:inline-block; | 4 display:inline-block; |
| 5 height:50px; | 5 height:50px; |
| 6 position:relative; | 6 position:relative; |
| 7 width:100px; | 7 width:100px; |
| 8 margin-right:410px; | 8 margin-right:410px; |
| 9 } | 9 } |
| 10 </style> | 10 </style> |
| 11 <div style="position: absolute; width: 1000px; height: 1000px; transform: transl
ateZ(0)"></div> | 11 <div style="position: absolute; width: 1000px; height: 1000px; transform: transl
ateZ(0)"></div> |
| 12 <div id="container"> | 12 <div id="container"> |
| 13 <div class="mv-tile" id="foo"></div> | 13 <div class="mv-tile" id="foo"></div> |
| 14 <div class="mv-tile" style="background-color: lightblue;"></div> | 14 <div class="mv-tile" style="background-color: lightblue;"></div> |
| 15 </div> | 15 </div> |
| 16 <div class="mv-tile" style="width: 1000px"></div> | 16 <div class="mv-tile" style="width: 1000px"></div> |
| 17 <script src="../../resources/run-after-display.js"></script> | 17 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| 18 <script> | 18 <script> |
| 19 // This test verifies that a paint invalidation is correctly issued for both the
old and new location of | 19 // This test verifies that a paint invalidation is correctly issued for both the
old and new location of |
| 20 // the mv-tile element which is *not* removed from the DOM, but nevertheless mov
es to the left as the other one | 20 // the mv-tile element which is *not* removed from the DOM, but nevertheless mov
es to the left as the other one |
| 21 // is removed. | 21 // is removed. |
| 22 | 22 |
| 23 if (window.testRunner) { | 23 function repaintTest() { |
| 24 testRunner.dumpAsText(); | 24 document.querySelector("#foo").remove(); |
| 25 testRunner.waitUntilDone(); | |
| 26 } | 25 } |
| 27 runAfterDisplay(function() { | |
| 28 if (window.internals) | |
| 29 window.internals.startTrackingRepaints(document); | |
| 30 | 26 |
| 31 document.querySelector("#foo").remove(); | 27 runRepaintTest(); |
| 32 | |
| 33 if (window.internals) { | |
| 34 testRunner.setCustomTextOutput(window.internals.layerTreeAsText(document
, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS)); | |
| 35 window.internals.stopTrackingRepaints(document); | |
| 36 } | |
| 37 | |
| 38 if (window.testRunner) | |
| 39 testRunner.notifyDone(); | |
| 40 }); | |
| 41 | 28 |
| 42 </script> | 29 </script> |
| OLD | NEW |