Changeset 285100 in webkit
- Timestamp:
- Oct 31, 2021 11:20:41 PM (9 months ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/host-functional-descendant-invalidation-expected.txt (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/style/RuleSet.cpp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r285084 r285100 1 2021-10-31 Antti Koivisto <antti@apple.com> 2 3 Fix :host invalidation when combined with pseudo classes in descendant position 4 https://bugs.webkit.org/show_bug.cgi?id=232544 5 6 Reviewed by Simon Fraser. 7 8 * web-platform-tests/css/css-scoping/host-functional-descendant-invalidation-expected.txt: 9 1 10 2021-10-30 Brandon Stewart <brandonstewart@apple.com> 2 11 -
trunk/LayoutTests/imported/w3c/web-platform-tests/css/css-scoping/host-functional-descendant-invalidation-expected.txt
r232903 r285100 1 1 2 FAIL CSS Test: element style is correctly updated for rule with :host(..) assert_equals: expected "rgb(0, 128, 0)" but got "rgb(255, 0, 0)" 2 PASS CSS Test: element style is correctly updated for rule with :host(..) 3 3 -
trunk/Source/WebCore/ChangeLog
r285099 r285100 1 2021-10-31 Antti Koivisto <antti@apple.com> 2 3 Fix :host invalidation when combined with pseudo classes in descendant position 4 https://bugs.webkit.org/show_bug.cgi?id=232544 5 6 Reviewed by Simon Fraser. 7 8 * style/RuleSet.cpp: 9 (WebCore::Style::isHostSelectorMatchingInShadowTree): 10 11 Make more readable and accurate. 12 13 (WebCore::Style::RuleSet::addRule): 14 15 Compute m_hasHostPseudoClassRulesMatchingInShadowTree before bailing out for pseudo elements. 16 1 17 2021-10-31 Fujii Hironori <Hironori.Fujii@sony.com> 2 18 -
trunk/Source/WebCore/style/RuleSet.cpp
r283508 r285100 72 72 static bool isHostSelectorMatchingInShadowTree(const CSSSelector& startSelector) 73 73 { 74 auto* leftmostSelector = &startSelector; 75 bool hasDescendantOrChildRelation = false; 76 while (auto* previous = leftmostSelector->tagHistory()) { 77 hasDescendantOrChildRelation = leftmostSelector->hasDescendantOrChildRelation(); 78 leftmostSelector = previous; 79 } 80 if (!hasDescendantOrChildRelation) 81 return false; 82 83 return leftmostSelector->match() == CSSSelector::PseudoClass && leftmostSelector->pseudoClassType() == CSSSelector::PseudoClassHost; 74 bool hasOnlyOneCompound = true; 75 bool hasHostInLastCompound = false; 76 for (auto* selector = &startSelector; selector; selector = selector->tagHistory()) { 77 if (selector->match() == CSSSelector::PseudoClass && selector->pseudoClassType() == CSSSelector::PseudoClassHost) 78 hasHostInLastCompound = true; 79 if (selector->tagHistory() && selector->relation() != CSSSelector::Subselector) { 80 hasOnlyOneCompound = false; 81 hasHostInLastCompound = false; 82 } 83 } 84 return !hasOnlyOneCompound && hasHostInLastCompound; 84 85 } 85 86 … … 198 199 } while (selector); 199 200 201 if (!m_hasHostPseudoClassRulesMatchingInShadowTree) 202 m_hasHostPseudoClassRulesMatchingInShadowTree = isHostSelectorMatchingInShadowTree(*ruleData.selector()); 203 200 204 #if ENABLE(VIDEO) 201 205 if (cuePseudoElementSelector) { … … 233 237 return; 234 238 } 235 236 if (!m_hasHostPseudoClassRulesMatchingInShadowTree)237 m_hasHostPseudoClassRulesMatchingInShadowTree = isHostSelectorMatchingInShadowTree(*ruleData.selector());238 239 239 240 if (hostPseudoClassSelector) {
Note: See TracChangeset
for help on using the changeset viewer.