mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-03-29 16:58:04 +00:00
LibWeb: Ignore document's box during overflow clip rect calculation
Reduction of bug:
```html
<!DOCTYPE html><style>
html {
overflow-x: hidden;
overflow-y: scroll;
}
div {
background: orange;
height: 1000px;
width: 500px;
}
</style><body><div>
```
Fixes https://github.com/SerenityOS/serenity/issues/21690 and painting
on many other websites (null.com, servo.org).
This commit is contained in:
committed by
Andreas Kling
parent
a098b6e371
commit
fd3411c868
@@ -406,6 +406,10 @@ BorderRadiiData PaintableBox::normalized_border_radii_data(ShrinkRadiiForBorders
|
||||
|
||||
Optional<CSSPixelRect> PaintableBox::calculate_overflow_clipped_rect() const
|
||||
{
|
||||
if (layout_node().is_viewport()) {
|
||||
return {};
|
||||
}
|
||||
|
||||
if (!m_clip_rect.has_value()) {
|
||||
// NOTE: stacking context should not be crossed while aggregating rectangle to
|
||||
// clip `overflow: hidden` because intersecting rectangles with different
|
||||
|
||||
Reference in New Issue
Block a user