mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:07:35 +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:
parent
a098b6e371
commit
fd3411c868
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue