1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 10:57:35 +00:00

LibWeb: Add a FlyString version of Element::tag_name

Renaming the DeprecatedString version of this function to
deprecated_tag_name. A FlyString is used here as we often need to
perform equality checks here, and the HTMLParser already has tag_name as
a FlyString.

Remove a FIXME while we're at it - we were already following the spec
there, and we still are :^)
This commit is contained in:
Shannon Booth 2023-10-02 01:44:25 +13:00 committed by Sam Atkins
parent 9303e9e76f
commit ff72436448
4 changed files with 9 additions and 8 deletions

View file

@ -82,7 +82,8 @@ public:
FlyString const& local_name() const { return m_qualified_name.local_name(); }
// NOTE: This is for the JS bindings
DeprecatedString const& tag_name() const { return html_uppercased_qualified_name(); }
FlyString tag_name() const { return MUST(FlyString::from_deprecated_fly_string(html_uppercased_qualified_name())); }
DeprecatedString const& deprecated_tag_name() const { return html_uppercased_qualified_name(); }
Optional<FlyString> const& prefix() const { return m_qualified_name.prefix(); }
DeprecatedFlyString deprecated_prefix() const { return m_qualified_name.deprecated_prefix(); }