mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-19 09:32:52 +00:00
LibWeb+WebContent: Use new String class in CSS::StyleValue
Converts uses of DeprecatedString to String in StyleValue, and patches surrounding files that depend on these functions.
This commit is contained in:
parent
1c2e7b1e47
commit
ce0f41b9fb
Notes:
sideshowbarker
2024-07-17 01:55:31 +09:00
Author: https://github.com/martinfalisse
Commit: ce0f41b9fb
Pull-request: https://github.com/SerenityOS/serenity/pull/16841
Reviewed-by: https://github.com/MacDue
37 changed files with 335 additions and 330 deletions
|
@ -68,7 +68,7 @@ enum class ValueID {
|
|||
};
|
||||
|
||||
ValueID value_id_from_string(StringView);
|
||||
const char* string_from_value_id(ValueID);
|
||||
StringView string_from_value_id(ValueID);
|
||||
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ ValueID value_id_from_string(StringView string)
|
|||
return ValueID::Invalid;
|
||||
}
|
||||
|
||||
const char* string_from_value_id(ValueID value_id) {
|
||||
StringView string_from_value_id(ValueID value_id) {
|
||||
switch (value_id) {
|
||||
)~~~");
|
||||
|
||||
|
@ -117,13 +117,13 @@ const char* string_from_value_id(ValueID value_id) {
|
|||
member_generator.set("name:titlecase", title_casify(name.to_deprecated_string()));
|
||||
member_generator.append(R"~~~(
|
||||
case ValueID::@name:titlecase@:
|
||||
return "@name@";
|
||||
return "@name@"sv;
|
||||
)~~~");
|
||||
});
|
||||
|
||||
generator.append(R"~~~(
|
||||
default:
|
||||
return "(invalid CSS::ValueID)";
|
||||
return "(invalid CSS::ValueID)"sv;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue