Chromium Code Reviews| Index: LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
| diff --git a/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html b/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e929bfaee2759e5cdf4e4dbb3c884465cab9a81a |
| --- /dev/null |
| +++ b/LayoutTests/compositing/squashing/invalidations-with-large-negative-margin.html |
| @@ -0,0 +1,36 @@ |
| +<!DOCTYPE html> |
| +<div style="height:200px;width:600px;overflow:scroll"> |
| + <div style="position:relative"> |
| + <div style="height:400px;margin-bottom:-400px;position:relative"> |
| + <div id="chip" style="width:50px;height:50px;position:absolute;background:lightblue;margin:0"></div> |
| + </div> |
| + </div> |
| +</div> |
| + |
| +<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.
|
| + <pre id="output"></pre> |
| +</div> |
| +<script> |
| +// Test that moving a div in this situation generates the correct repaint invalidaitons before and after |
| +// 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.
|
| +if (window.testRunner) { |
| + testRunner.dumpAsText(); |
| + testRunner.waitUntilDone(); |
| + window.internals.settings.setLayerSquashingEnabled(true); |
| +} |
| +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.
|
| + 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.
|
| + window.internals.startTrackingRepaints(document); |
| + |
| + document.getElementById('chip').style.left = "400px"; |
| + var data = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS); |
| + window.internals.stopTrackingRepaints(document); |
| + |
| + document.getElementById('output').textContent = data; |
| + |
| + document.getElementById('testResults').style.display = "block"; |
| + |
| + if (window.testRunner) |
| + testRunner.notifyDone(); |
| +}, 400); |
| +</script> |