LibWeb/CSS: Reject invalid grid track placement property values

This commit is contained in:
Tim Ledbetter 2025-03-11 11:16:02 +00:00 committed by Jelle Raaijmakers
parent 411cafa2a9
commit b80c0d2114
Notes: github-actions[bot] 2025-03-14 07:51:00 +00:00
5 changed files with 79 additions and 75 deletions

View file

@ -3980,8 +3980,11 @@ RefPtr<CSSStyleValue> Parser::parse_grid_track_placement_shorthand_value(Propert
Vector<ComponentValue> track_start_placement_tokens;
while (true) {
if (current_token->is_delim('/'))
if (current_token->is_delim('/')) {
if (!tokens.has_next_token())
return nullptr;
break;
}
track_start_placement_tokens.append(current_token);
if (!tokens.has_next_token())
break;