1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-15 14:44:58 +00:00
serenity/Tests/LibWeb/Ref/svg-inside-scroll-container.html
Aliaksandr Kalenik d43dbe2842 LibWeb: Shift SVG paintable clip rectangle by scroll offset
Rectangles should be recorded using absolute coordinates, including
the scroll offset.
2024-02-06 13:06:16 +01:00

32 lines
878 B
HTML

<!DOCTYPE html>
<link rel="match" href="reference/svg-inside-scroll-container-ref.html" />
<style>
#scrollable {
height: 300px;
overflow: scroll;
}
svg {
display: block;
}
</style>
<div id="scrollable">
<svg width="100" height="100">
<rect width="100" height="100" fill="green" />
</svg>
<svg width="100" height="100">
<rect width="100" height="100" fill="green" />
</svg>
<svg width="100" height="100">
<rect width="100" height="100" fill="green" />
</svg>
<svg width="100" height="100">
<rect width="100" height="100" fill="green" />
</svg>
<svg width="100" height="100">
<rect width="100" height="100" fill="green" />
</svg>
</div>
<script>
const scrollContainer = document.getElementById("scrollable");
scrollContainer.scrollTop = 100;
</script>