LibWeb/CSS: Replace is_generic_font_family() with a CSS enum

Also add the missing "math" value to it.
This commit is contained in:
Sam Atkins 2025-02-04 15:39:06 +00:00
parent 6da7a6eab5
commit 0ac133d73b
Notes: github-actions[bot] 2025-02-06 16:49:09 +00:00
4 changed files with 14 additions and 20 deletions

View file

@ -796,7 +796,7 @@ GC::Ptr<CSSFontFaceRule> Parser::convert_to_font_face_rule(AtRule const& rule)
break;
}
auto keyword = keyword_from_string(part.token().ident());
if (keyword.has_value() && is_generic_font_family(keyword.value())) {
if (keyword.has_value() && keyword_to_generic_font_family(keyword.value()).has_value()) {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face font-family format invalid; discarding.");
had_syntax_error = true;
break;