LibWeb: Add HTML::TagNames namespace for global tag name FlyStrings

Instead of "iframe", we can now say HTML::TagNames::iframe and avoid
a FlyString lookup.
This commit is contained in:
Andreas Kling 2020-06-07 23:27:03 +02:00
commit 992697d99f
Notes: sideshowbarker 2024-07-19 05:46:03 +09:00
23 changed files with 210 additions and 42 deletions

View file

@ -44,4 +44,11 @@ private:
RefPtr<StyleSheet> m_stylesheet;
};
template<>
inline bool is<HTMLStyleElement>(const Node& node)
{
return is<Element>(node) && to<Element>(node).tag_name() == HTML::TagNames::style;
}
}