mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:07:35 +00:00
LibWeb: Add fast_is<T>() for HTML::HTMLHtmlElement
Another one spotted in a scroll-up-and-down profile.
This commit is contained in:
parent
c908fa83e3
commit
4333d0d639
2 changed files with 9 additions and 0 deletions
|
@ -82,6 +82,7 @@ public:
|
||||||
|
|
||||||
virtual bool is_editable() const;
|
virtual bool is_editable() const;
|
||||||
|
|
||||||
|
virtual bool is_html_html_element() const { return false; }
|
||||||
virtual bool is_html_template_element() const { return false; }
|
virtual bool is_html_template_element() const { return false; }
|
||||||
|
|
||||||
ExceptionOr<NonnullRefPtr<Node>> pre_insert(NonnullRefPtr<Node>, RefPtr<Node>);
|
ExceptionOr<NonnullRefPtr<Node>> pre_insert(NonnullRefPtr<Node>, RefPtr<Node>);
|
||||||
|
|
|
@ -18,6 +18,14 @@ public:
|
||||||
virtual ~HTMLHtmlElement() override;
|
virtual ~HTMLHtmlElement() override;
|
||||||
|
|
||||||
bool should_use_body_background_properties() const;
|
bool should_use_body_background_properties() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
virtual bool is_html_html_element() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
namespace Web::DOM {
|
||||||
|
template<>
|
||||||
|
inline bool Node::fast_is<HTML::HTMLHtmlElement>() const { return is_html_html_element(); }
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue