mirror of
https://github.com/RGBCube/serenity
synced 2025-07-23 13:17:36 +00:00
LibWeb: Avoid unnecessary String copy in parsing CSS custom properties
This commit is contained in:
parent
4fca9ee060
commit
3ede1d08f5
1 changed files with 1 additions and 1 deletions
|
@ -217,7 +217,7 @@ static bool takes_integer_value(CSS::PropertyID property_id)
|
||||||
return property_id == CSS::PropertyID::ZIndex || property_id == CSS::PropertyID::FontWeight || property_id == CSS::PropertyID::Custom;
|
return property_id == CSS::PropertyID::ZIndex || property_id == CSS::PropertyID::FontWeight || property_id == CSS::PropertyID::Custom;
|
||||||
}
|
}
|
||||||
|
|
||||||
static StringView parse_custom_property_name(StringView value)
|
static StringView parse_custom_property_name(const StringView& value)
|
||||||
{
|
{
|
||||||
if (!value.starts_with("var(") && !value.ends_with(")"))
|
if (!value.starts_with("var(") && !value.ends_with(")"))
|
||||||
return {};
|
return {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue