1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:37:35 +00:00

LibWeb: Make Declaration.m_name a FlyString

This commit is contained in:
Sam Atkins 2022-04-12 16:09:18 +01:00 committed by Andreas Kling
parent f235da27d9
commit 69496f4afd
2 changed files with 3 additions and 3 deletions

View file

@ -20,14 +20,14 @@ public:
Declaration(); Declaration();
~Declaration(); ~Declaration();
String const& name() const { return m_name; } StringView name() const { return m_name; }
Vector<ComponentValue> const& values() const { return m_values; } Vector<ComponentValue> const& values() const { return m_values; }
Important importance() const { return m_important; } Important importance() const { return m_important; }
String to_string() const; String to_string() const;
private: private:
String m_name; FlyString m_name;
Vector<ComponentValue> m_values; Vector<ComponentValue> m_values;
Important m_important { Important::No }; Important m_important { Important::No };
}; };

View file

@ -2517,7 +2517,7 @@ RefPtr<PropertyOwningCSSStyleDeclaration> Parser::convert_to_style_declaration(V
Optional<StyleProperty> Parser::convert_to_style_property(Declaration const& declaration) 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); auto property_id = property_id_from_string(property_name);
if (property_id == PropertyID::Invalid) { if (property_id == PropertyID::Invalid) {