1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:37:35 +00:00

LibWeb: Add fast_is<SVG::SVGSVGElement>()

This commit is contained in:
Andreas Kling 2022-03-12 16:08:40 +01:00
parent 8c91e8016c
commit b6097cf724
2 changed files with 10 additions and 0 deletions

View file

@ -75,6 +75,7 @@ public:
virtual bool requires_svg_container() const { return false; }
virtual bool is_svg_container() const { return false; }
virtual bool is_svg_svg_element() const { return false; }
bool in_a_document_tree() const;

View file

@ -28,9 +28,18 @@ public:
Optional<ViewBox> const& view_box() const { return m_view_box; }
private:
virtual bool is_svg_svg_element() const override { return true; }
virtual void parse_attribute(FlyString const& name, String const& value) override;
Optional<ViewBox> m_view_box;
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<SVG::SVGSVGElement>() const { return is_svg_svg_element(); }
}