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

LibWeb: Add fast_is<T>() for HTMLSlotElement

2.4x speed-up on StyleBench :^)
This commit is contained in:
Andreas Kling 2023-09-23 13:03:59 +02:00
parent 07b332e17c
commit a6131634f1
2 changed files with 10 additions and 0 deletions

View file

@ -39,6 +39,8 @@ public:
private:
HTMLSlotElement(DOM::Document&, DOM::QualifiedName);
virtual bool is_html_slot_element() const override { return true; }
virtual void initialize(JS::Realm&) override;
virtual void visit_edges(JS::Cell::Visitor&) override;
@ -47,3 +49,10 @@ private:
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::HTMLSlotElement>() const { return is_html_slot_element(); }
}