mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-03 23:25:20 +00:00
LibWeb: Add fast_is<T> for form, embed, image, and object elements
These are used by Window::supported_property_names(), which can get very hot.
This commit is contained in:
@@ -51,6 +51,8 @@ public:
|
||||
private:
|
||||
HTMLObjectElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual bool is_html_object_element() const override { return true; }
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
virtual JS::GCPtr<Layout::Node> create_layout_node(NonnullRefPtr<CSS::StyleProperties>) override;
|
||||
@@ -87,3 +89,8 @@ private:
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
namespace Web::DOM {
|
||||
template<>
|
||||
inline bool Node::fast_is<HTML::HTMLObjectElement>() const { return is_html_object_element(); }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user