OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <div style="height:200px;width:600px;overflow:scroll"> |
| 3 <div style="position:relative"> |
| 4 <div style="height:400px;margin-bottom:-400px;position:relative"> |
| 5 <div id="chip" style="width:50px;height:50px;position:absolute;background:
lightblue;margin:0"></div> |
| 6 </div> |
| 7 </div> |
| 8 </div> |
| 9 |
| 10 <div id="testResults" style="display:none"> |
| 11 <pre id="output"></pre> |
| 12 </div> |
| 13 <script> |
| 14 // Test that moving a div in this situation generates the correct repaint invali
daitons before and after |
| 15 // the move. |
| 16 if (window.testRunner) { |
| 17 testRunner.dumpAsText(); |
| 18 testRunner.waitUntilDone(); |
| 19 window.internals.settings.setLayerSquashingEnabled(true); |
| 20 } |
| 21 setTimeout(function() { |
| 22 if (window.internals) |
| 23 window.internals.startTrackingRepaints(document); |
| 24 |
| 25 document.getElementById('chip').style.left = "400px"; |
| 26 var data = window.internals.layerTreeAsText(document, internals.LAYER_TREE_I
NCLUDES_REPAINT_RECTS); |
| 27 window.internals.stopTrackingRepaints(document); |
| 28 |
| 29 document.getElementById('output').textContent = data; |
| 30 |
| 31 document.getElementById('testResults').style.display = "block"; |
| 32 |
| 33 if (window.testRunner) |
| 34 testRunner.notifyDone(); |
| 35 }, 400); |
| 36 </script> |
OLD | NEW |