| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/run-after-display.js"></script> | 2 <script src="../../fast/repaint/resources/text-based-repaint.js"></script> |
| 3 <div style="width: 200px; height: 200px; transform: translateZ(0); background-co
lor: salmon;"></div> | 3 <div style="width: 200px; height: 200px; transform: translateZ(0); background-co
lor: salmon;"></div> |
| 4 <div style="position: absolute; z-index: 0; top: 8px; width: 100px; height: 100p
x"> | 4 <div style="position: absolute; z-index: 0; top: 8px; width: 100px; height: 100p
x"> |
| 5 <div id="target" style="width: 100px; height: 100px; transform: translateZ(0);
background-color: blue"> | 5 <div id="target" style="width: 100px; height: 100px; transform: translateZ(0);
background-color: blue"> |
| 6 </div> | 6 </div> |
| 7 <pre></pre> | |
| 8 <script> | 7 <script> |
| 9 if (window.internals) | 8 if (window.internals) |
| 10 internals.settings.setLayerSquashingEnabled(true); | 9 internals.settings.setLayerSquashingEnabled(true); |
| 11 | 10 |
| 12 if (window.testRunner) { | 11 function repaintTest() { |
| 13 testRunner.dumpAsText(); | 12 document.querySelector('#target').remove(); |
| 14 testRunner.waitUntilDone(); | |
| 15 } | 13 } |
| 16 | 14 |
| 17 window.addEventListener('load', function() { | 15 runRepaintTest(); |
| 18 runAfterDisplay(function() { | |
| 19 window.internals.startTrackingRepaints(document); | |
| 20 document.querySelector('#target').remove(); | |
| 21 document.querySelector('pre').textContent = | |
| 22 window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCL
UDES_REPAINT_RECTS); | |
| 23 window.internals.stopTrackingRepaints(document); | |
| 24 | |
| 25 if (window.testRunner) | |
| 26 testRunner.notifyDone(); | |
| 27 }); | |
| 28 }); | |
| 29 </script> | 16 </script> |
| OLD | NEW |