Chromium Code Reviews| 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"> | |
|
ojan
2014/06/02 05:29:06
Why have the extra outer div? Why not just put the
chrishtr
2014/06/02 16:22:32
Done.
| |
| 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. | |
|
ojan
2014/06/02 05:29:06
This comment doesn't really say anything that isn'
chrishtr
2014/06/02 16:22:32
Done.
| |
| 16 if (window.testRunner) { | |
| 17 testRunner.dumpAsText(); | |
| 18 testRunner.waitUntilDone(); | |
| 19 window.internals.settings.setLayerSquashingEnabled(true); | |
| 20 } | |
| 21 setTimeout(function() { | |
|
ojan
2014/06/02 05:29:06
Why the setTimeout? setTimeouts lead to slow/flaky
chrishtr
2014/06/02 16:22:32
Done.
| |
| 22 if (window.internals) | |
|
ojan
2014/06/02 05:29:06
Having this if-check, but not checking it in the o
chrishtr
2014/06/02 16:22:32
Done.
| |
| 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 |