From b7d2f6fa886c234501ece8c7dbd98f86817e3ec7 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 29 May 2023 17:57:27 +0200 Subject: [PATCH] LibWeb: Clip overflow in descendant boxes for non-visible CSS overflow We were only clipping for hidden, when we should be clipping for hidden, clip, scroll and auto. Basically everything but visible. :^) --- Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index e358622e3a..4583936d0a 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -327,7 +327,7 @@ Optional PaintableBox::calculate_overflow_clipped_rect() const auto overflow_x = computed_values().overflow_x(); auto overflow_y = computed_values().overflow_y(); - if (overflow_x == CSS::Overflow::Hidden && overflow_y == CSS::Overflow::Hidden) { + if (overflow_x != CSS::Overflow::Visible && overflow_y != CSS::Overflow::Visible) { if (m_clip_rect.has_value()) { m_clip_rect->intersect(absolute_padding_box_rect()); } else {