diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 6fa8e7a79ed..0b06e86952f 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -6943,7 +6943,7 @@ NonnullRefPtr Parser::resolve_unresolved_style_value(Badge { public: - static NonnullRefPtr create(String name) + static NonnullRefPtr create(FlyString name) { return adopt_ref(*new PropertyDependencyNode(move(name))); } @@ -6974,12 +6974,12 @@ public: } private: - explicit PropertyDependencyNode(String name) + explicit PropertyDependencyNode(FlyString name) : m_name(move(name)) { } - String m_name; + FlyString m_name; Vector> m_children; bool m_marked { false }; }; @@ -7008,12 +7008,12 @@ NonnullRefPtr Parser::resolve_unresolved_style_value(DOM::Element& e static RefPtr get_custom_property(DOM::Element const& element, Optional pseudo_element, FlyString const& custom_property_name) { if (pseudo_element.has_value()) { - if (auto it = element.custom_properties(pseudo_element).find(custom_property_name.to_string()); it != element.custom_properties(pseudo_element).end()) + if (auto it = element.custom_properties(pseudo_element).find(custom_property_name); it != element.custom_properties(pseudo_element).end()) return it->value.value; } for (auto const* current_element = &element; current_element; current_element = current_element->parent_element()) { - if (auto it = current_element->custom_properties({}).find(custom_property_name.to_string()); it != current_element->custom_properties({}).end()) + if (auto it = current_element->custom_properties({}).find(custom_property_name); it != current_element->custom_properties({}).end()) return it->value.value; } return nullptr; @@ -7029,10 +7029,10 @@ bool Parser::expand_variables(DOM::Element& element, Optional NonnullRefPtr { + auto get_dependency_node = [&](FlyString const& name) -> NonnullRefPtr { if (auto existing = dependencies.get(name); existing.has_value()) return *existing.value(); - auto new_node = PropertyDependencyNode::create(name.to_string()); + auto new_node = PropertyDependencyNode::create(name); dependencies.set(name, new_node); return new_node; };