mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibWeb: Ensure there are no trailing tokens when parsing font-family
This commit is contained in:
parent
f84ccb8627
commit
b18c334a4f
1 changed files with 2 additions and 3 deletions
|
@ -5814,11 +5814,10 @@ Parser::ParseErrorOr<NonnullRefPtr<StyleValue>> Parser::parse_css_value(Property
|
|||
if (auto parsed_value = parse_font_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
case PropertyID::FontFamily: {
|
||||
if (auto parsed_value = parse_font_family_value(tokens))
|
||||
case PropertyID::FontFamily:
|
||||
if (auto parsed_value = parse_font_family_value(tokens); parsed_value && !tokens.has_next_token())
|
||||
return parsed_value.release_nonnull();
|
||||
return ParseError::SyntaxError;
|
||||
}
|
||||
case PropertyID::GridColumn:
|
||||
if (auto parsed_value = parse_grid_track_placement_shorthand_value(property_id, component_values))
|
||||
return parsed_value.release_nonnull();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue