mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-12 12:32:21 +00:00
LibWeb: Disallow global CSS keywords in @font-face
font-family
This commit is contained in:
parent
dbbd6d3508
commit
dbb0b68175
Notes:
sideshowbarker
2024-07-17 22:55:25 +09:00
Author: https://github.com/AtkinsSJ
Commit: dbb0b68175
Pull-request: https://github.com/SerenityOS/serenity/pull/13407
Reviewed-by: https://github.com/trflynn89
1 changed files with 5 additions and 0 deletions
|
@ -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.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue