1
Fork 0
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:
Sam Atkins 2023-12-07 17:33:31 +00:00 committed by Sam Atkins
parent f84ccb8627
commit b18c334a4f

View file

@ -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();