ladybird/Tests/LibWeb/Ref/input/scrolled-text-with-clipped-corners.html
Psychpsyo 85883ee5ce LibWeb: Deduplicate clipping code
This makes it so that PaintableWithLines no longer has its own
bespoke clipping logic, using the same code as regular scroll/
overflow clipping.
2025-05-13 15:30:14 +03:00

42 lines
1.4 KiB
HTML

<!DOCTYPE html>
<link rel="match" href="../expected/scrolled-text-with-clipped-corners-ref.html" />
<style>
* {
scrollbar-width: none;
}
#outer {
/*
This needs to be here so that the text is double-clipped.
This happens in the reference and causes a slight difference
in aliasing around the edges.
*/
width: 300px;
height: 300px;
border-radius: 50%;
overflow: hidden;
}
#container {
width: 300px;
height: 300px;
border-radius: 50%;
overflow: scroll;
font-size: 40px;
}
</style>
<div id="outer">
<div id="container">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut ultrices neque eu nisi facilisis
viverra. Integer lacinia, lacus vel condimentum suscipit, lacus felis porta nulla, eget lacinia
sem neque ut neque. In sagittis, eros vel interdum porta, quam ex rhoncus lectus, vitae suscipit
risus orci sit amet velit. Praesent imperdiet condimentum rutrum. Cras vitae nisl sapien.
Curabitur ligula diam, tincidunt congue tincidunt nec, sodales nec orci. Vestibulum tincidunt
non elit in vehicula. Etiam malesuada neque eu porta rhoncus. Curabitur vel nunc finibus ligula
posuere venenatis.
</div>
</div>
<script>
const scrollContainer = document.getElementById("container");
scrollContainer.scrollTop = 300;
</script>