mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 04:39:06 +00:00
LibWeb: Ignore boxes wholly in the negative scrollable overflow region
This fixes an issue where https://hey.com/ was horizontally scrollable even though it shouldn't be.
This commit is contained in:
parent
15e7aaee1a
commit
94721385ce
Notes:
github-actions[bot]
2024-10-08 12:34:26 +00:00
Author: https://github.com/awesomekling
Commit: 94721385ce
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1677
3 changed files with 23 additions and 4 deletions
|
@ -105,11 +105,13 @@ static CSSPixelRect measure_scrollable_overflow(Box const& box)
|
|||
return IterationDecision::Continue;
|
||||
|
||||
auto child_border_box = child.paintable_box()->absolute_border_box_rect();
|
||||
|
||||
// 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) {
|
||||
scrollable_overflow_rect = scrollable_overflow_rect.united(child_border_box);
|
||||
content_overflow_rect = content_overflow_rect.united(child_border_box);
|
||||
}
|
||||
if (child_border_box.bottom() < 0 || child_border_box.right() < 0)
|
||||
return IterationDecision::Continue;
|
||||
|
||||
scrollable_overflow_rect = scrollable_overflow_rect.united(child_border_box);
|
||||
content_overflow_rect = content_overflow_rect.united(child_border_box);
|
||||
|
||||
// - The scrollable overflow areas of all of the above boxes
|
||||
// (including zero-area boxes and accounting for transforms as described above),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue