From c3841e1667083c4516ed37ccc72d10ee64fa4cf8 Mon Sep 17 00:00:00 2001 From: MacDue Date: Sat, 24 Sep 2022 14:30:00 +0100 Subject: [PATCH] LibWeb: Restore clipping of positioned descendants 63c727a was meant to stop clipping absolutely positioned descendants, but used `is_positioned()` rather than `is_absolutely_positioned()`, which meant it disabled clipping in many more cases that it should have. --- Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index ac46da40da..6c600857d1 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -135,7 +135,7 @@ void StackingContext::paint_internal(PaintContext& context) const auto paint_child = [&](auto* child) { auto parent = child->m_box.parent(); - auto should_clip_overflow = child->m_box.is_positioned() ? Paintable::ShouldClipOverflow::No : Paintable::ShouldClipOverflow::Yes; + auto should_clip_overflow = child->m_box.is_absolutely_positioned() ? Paintable::ShouldClipOverflow::No : Paintable::ShouldClipOverflow::Yes; auto* paintable = parent ? parent->paintable() : nullptr; if (paintable) paintable->before_children_paint(context, PaintPhase::Foreground, should_clip_overflow);