1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:48:10 +00:00

LibWeb: Disallow global CSS keywords in @font-face font-family

This commit is contained in:
Sam Atkins 2022-03-31 20:14:21 +01:00 committed by Andreas Kling
parent dbbd6d3508
commit dbb0b68175

View file

@ -4412,6 +4412,11 @@ RefPtr<CSSRule> Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens
continue;
}
if (part.is(Token::Type::Ident)) {
if (is_builtin(part.token().ident())) {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face font-family format invalid; discarding.");
had_syntax_error = true;
break;
}
auto value_id = value_id_from_string(part.token().ident());
if (is_generic_font_family(value_id)) {
dbgln_if(CSS_PARSER_DEBUG, "CSSParser: @font-face font-family format invalid; discarding.");