mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:07:45 +00:00
LibWeb: Add fast_is<SVG::SVGSVGElement>()
This commit is contained in:
parent
8c91e8016c
commit
b6097cf724
2 changed files with 10 additions and 0 deletions
|
@ -75,6 +75,7 @@ public:
|
||||||
|
|
||||||
virtual bool requires_svg_container() const { return false; }
|
virtual bool requires_svg_container() const { return false; }
|
||||||
virtual bool is_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;
|
bool in_a_document_tree() const;
|
||||||
|
|
||||||
|
|
|
@ -28,9 +28,18 @@ public:
|
||||||
Optional<ViewBox> const& view_box() const { return m_view_box; }
|
Optional<ViewBox> const& view_box() const { return m_view_box; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
virtual bool is_svg_svg_element() const override { return true; }
|
||||||
|
|
||||||
virtual void parse_attribute(FlyString const& name, String const& value) override;
|
virtual void parse_attribute(FlyString const& name, String const& value) override;
|
||||||
|
|
||||||
Optional<ViewBox> m_view_box;
|
Optional<ViewBox> m_view_box;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Web::DOM {
|
||||||
|
|
||||||
|
template<>
|
||||||
|
inline bool Node::fast_is<SVG::SVGSVGElement>() const { return is_svg_svg_element(); }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue