Skip to content

Commit 3ede1d0

Browse files
TobyAsEalimpfard
authored andcommitted
LibWeb: Avoid unnecessary String copy in parsing CSS custom properties
1 parent 4fca9ee commit 3ede1d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Libraries/LibWeb/CSS/Parser/DeprecatedCSSParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ static bool takes_integer_value(CSS::PropertyID property_id)
217217
return property_id == CSS::PropertyID::ZIndex || property_id == CSS::PropertyID::FontWeight || property_id == CSS::PropertyID::Custom;
218218
}
219219

220-
static StringView parse_custom_property_name(StringView value)
220+
static StringView parse_custom_property_name(const StringView& value)
221221
{
222222
if (!value.starts_with("var(") && !value.ends_with(")"))
223223
return {};

0 commit comments

Comments
 (0)