浏览代码

LibWeb: Avoid unnecessary String copy in parsing CSS custom properties

Tobias Christiansen 4 年之前
父节点
当前提交
3ede1d08f5
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      Userland/Libraries/LibWeb/CSS/Parser/DeprecatedCSSParser.cpp

+ 1 - 1
Userland/Libraries/LibWeb/CSS/Parser/DeprecatedCSSParser.cpp

@@ -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;
 }
 
-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(")"))
         return {};