From 0a8e289f370dd4251f81e298085f9ae107e1ba0e Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Wed, 29 Dec 2021 12:27:42 +0000 Subject: [PATCH] LibWeb: Update `` definition to match spec change See https://github.com/w3c/csswg-drafts/pull/6799 --- Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp index 073b6a660c..ed3f8440fa 100644 --- a/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp +++ b/Userland/Libraries/LibWeb/CSS/Parser/Parser.cpp @@ -1130,16 +1130,13 @@ Optional Parser::parse_general_enclosed(TokenStream ) ]` + // `[ ? ) ]` if (first_token.is_function()) return GeneralEnclosed { first_token.to_string() }; - // `( )` - 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() }; - } + // `( ? )` + if (first_token.is_block() && first_token.block().is_paren()) + return GeneralEnclosed { first_token.to_string() }; tokens.rewind_to_position(start_position); return {};