mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +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
Notes:
sideshowbarker
2024-07-17 17:38:29 +09:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/SerenityOS/serenity/commit/fd3411c868 Pull-request: https://github.com/SerenityOS/serenity/pull/21845 Issue: https://github.com/SerenityOS/serenity/issues/21690 Reviewed-by: https://github.com/awesomekling
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…
Reference in a new issue