-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CSS] Don't construct CSSSelectorList when not needed
https://bugs.webkit.org/show_bug.cgi?id=265518 rdar://118931010 Reviewed by Antti Koivisto. CSSSelectorList is an optimized data structure, we should only construct it when it's actually needed (so not when empty or error) and keep the editable CSSParserSelector data structure until then. * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::consumeStyleRule): * Source/WebCore/css/parser/CSSSelectorParser.cpp: (WebCore::parseCSSParserSelectorList): (WebCore::parseCSSSelectorList): (WebCore::CSSSelectorParser::consumeSelectorList): (WebCore::CSSSelectorParser::consumeComplexSelectorList): (WebCore::CSSSelectorParser::consumeRelativeSelectorList): (WebCore::CSSSelectorParser::consumeNestedSelectorList): (WebCore::CSSSelectorParser::consumeForgivingSelectorList): (WebCore::CSSSelectorParser::consumeComplexForgivingSelectorList): (WebCore::CSSSelectorParser::consumeNestedComplexForgivingSelectorList): (WebCore::CSSSelectorParser::consumeCompoundSelectorList): (WebCore::CSSSelectorParser::consumePseudo): * Source/WebCore/css/parser/CSSSelectorParser.h: Canonical link: https://commits.webkit.org/271290@main
- Loading branch information
Showing
3 changed files
with
65 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters