mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-14 10:20:36 +00:00
LibWeb: Parse each unquoted font-family name as a single CustomIdentSV
Previously we made StringStyleValues from these, but once we start actually quoting StringStyleValues when serializing them, this will break the font-family serialization.
This commit is contained in:
parent
d1e542999c
commit
77ae510319
Notes:
sideshowbarker
2024-07-17 06:29:49 +09:00
Author: https://github.com/AtkinsSJ Commit: https://github.com/SerenityOS/serenity/commit/77ae510319 Pull-request: https://github.com/SerenityOS/serenity/pull/21043
1 changed files with 4 additions and 2 deletions
|
@ -4146,7 +4146,8 @@ RefPtr<StyleValue> Parser::parse_font_family_value(TokenStream<ComponentValue>&
|
|||
if (current_name_parts.is_empty())
|
||||
return nullptr;
|
||||
(void)tokens.next_token(); // Comma
|
||||
font_families.append(StringStyleValue::create(MUST(String::join(' ', current_name_parts))));
|
||||
// This is really a series of custom-idents, not just one. But for the sake of simplicity we'll make it one.
|
||||
font_families.append(CustomIdentStyleValue::create(MUST(String::join(' ', current_name_parts))));
|
||||
current_name_parts.clear();
|
||||
// Can't have a trailing comma
|
||||
if (!tokens.has_next_token())
|
||||
|
@ -4158,7 +4159,8 @@ RefPtr<StyleValue> Parser::parse_font_family_value(TokenStream<ComponentValue>&
|
|||
}
|
||||
|
||||
if (!current_name_parts.is_empty()) {
|
||||
font_families.append(StringStyleValue::create(MUST(String::join(' ', current_name_parts))));
|
||||
// This is really a series of custom-idents, not just one. But for the sake of simplicity we'll make it one.
|
||||
font_families.append(CustomIdentStyleValue::create(MUST(String::join(' ', current_name_parts))));
|
||||
current_name_parts.clear();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue