diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/PaintableBox.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/PaintableBox.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp index a4c65f1b3e..e0685a5b07 100644 --- a/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp +++ b/Userland/Libraries/LibWeb/Painting/PaintableBox.cpp @@ -86,10 +86,8 @@ Painting::StackingContext* PaintableBox::enclosing_stacking_context() if (!is<Layout::Box>(ancestor)) continue; auto& ancestor_box = static_cast<Layout::Box&>(const_cast<Layout::NodeWithStyle&>(*ancestor)); - if (!ancestor_box.establishes_stacking_context()) - continue; - VERIFY(ancestor_box.paint_box()->stacking_context()); - return const_cast<StackingContext*>(ancestor_box.paint_box()->stacking_context()); + if (auto* ancestor_paint_box = ancestor_box.paint_box(); ancestor_paint_box && ancestor_paint_box->stacking_context()) + return const_cast<StackingContext*>(ancestor_paint_box->stacking_context()); } // We should always reach the Layout::InitialContainingBlock stacking context. VERIFY_NOT_REACHED(); |