summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2023-05-29 17:57:27 +0200
committerAndreas Kling <kling@serenityos.org>2023-06-01 13:33:35 +0200
commitb7d2f6fa886c234501ece8c7dbd98f86817e3ec7 (patch)
tree192b58808ccc27146e46557cd762fda0a50514c7 /Userland/Libraries/LibWeb
parent4ff52cebc4570662cf5a2b01d5b9cfc3369bd8f0 (diff)
downloadserenity-b7d2f6fa886c234501ece8c7dbd98f86817e3ec7.zip
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. :^)
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/Painting/PaintableBox.cpp2
1 files changed, 1 insertions, 1 deletions
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<CSSPixelRect> 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 {