<!doctype html>
<script src="../resources/text-based-repaint.js"></script>
<style>
::-webkit-scrollbar {
width: 12px;
height: 12px;
background: green;
}
</style>
<!-- Checks that paint invalidation for the custom scrollbar of 'target' is computed correctly after scroll of 'scroller'.
The invalidation rects should be correct, and the horizontal & vertical scrollbars should appear in green. -->
<div id="scroller" style="overflow: hidden; width: 300px; height: 300px; backface-visibility: hidden; border: 1px solid black">
<div style="width: 300px; height: 600px"></div>
<div id=target style="width: 100px; height: 100px; background: lightgray; overflow: scroll">
</div>
</div>
<script>
onload = runRepaintTest;
function repaintTest() {
scroller.scrollTop = 400;
}
</script>