From 055a1998c1f73777589dca0bc7d2fb9698ee302e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 23 Oct 2022 17:59:32 +0200 Subject: [PATCH] LibWeb: StackingContext::paint_descendants() can take const layout node It doesn't mutate the layout tree in any way. --- Userland/Libraries/LibWeb/Painting/StackingContext.cpp | 2 +- Userland/Libraries/LibWeb/Painting/StackingContext.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp index 0dccc21b21..ce8f51501b 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.cpp +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.cpp @@ -69,7 +69,7 @@ static PaintPhase to_paint_phase(StackingContext::StackingContextPaintPhase phas } } -void StackingContext::paint_descendants(PaintContext& context, Layout::Node& box, StackingContextPaintPhase phase) const +void StackingContext::paint_descendants(PaintContext& context, Layout::Node const& box, StackingContextPaintPhase phase) const { if (auto* paintable = box.paintable()) paintable->before_children_paint(context, to_paint_phase(phase), Paintable::ShouldClipOverflow::Yes); diff --git a/Userland/Libraries/LibWeb/Painting/StackingContext.h b/Userland/Libraries/LibWeb/Painting/StackingContext.h index b06bec939e..0fc7173c2a 100644 --- a/Userland/Libraries/LibWeb/Painting/StackingContext.h +++ b/Userland/Libraries/LibWeb/Painting/StackingContext.h @@ -30,7 +30,7 @@ public: FocusAndOverlay, }; - void paint_descendants(PaintContext&, Layout::Node&, StackingContextPaintPhase) const; + void paint_descendants(PaintContext&, Layout::Node const&, StackingContextPaintPhase) const; void paint(PaintContext&) const; Optional hit_test(Gfx::FloatPoint const&, HitTestType) const;