New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CSS Container Queries][Style queries] Basic evaluation support #24140
Merged
Conversation
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
EWS run on previous version of this PR (hash 7403d47) |
anttijk
force-pushed
the
cq-style-evaluate
branch
from
February 9, 2024 13:00
7403d47
to
b47a63c
Compare
EWS run on previous version of this PR (hash b47a63c) |
anttijk
force-pushed
the
cq-style-evaluate
branch
from
February 9, 2024 13:52
b47a63c
to
590c2bc
Compare
EWS run on current version of this PR (hash 590c2bc) |
alanbaradlay
approved these changes
Feb 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=269061 rdar://122623247 Reviewed by Alan Baradlay. Evaluate @container style(--property:foo) queries. * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-parsing-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/at-container-style-serialization-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-queries-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/custom-property-style-query-change-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/display-contents-dynamic-style-queries-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/nested-size-style-container-invalidation-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/pseudo-elements-005-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/query-evaluation-style-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-for-shadow-dom-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-container-invalidation-inheritance-expected.txt: * LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/style-query-with-unknown-width-expected.txt: * Source/WebCore/css/parser/CSSParserTokenRange.cpp: (WebCore::CSSParserTokenRange::consumeAllExcludingTrailingWhitespace): Add a helper. * Source/WebCore/css/parser/CSSParserTokenRange.h: * Source/WebCore/css/query/ContainerQuery.h: * Source/WebCore/css/query/ContainerQueryFeatures.cpp: Evaluate the query by looking up and comparing the property value. * Source/WebCore/css/query/GenericMediaQueryParser.cpp: (WebCore::MQ::consumeCustomPropertyValue): Don't include trailing whitespace to custom property value. (WebCore::MQ::FeatureParser::consumeBooleanOrPlainFeature): * Source/WebCore/style/ContainerQueryEvaluator.h: Pass the currently resolved style via ContainerQueryEvaluationState. * Source/WebCore/style/ContainerQueryEvaluator.cpp: (WebCore::Style::ContainerQueryEvaluator::ContainerQueryEvaluator): (WebCore::Style::styleForContainer): (WebCore::Style::ContainerQueryEvaluator::featureEvaluationContextForQuery const): Look up the currently resolved style for the container. It may not have yet been committed to the render tree. Allow containers that don't generate boxes. (WebCore::Style::ContainerQueryEvaluator::selectContainer): Similarly use the current style for container selection. Allow any element to be a container for style queries. * Source/WebCore/style/ContainerQueryEvaluator.h: * Source/WebCore/style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::containerQueriesMatch): * Source/WebCore/style/SelectorMatchingState.h: * Source/WebCore/style/StyleTreeResolver.cpp: (WebCore::Style::TreeResolver::Scope::Scope): Pass a reference to the current style update to container query evaluation. (WebCore::Style::TreeResolver::pushParent): (WebCore::Style::TreeResolver::popParent): (WebCore::Style::TreeResolver::resolve): * Source/WebCore/style/StyleTreeResolver.h: * Source/WebCore/style/StyleUpdate.cpp: (WebCore::Style::Update::addInitialContainingBlockUpdate): * Source/WebCore/style/StyleUpdate.h: (WebCore::Style::Update::addInitialContainingBlockUpdate): Deleted. Canonical link: https://commits.webkit.org/274364@main
webkit-commit-queue
force-pushed
the
cq-style-evaluate
branch
from
February 9, 2024 16:26
590c2bc
to
2a76b5d
Compare
Committed 274364@main (2a76b5d): https://commits.webkit.org/274364@main Reviewed commits have been landed. Closing PR #24140 and removing active labels. |
webkit-commit-queue
removed
the
merge-queue
Applied to send a pull request to merge-queue
label
Feb 9, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
2a76b5d
590c2bc
π wincairoπ§ͺ wpe-wk2π§ͺ gtk-wk2π§ͺ api-gtkπ watchπ watch-sim