mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-28 11:49:44 +00:00
LibWeb: Stop zero-area children from causing scrollable overflow
This commit is contained in:
parent
efcaf991e6
commit
1d44df74f7
Notes:
github-actions[bot]
2024-11-24 10:11:48 +00:00
Author: https://github.com/Psychpsyo
Commit: 1d44df74f7
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2520
37 changed files with 67 additions and 53 deletions
|
@ -109,6 +109,10 @@ static CSSPixelRect measure_scrollable_overflow(Box const& box)
|
|||
|
||||
auto child_border_box = child.paintable_box()->absolute_border_box_rect();
|
||||
|
||||
// Border boxes with zero area do not affect the scrollable overflow area.
|
||||
if (child_border_box.is_empty())
|
||||
return TraversalDecision::Continue;
|
||||
|
||||
// NOTE: Here we check that the child is not wholly in the negative scrollable overflow region.
|
||||
if (child_border_box.bottom() < 0 || child_border_box.right() < 0)
|
||||
return TraversalDecision::Continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue