Cascade layer styles should be lower priority than unlayered styles · WebKit/WebKit@e138655 (original) (raw)
Commit
Cascade layer styles should be lower priority than unlayered styles
Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=231342
Reviewed by Simon Fraser.
LayoutTests/imported/w3c:
Update from the WPT repo.
- web-platform-tests/css/css-cascade/layer-basic.html:
- web-platform-tests/css/css-cascade/layer-font-face-override-expected.txt:
- web-platform-tests/css/css-cascade/layer-font-face-override.html:
- web-platform-tests/css/css-cascade/layer-import.html:
- web-platform-tests/css/css-cascade/layer-keyframes-override-expected.txt:
- web-platform-tests/css/css-cascade/layer-keyframes-override.html:
- web-platform-tests/css/css-cascade/layer-stylesheet-sharing.html:
Source/WebCore:
Update the implementation to match the resolution for w3c/csswg-drafts#6284.
- style/ElementRuleCollector.cpp: (WebCore::Style::ElementRuleCollector::addMatchedRule): (WebCore::Style::compareRules):
- style/ElementRuleCollector.h:
- style/RuleSet.h: (WebCore::Style::RuleSet::cascadeLayerPriorityForIdentifier const): (WebCore::Style::RuleSet::cascadeLayerPriorityFor const):
Return std::numeric_limits::max() for unlayered rules.
(WebCore::Style::RuleSet::cascadeLayerOrderForIdentifier const): Deleted. (WebCore::Style::RuleSet::cascadeLayerOrderFor const): Deleted.
Also update naming order->priority to better match the spec text.
- style/RuleSetBuilder.cpp: (WebCore::Style::RuleSetBuilder::~RuleSetBuilder): (WebCore::Style::RuleSetBuilder::updateCascadeLayerPriorities): (WebCore::Style::RuleSetBuilder::addMutatingRulesToResolver): (WebCore::Style::RuleSetBuilder::updateCascadeLayerOrder): Deleted.
- style/RuleSetBuilder.h:
Canonical link: https://commits.webkit.org/242643@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@283718 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information