diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2022-04-12 16:09:18 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-04-12 23:03:46 +0200 |
commit | 69496f4afdfd7f97d555ae0be4fb0e3c3576512b (patch) | |
tree | d7930ae1844c726311bde677d389b84ab1f13069 /Userland/Libraries/LibWeb/CSS | |
parent | f235da27d99d537ae4945d4e2d1b3c313dd9318d (diff) | |
download | serenity-69496f4afdfd7f97d555ae0be4fb0e3c3576512b.zip |
LibWeb: Make Declaration.m_name a FlyString
Diffstat (limited to 'Userland/Libraries/LibWeb/CSS')
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Declaration.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h index e180b7d197..d1de702822 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h +++ b/Userland/Libraries/LibWeb/CSS/Parser/Declaration.h @@ -20,14 +20,14 @@ public: Declaration(); ~Declaration(); - String const& name() const { return m_name; } + StringView name() const { return m_name; } Vector<ComponentValue> const& values() const { return m_values; } Important importance() const { return m_important; } String to_string() const; private: - String m_name; + FlyString m_name; Vector<ComponentValue> m_values; Important m_important { Important::No }; }; diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index efebe42283..1bbd9c5a71 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -2517,7 +2517,7 @@ RefPtr<PropertyOwningCSSStyleDeclaration> Parser::convert_to_style_declaration(V Optional<StyleProperty> Parser::convert_to_style_property(Declaration const& declaration) { - auto& property_name = declaration.name(); + auto property_name = declaration.name(); auto property_id = property_id_from_string(property_name); if (property_id == PropertyID::Invalid) { |