mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-08 12:12:53 +00:00
LibWeb/CSS: Replace is_generic_font_family() with a CSS enum
Also add the missing "math" value to it.
This commit is contained in:
parent
6da7a6eab5
commit
0ac133d73b
Notes:
github-actions[bot]
2025-02-06 16:49:09 +00:00
Author: https://github.com/AtkinsSJ
Commit: 0ac133d73b
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3464
Reviewed-by: https://github.com/ADKaster
4 changed files with 14 additions and 20 deletions
|
@ -2385,7 +2385,7 @@ RefPtr<CSSStyleValue> Parser::parse_font_family_value(TokenStream<ComponentValue
|
|||
|
||||
auto maybe_keyword = keyword_from_string(peek.token().ident());
|
||||
// Can't have a generic-font-name as a token in an unquoted font name.
|
||||
if (maybe_keyword.has_value() && is_generic_font_family(maybe_keyword.value())) {
|
||||
if (maybe_keyword.has_value() && keyword_to_generic_font_family(maybe_keyword.value()).has_value()) {
|
||||
if (!current_name_parts.is_empty())
|
||||
return nullptr;
|
||||
tokens.discard_a_token(); // Ident
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue