mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:28:12 +00:00
LibWeb: Update <general-enclosed>
definition to match spec change
See https://github.com/w3c/csswg-drafts/pull/6799
This commit is contained in:
parent
7532ef78ad
commit
0a8e289f37
1 changed files with 4 additions and 7 deletions
|
@ -1130,16 +1130,13 @@ Optional<GeneralEnclosed> Parser::parse_general_enclosed(TokenStream<StyleCompon
|
|||
|
||||
auto& first_token = tokens.next_token();
|
||||
|
||||
// `[ <function-token> <any-value> ) ]`
|
||||
// `[ <function-token> <any-value>? ) ]`
|
||||
if (first_token.is_function())
|
||||
return GeneralEnclosed { first_token.to_string() };
|
||||
|
||||
// `( <ident> <any-value> )`
|
||||
if (first_token.is_block() && first_token.block().is_paren()) {
|
||||
auto& block = first_token.block();
|
||||
if (!block.values().is_empty() && block.values().first().is(Token::Type::Ident))
|
||||
return GeneralEnclosed { first_token.to_string() };
|
||||
}
|
||||
// `( <any-value>? )`
|
||||
if (first_token.is_block() && first_token.block().is_paren())
|
||||
return GeneralEnclosed { first_token.to_string() };
|
||||
|
||||
tokens.rewind_to_position(start_position);
|
||||
return {};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue