diff options
Diffstat (limited to 'Userland/Libraries/LibWeb/Painting/StackingContext.cpp')
-rw-r--r-- | Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index c79bda6708..67a9bfe01b 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -47,8 +47,8 @@ StackingContext::StackingContext(Layout::Box& box, StackingContext* parent) void StackingContext::paint_descendants(PaintContext& context, Layout::Node& box, StackingContextPaintPhase phase) const { if (phase == StackingContextPaintPhase::Foreground) { - if (box.is_box()) - static_cast<Layout::Box const&>(box).m_paint_box->before_children_paint(context, PaintPhase::Foreground); + if (auto* paintable = box.paintable()) + paintable->before_children_paint(context, PaintPhase::Foreground); } box.for_each_child([&](auto& child) { @@ -100,8 +100,8 @@ void StackingContext::paint_descendants(PaintContext& context, Layout::Node& box }); if (phase == StackingContextPaintPhase::Foreground) { - if (box.is_box()) - static_cast<Layout::Box const&>(box).m_paint_box->after_children_paint(context, PaintPhase::Foreground); + if (auto* paintable = box.paintable()) + paintable->after_children_paint(context, PaintPhase::Foreground); } } |