ladybird/Tests/LibWeb/Text/input/scrollable-viewport-unreachable-overflow.html
Jelle Raaijmakers 2998049fe9 LibWeb: Implement the unreachable scrollable overflow
Whenever we end up with a scrollable overflow rect that goes beyond
either of its axes (i.e. the rect has a negative X or Y position
relative to its parent's absolute padding box position), we need to clip
that rect to prevent going into the "unreachable scrollable overflow".

This fixes the horizontal scrolling on https://ladybird.org (gets more
pronounced if you make the window very narrow).
2025-07-11 08:23:46 +02:00

18 lines
378 B
HTML

<!DOCTYPE html>
<script src="include.js"></script>
<style>
.a {
border: 1px solid green;
height: 50px;
position: absolute;
right: 0;
width: 1000px;
}
</style>
<div class="a"></div>
<script>
test(() => {
// scrollWidth must not exceed the viewport size (800px)
println(`html scrollWidth: ${document.querySelector('html').scrollWidth}`);
});
</script>