| Index: LayoutTests/compositing/overflow/selection-gaps-toggling-with-scrolling-contents.html
|
| diff --git a/LayoutTests/compositing/overflow/selection-gaps-toggling-with-scrolling-contents.html b/LayoutTests/compositing/overflow/selection-gaps-toggling-with-scrolling-contents.html
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..f78edaab19a401f096be726744ee7af57a6b7f02
|
| --- /dev/null
|
| +++ b/LayoutTests/compositing/overflow/selection-gaps-toggling-with-scrolling-contents.html
|
| @@ -0,0 +1,76 @@
|
| +<!DOCTYPE html>
|
| +<style>
|
| + #container {
|
| + height: 500px;
|
| + width: 300px;
|
| + overflow: scroll;
|
| + }
|
| +
|
| + .scrolled {
|
| + height: 50px;
|
| + width: 100px;
|
| + background: orange;
|
| + margin: 15px;
|
| + transform: translateZ(0);
|
| + }
|
| +</style>
|
| +<script>
|
| + if (window.testRunner)
|
| + testRunner.dumpAsText();
|
| +
|
| + if (window.internals)
|
| + window.internals.settings.setAcceleratedCompositingForOverflowScrollEnabled(true);
|
| +
|
| + var iteration = 1;
|
| +
|
| + function dumpLayerTree() {
|
| + var pre = document.getElementById("console");
|
| +
|
| + if (window.internals) {
|
| + var layerTreeAsText = internals.layerTreeAsText(document);
|
| + pre.innerHTML += '\n\n*** iteration ' + iteration + ': ***\n\n';
|
| + pre.innerHTML += layerTreeAsText;
|
| + }
|
| +
|
| + iteration++;
|
| + }
|
| +
|
| + onload = function doTest()
|
| + {
|
| + var container = document.getElementById('container');
|
| +
|
| + dumpLayerTree();
|
| +
|
| + container.style.backgroundColor = 'blue';
|
| +
|
| + dumpLayerTree();
|
| +
|
| + var selection = getSelection();
|
| + var range = document.createRange();
|
| + range.selectNode(document.getElementById("selection"));
|
| + selection.addRange(range);
|
| +
|
| + dumpLayerTree();
|
| +
|
| + container.style.backgroundColor = '';
|
| +
|
| + dumpLayerTree();
|
| + }
|
| +</script>
|
| +
|
| +This test passes if the container's scrolling contents layer (the first child of the GraphicsLayer with 4 children)
|
| +draws content only on iterations 2, 3, and 4.
|
| +
|
| +<div id="container">
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled" id="selection">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| + <div class="scrolled">Lorem Ipsum</div>
|
| +</div>
|
| +<pre id="console"></pre>
|
|
|