Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 321396c31ca55d74570f52eea689216142d98af1 https://github.com/WebKit/WebKit/commit/321396c31ca55d74570f52eea689216142d98af1 Author: Antti Koivisto <an...@apple.com> Date: 2023-08-28 (Mon, 28 Aug 2023)
Changed paths: M Source/WebCore/style/AttributeChangeInvalidation.cpp M Source/WebCore/style/ClassChangeInvalidation.cpp M Source/WebCore/style/IdChangeInvalidation.cpp M Source/WebCore/style/PseudoClassChangeInvalidation.cpp M Source/WebCore/style/RuleFeature.cpp M Source/WebCore/style/StyleInvalidationFunctions.h M Source/WebCore/style/StyleInvalidator.cpp M Source/WebCore/style/StyleInvalidator.h Log Message: ----------- Fine-grained invalidation for :host pseudo-class in non-subject position https://bugs.webkit.org/show_bug.cgi?id=260791 rdar://problem/114560066 Reviewed by Alan Baradlay. Handle invalidation of cases like :host(.foo) bar efficiently. * Source/WebCore/style/AttributeChangeInvalidation.cpp: (WebCore::Style::AttributeChangeInvalidation::invalidateStyle): Collect any host rules from the shadow tree. This pattern repeats for attribute/id/class/pseudo-class cases. * Source/WebCore/style/ClassChangeInvalidation.cpp: (WebCore::Style::ClassChangeInvalidation::computeInvalidation): * Source/WebCore/style/IdChangeInvalidation.cpp: (WebCore::Style::IdChangeInvalidation::invalidateStyle): * Source/WebCore/style/PseudoClassChangeInvalidation.cpp: (WebCore::Style::PseudoClassChangeInvalidation::collectRuleSets): * Source/WebCore/style/RuleFeature.cpp: (WebCore::Style::computeNextMatchElement): (WebCore::Style::computeHasPseudoClassMatchElement): (WebCore::Style::RuleFeatureSet::recursivelyCollectFeaturesFromSelector): * Source/WebCore/style/StyleInvalidationFunctions.h: (WebCore::Style::traverseRuleFeaturesInShadowTree): Don't force full shadow tree style recalc by returning mayAffectShadowTree bit in these cases. * Source/WebCore/style/StyleInvalidator.cpp: (WebCore::Style::Invalidator::collectRuleInformation): Collect host rules for id invalidation. (WebCore::Style::Invalidator::invalidateInShadowTreeIfNeeded): Traverse the shadow tree if needed. * Source/WebCore/style/StyleInvalidator.h: Canonical link: https://commits.webkit.org/267355@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes