Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MQ4] Simplify dynamic media feature handling with legacy evaluator
https://bugs.webkit.org/show_bug.cgi?id=247263 <rdar://problem/101758954> Reviewed by Alan Baradlay. This will make it simpler to implement dynamic features in the new evaluator. * Source/WebCore/css/LegacyMediaQueryEvaluator.cpp: (WebCore::LegacyMediaQueryEvaluator::evaluate const): Remove the dynamic feature related parameters from evaluate(). (WebCore::mediaQueryDynamicDependencies): Add a function to find dynamic dependencies separately from evaluation. (WebCore::LegacyMediaQueryEvaluator::evaluateForChanges const): Deleted. * Source/WebCore/css/LegacyMediaQueryEvaluator.h: (WebCore::MediaQueryDynamicResults::append): Deleted. (WebCore::MediaQueryDynamicResults::isEmpty const): Deleted. Replace with a simple OptionSet. * Source/WebCore/css/parser/SizesAttributeParser.cpp: (WebCore::SizesAttributeParser::SizesAttributeParser): (WebCore::SizesAttributeParser::mediaConditionMatches): (WebCore::SizesAttributeParser::parse): Collect the dynamic queries and the results to a member. * Source/WebCore/css/parser/SizesAttributeParser.h: (WebCore::SizesAttributeParser::dynamicMediaConditionResults const): * Source/WebCore/css/query/MediaQuery.h: * Source/WebCore/html/HTMLImageElement.cpp: (WebCore::HTMLImageElement::bestFitSourceFromPictureElement): (WebCore::HTMLImageElement::evaluateDynamicMediaQueryDependencies): Evaluate whole queries instead of individual expressions. (WebCore::HTMLImageElement::selectImageSource): * Source/WebCore/html/HTMLImageElement.h: * Source/WebCore/style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::updateDynamicMediaQueries): (WebCore::Style::RuleSetBuilder::MediaQueryCollector::pushAndEvaluate): * Source/WebCore/style/RuleSetBuilder.h: * Source/WebCore/style/UserAgentStyle.cpp: (WebCore::Style::UserAgentStyle::addToDefaultStyle): Canonical link: https://commits.webkit.org/256170@main
- Loading branch information
Showing
10 changed files
with
89 additions
and
88 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
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
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
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