Skip to content

Commit

Permalink
Address minor nit in CSSSelectorParser::consumePseudo()
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=270081

Reviewed by Antti Koivisto.

As it's already been verified that token is either an IdentToken or
FunctionToken, and IdentToken has been dealt with at this point, it can
only be a FunctionToken.

* Source/WebCore/css/parser/CSSSelectorParser.cpp:
(WebCore::CSSSelectorParser::consumePseudo):

Canonical link: https://commits.webkit.org/275323@main
  • Loading branch information
annevk committed Feb 26, 2024
1 parent 90d13e7 commit b59882b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Source/WebCore/css/parser/CSSSelectorParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -750,10 +750,9 @@ std::unique_ptr<MutableCSSSelector> CSSSelectorParser::consumePseudo(CSSParserTo
return selector;
}

ASSERT(token.type() == FunctionToken);
CSSParserTokenRange block = range.consumeBlock();
block.consumeWhitespace();
if (token.type() != FunctionToken)
return nullptr;

if (selector->match() == CSSSelector::Match::PseudoClass) {
switch (selector->pseudoClass()) {
Expand Down

0 comments on commit b59882b

Please sign in to comment.