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).
This commit is contained in:
Jelle Raaijmakers 2025-07-10 11:43:46 +02:00
commit 2998049fe9
Notes: github-actions[bot] 2025-07-11 06:24:49 +00:00
33 changed files with 140 additions and 98 deletions

View file

@ -16,11 +16,11 @@ Viewport <#document> at (0,0) content-size 800x600 children: not-inline
ViewportPaintable (Viewport<#document>) [0,0 800x600]
PaintableWithLines (BlockContainer<HTML>) [0,0 800x52]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x36] overflow: [0,8 792x36]
PaintableWithLines (BlockContainer<DIV>) [8,8 784x36] overflow: [0,8 792x36]
PaintableWithLines (BlockContainer<BODY>) [8,8 784x36]
PaintableWithLines (BlockContainer<DIV>) [8,8 784x36]
PaintableWithLines (BlockContainer(anonymous)) [8,8 784x18]
TextPaintable (TextNode<#text>)
PaintableWithLines (ListItemBox(anonymous)) [24,26 768x18] overflow: [0,26 792x18]
PaintableWithLines (ListItemBox(anonymous)) [24,26 768x18]
MarkerPaintable (ListItemMarkerBox(anonymous)) [0,26.5 12x17]
TextPaintable (TextNode<#text>)
PaintableWithLines (BlockContainer(anonymous)) [8,44 784x0]