Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="reftest-wait">
<link rel="help" href="https://crbug.com/385704990">
<link rel="match" href="clipped-scroller-add-content-ref.html">
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
<div style="height: 300px; overflow: hidden">
<div style="height: 20px"></div>
<div id="scroller" style="height: 300px; overflow: scroll">
<div id="content" style="position: relative; display: none;
width: 300px; height: 400px; background: red">
<div style="height: 300px; background: green"></div>
<div style="height: 100px; background: green"></div>
</div>
</div>
</div>
<script>
waitForAtLeastOneFrame().then(() => {
content.style.display = 'block';
waitForAtLeastOneFrame().then(() => {
scroller.scrollTo(0, 100);
takeScreenshot();
});
});
</script>