diff --git a/Libraries/LibWeb/CSS/NumericType.cpp b/Libraries/LibWeb/CSS/NumericType.cpp index 46c40638f6d..77def71215e 100644 --- a/Libraries/LibWeb/CSS/NumericType.cpp +++ b/Libraries/LibWeb/CSS/NumericType.cpp @@ -39,18 +39,18 @@ Optional NumericType::base_type_from_value_type(ValueType } // https://drafts.css-houdini.org/css-typed-om-1/#cssnumericvalue-create-a-type -Optional NumericType::create_from_unit(StringView unit) +Optional NumericType::create_from_unit(FlyString const& unit) { // To create a type from a string unit, follow the appropriate branch of the following: // unit is "number" - if (unit == "number"sv) { + if (unit == "number"_fly_string) { // Return «[ ]» (empty map) return NumericType {}; } // unit is "percent" - if (unit == "percent"sv) { + if (unit == "percent"_fly_string) { // Return «[ "percent" → 1 ]» return NumericType { BaseType::Percent, 1 }; } diff --git a/Libraries/LibWeb/CSS/NumericType.h b/Libraries/LibWeb/CSS/NumericType.h index 8fe2978fe88..46ba1b12d9e 100644 --- a/Libraries/LibWeb/CSS/NumericType.h +++ b/Libraries/LibWeb/CSS/NumericType.h @@ -51,7 +51,7 @@ public: VERIFY_NOT_REACHED(); } - static Optional create_from_unit(StringView unit); + static Optional create_from_unit(FlyString const& unit); NumericType() = default; NumericType(BaseType type, i32 power) {