Pārlūkot izejas kodu

LibWeb: Add const versions of SVGBox::dom_node() and friends

Sam Atkins 3 gadi atpakaļ
vecāks
revīzija
49fe232bc7

+ 1 - 0
Userland/Libraries/LibWeb/Layout/SVGBox.h

@@ -18,6 +18,7 @@ public:
     virtual ~SVGBox() override = default;
 
     SVG::SVGElement& dom_node() { return verify_cast<SVG::SVGElement>(*Box::dom_node()); }
+    SVG::SVGElement const& dom_node() const { return verify_cast<SVG::SVGElement>(*Box::dom_node()); }
 
     virtual void before_children_paint(PaintContext& context, PaintPhase phase) override;
     virtual void after_children_paint(PaintContext& context, PaintPhase phase) override;

+ 1 - 0
Userland/Libraries/LibWeb/Layout/SVGGraphicsBox.h

@@ -18,6 +18,7 @@ public:
     virtual ~SVGGraphicsBox() override = default;
 
     SVG::SVGGraphicsElement& dom_node() { return verify_cast<SVG::SVGGraphicsElement>(SVGBox::dom_node()); }
+    SVG::SVGGraphicsElement const& dom_node() const { return verify_cast<SVG::SVGGraphicsElement>(SVGBox::dom_node()); }
 
     virtual void before_children_paint(PaintContext& context, PaintPhase phase) override;
 };

+ 1 - 0
Userland/Libraries/LibWeb/Layout/SVGPathBox.h

@@ -17,6 +17,7 @@ public:
     virtual ~SVGPathBox() override = default;
 
     SVG::SVGPathElement& dom_node() { return verify_cast<SVG::SVGPathElement>(SVGGraphicsBox::dom_node()); }
+    SVG::SVGPathElement const& dom_node() const { return verify_cast<SVG::SVGPathElement>(SVGGraphicsBox::dom_node()); }
 
     virtual void paint(PaintContext& context, PaintPhase phase) override;