浏览代码

LibWeb: StackingContext::paint_descendants() can take const layout node

It doesn't mutate the layout tree in any way.
Andreas Kling 2 年之前
父节点
当前提交
055a1998c1

+ 1 - 1
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);

+ 1 - 1
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<HitTestResult> hit_test(Gfx::FloatPoint const&, HitTestType) const;