1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:47:34 +00:00

LibWeb: Add some fast_is<T> helpers for hot classes on GitHub :^)

This commit is contained in:
Andreas Kling 2022-03-13 17:21:27 +01:00
parent 74fda2a761
commit afc5fade05
5 changed files with 16 additions and 0 deletions

View file

@ -72,6 +72,7 @@ public:
bool is_parent_node() const { return is_element() || is_document() || is_document_fragment(); }
bool is_slottable() const { return is_element() || is_text(); }
bool is_attribute() const { return type() == NodeType::ATTRIBUTE_NODE; }
virtual bool is_shadow_root() const { return false; }
virtual bool requires_svg_container() const { return false; }
virtual bool is_svg_container() const { return false; }