1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:38:11 +00:00

LibWeb: Add fast_is<T>() for various types stood out in a profile

This commit is contained in:
Andreas Kling 2023-03-10 21:16:18 +01:00
parent f6426cdcd4
commit 1cf5737e9e
8 changed files with 48 additions and 0 deletions

View file

@ -39,6 +39,9 @@ public:
private:
HTMLProgressElement(DOM::Document&, DOM::QualifiedName);
// ^DOM::Node
virtual bool is_html_input_element() const final { return true; }
virtual JS::ThrowCompletionOr<void> initialize(JS::Realm&) override;
void progress_position_updated();
@ -47,3 +50,8 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLProgressElement>() const { return is_html_progress_element(); }
}