Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- Manifest: layout/reftests/scrolling/reftest.list
<!DOCTYPE html>
<html class="reftest-no-flush reftest-wait" reftest-no-sync-layers>
<style>
body {
margin: 0;
}
</style>
<div style="position: absolute; left: 0; top: 0;">
<div id="scroller" style="position: absolute; overflow: auto; scrollbar-width: none; width: 100px; height: 100px;">
<div style="width: 1px; height: 50px;"></div>
<div style="width: 50px; height: 50px; background: blue; anchor-name: --my-anchor;"></div>
<div style="width: 1px; height: 500px;"></div>
</div>
<div style="position: absolute; position-anchor: --my-anchor; width: 50px; height: 50px; background: yellow; left: anchor(right); top: anchor(bottom); position-visibility: always;">
</div>
<script>
window.addEventListener("MozReftestInvalidate", async () => {
scroller.scrollTop = 5;
document.documentElement.classList.remove("reftest-wait");
});
</script>
</html>