LibWeb: Add more fast_is<T> helpers for layout and paintable nodes

This commit is contained in:
Andreas Kling 2025-04-18 10:28:46 +02:00 committed by Andreas Kling
commit 877391d569
Notes: github-actions[bot] 2025-04-18 12:47:24 +00:00
4 changed files with 20 additions and 0 deletions

View file

@ -23,6 +23,12 @@ public:
SVG::SVGGraphicsElement const& dom_node() const { return as<SVG::SVGGraphicsElement>(SVGBox::dom_node()); }
virtual GC::Ptr<Painting::Paintable> create_paintable() const override;
private:
virtual bool is_svg_graphics_box() const override { return true; }
};
template<>
inline bool Node::fast_is<SVGGraphicsBox>() const { return is_svg_graphics_box(); }
}