diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index be08000159..7bdec9607b 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -52,7 +52,8 @@ void StackingContext::paint_descendants(PaintContext& context, Layout::Node& box } box.for_each_child([&](auto& child) { - if (child.establishes_stacking_context()) + // If `child` establishes its own stacking context, skip over it. + if (is(child) && child.paintable() && static_cast(child).paint_box()->stacking_context()) return; bool child_is_inline_or_replaced = child.is_inline() || is(child); switch (phase) {