LibWeb: Handle multiple line names in the CSS Grid

Prevent crashing when multiple line names are declared in the
grid-template-* CSS properties by skipping over the character separating
each line name.
This commit is contained in:
martinfalisse 2022-11-21 19:45:18 +01:00 committed by Linus Groh
parent 849499988e
commit 513a123728
Notes: sideshowbarker 2024-07-17 04:13:40 +09:00

View file

@ -5868,6 +5868,7 @@ Optional<CSS::GridRepeat> Parser::parse_repeat(Vector<ComponentValue> const& com
while (block_tokens.has_next_token()) {
auto current_block_token = block_tokens.next_token();
line_names.append(current_block_token.token().ident());
block_tokens.skip_whitespace();
}
line_names_list.append(line_names);
part_two_tokens.skip_whitespace();
@ -5966,6 +5967,7 @@ RefPtr<StyleValue> Parser::parse_grid_track_sizes(Vector<ComponentValue> const&
while (block_tokens.has_next_token()) {
auto current_block_token = block_tokens.next_token();
line_names.append(current_block_token.token().ident());
block_tokens.skip_whitespace();
}
line_names_list.append(line_names);
} else {