Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[CSS Container Queries] Update query grammar to the spec
https://bugs.webkit.org/show_bug.cgi?id=243449 <rdar://97967682> Reviewed by Tim Nguyen. The spec was changed to allow logical operators on top level without parenthesis making @container not (foo) legal. https://drafts.csswg.org/css-contain-3/#container-rule * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-parsing.html: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-bug-1346969-crash.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/chrome-remove-insert-evaluator-crash.html: Added. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/crashtests/w3c-import.log: * Source/WebCore/css/CSSContainerRule.cpp: (WebCore::CSSContainerRule::cssText const): Factor query serialization to a function in CQ namespace. (WebCore::CSSContainerRule::conditionText const): (WebCore::CSSContainerRule::nameText const): (WebCore::CSSContainerRule::nameFilterText const): Deleted. * Source/WebCore/css/CSSContainerRule.h: * Source/WebCore/css/ContainerQuery.cpp: (WebCore::CQ::serialize): (WebCore::serialize): Deleted. * Source/WebCore/css/ContainerQuery.h: Update to the spec grammar and terminology. ContainerQuery now includes the name part and replaces FilteredContainerQuery. QueryInParens replaces ContainerQuery. Also move ContainerQuery to CQ namespace. * Source/WebCore/css/ContainerQueryParser.cpp: (WebCore::ContainerQueryParser::consumeContainerQuery): (WebCore::ContainerQueryParser::consumeQueryInParens): (WebCore::ContainerQueryParser::consumeCondition): (WebCore::ContainerQueryParser::consumeFilteredContainerQuery): Deleted. * Source/WebCore/css/ContainerQueryParser.h: * Source/WebCore/css/StyleRule.cpp: (WebCore::StyleRuleContainer::StyleRuleContainer): (WebCore::StyleRuleContainer::create): * Source/WebCore/css/StyleRule.h: * Source/WebCore/css/parser/CSSParserImpl.cpp: (WebCore::CSSParserImpl::consumeContainerRule): * Source/WebCore/inspector/InspectorStyleSheet.cpp: (WebCore::buildArrayForGroupings): * Source/WebCore/style/ContainerQueryEvaluator.cpp: (WebCore::Style::ContainerQueryEvaluator::evaluate const): (WebCore::Style::ContainerQueryEvaluator::selectContainer const): (WebCore::Style::ContainerQueryEvaluator::evaluateQueryInParens const): (WebCore::Style::ContainerQueryEvaluator::evaluateCondition const): (WebCore::Style::ContainerQueryEvaluator::evaluateQuery const): Deleted. * Source/WebCore/style/ContainerQueryEvaluator.h: * Source/WebCore/style/RuleSet.h: (WebCore::Style:: const): Canonical link: https://commits.webkit.org/253035@main
- Loading branch information
Showing
18 changed files
with
274 additions
and
227 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
Oops, something went wrong.