LibWeb: Add fast_is to SVGClipPathElement

This commit is contained in:
Tim Ledbetter 2026-06-17 23:41:00 +01:00 committed by Andreas Kling
parent 7218794aaa
commit 9d359d9d7c
2 changed files with 10 additions and 0 deletions

View file

@ -156,6 +156,7 @@ public:
virtual bool is_svg_foreign_object_element() const { return false; }
virtual bool is_svg_gradient_element() const { return false; }
virtual bool is_svg_pattern_element() const { return false; }
virtual bool is_svg_clip_path_element() const { return false; }
bool in_a_document_tree() const;

View file

@ -40,7 +40,16 @@ private:
SVGClipPathElement(DOM::Document&, DOM::QualifiedName);
virtual void initialize(JS::Realm&) override;
virtual bool is_svg_clip_path_element() const final { return true; }
Optional<ClipPathUnits> m_clip_path_units = {};
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<SVG::SVGClipPathElement>() const { return is_svg_clip_path_element(); }
}