blob: f5f9d86f662b38aee3f3edd2046a215649661665 [file] [log] [blame]
<!DOCTYPE HTML>
<!--
This test checks that when overlay scrollbars are repositioned due to
accelerated overflow scrolling, that their position accounts for any
intervening, composited ancestors. The test is working correctly if the
scrollbars are correctly positioned on top of the scroller and the scrolled
contents.
-->
<style>
#scroller {
overflow: scroll;
width: 100px;
height: 100px;
border: 1px solid black;
}
.scrolled {
background: blue;
width: 60px;
height: 40px;
margin: 4px;
position: relative;
}
#fixed {
background: green;
position: fixed;
left: 60px;
top: 60px;
width: 80px;
height: 80px;
}
#intervening {
background: papayawhip;
width: 300px;
height: 300px;
backface-visibility: hidden;
margin: 90px;
}
</style>
<div id="intervening">
<div id="scroller">
<div id="fixed"></div>
<div class="scrolled"></div>
<div class="scrolled"></div>
<div class="scrolled"></div>
<div class="scrolled"></div>
</div>
</div>
<script>
if (window.internals) {
window.internals.runtimeFlags.overlayScrollbarsEnabled = true;
window.internals.settings.setPreferCompositingToLCDTextEnabled(true);
}
if (window.testRunner)
window.testRunner.dumpAsTextWithPixelResults();
onload = function() {
if (window.internals && window.testRunner)
window.testRunner.setCustomTextOutput(window.internals.layerTreeAsText(document));
};
</script>