LibWeb: Add fast_is<T>() for variously commonly-checked DOM node types

This commit is contained in:
Andreas Kling
2025-12-15 17:30:06 -06:00
committed by Andreas Kling
parent dffb971436
commit 9e5ce016d5
Notes: github-actions[bot] 2025-12-20 15:14:50 +00:00
7 changed files with 60 additions and 0 deletions

View File

@@ -31,6 +31,8 @@ class WEB_API HTMLSelectElement final
public:
virtual ~HTMLSelectElement() override;
virtual bool is_html_select_element() const final { return true; }
virtual void adjust_computed_style(CSS::ComputedProperties&) override;
WebIDL::UnsignedLong size() const;
@@ -164,3 +166,10 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLSelectElement>() const { return is_html_select_element(); }
}