Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: 12307bbe8a5a1eb20864ff71890f87469666c7d9 https://github.com/WebKit/WebKit/commit/12307bbe8a5a1eb20864ff71890f87469666c7d9 Author: Cameron McCormack <hey...@apple.com> Date: 2023-09-07 (Thu, 07 Sep 2023)
Changed paths: M LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/host-pseudo-class-in-has-expected.txt M Source/WebCore/style/RuleSet.cpp Log Message: ----------- Invalidate :has(:is(:host(...) ...)) correctly https://bugs.webkit.org/show_bug.cgi?id=253945 rdar://106768205 Reviewed by Antti Koivisto. RuleSet records whether it contains any :host() rules that could possibly match correctly in a shadow tree -- it checks that the :host() only appears in the leftmost compound. Invalidation uses this state to determine whether we need to traverse into a shadow tree, when a class changes on a host element. But this is not sufficient to invalidate rules like: :has(:is(:host(...) div)) This is a properly used :host() selector, since it appears in the leftmost position. So we adjust isHostSelectorMatchingInShadowTree to look into nested selector list arguments like those found in :has(). * LayoutTests/imported/w3c/web-platform-tests/css/selectors/invalidation/host-pseudo-class-in-has-expected.txt: * Source/WebCore/style/RuleSet.cpp: (WebCore::Style::isHostSelectorMatchingInShadowTree): Canonical link: https://commits.webkit.org/267773@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes