summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r--Userland/Libraries/LibWeb/DOM/Node.h1
-rw-r--r--Userland/Libraries/LibWeb/SVG/SVGElement.h10
2 files changed, 11 insertions, 0 deletions
diff --git a/Userland/Libraries/LibWeb/DOM/Node.h b/Userland/Libraries/LibWeb/DOM/Node.h
index c1abd5ea0d..96392c2d66 100644
--- a/Userland/Libraries/LibWeb/DOM/Node.h
+++ b/Userland/Libraries/LibWeb/DOM/Node.h
@@ -73,6 +73,7 @@ public:
virtual bool requires_svg_container() const { return false; }
virtual bool is_svg_container() const { return false; }
+ virtual bool is_svg_element() const { return false; }
virtual bool is_svg_svg_element() const { return false; }
bool in_a_document_tree() const;
diff --git a/Userland/Libraries/LibWeb/SVG/SVGElement.h b/Userland/Libraries/LibWeb/SVG/SVGElement.h
index e3ce0535c2..1329d86814 100644
--- a/Userland/Libraries/LibWeb/SVG/SVGElement.h
+++ b/Userland/Libraries/LibWeb/SVG/SVGElement.h
@@ -26,6 +26,16 @@ protected:
virtual void visit_edges(Cell::Visitor&) override;
JS::GCPtr<HTML::DOMStringMap> m_dataset;
+
+private:
+ virtual bool is_svg_element() const final { return true; }
};
}
+
+namespace Web::DOM {
+
+template<>
+inline bool Node::fast_is<SVG::SVGElement>() const { return is_svg_element(); }
+
+}