Skip rules inside container queries when there are no container ancestors.
Created attachment 450390 [details] Patch
Created attachment 450392 [details] Patch
Comment on attachment 450392 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450392&action=review > Source/WebCore/ChangeLog:16 > + This patch doesn't yet do any actual container query matching, it just check nit: it just checks > Source/WebCore/style/ElementRuleCollector.cpp:488 > + if (auto* containerQuery = matchRequest.ruleSet.containerQueryFor(ruleData)) { > + if (!containerQueryMatches(*containerQuery)) you could combine both lines, unless you're planning to re-use containerQuery
Comment on attachment 450392 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=450392&action=review r+ but you'll probably want to account for Tim's comments as well. > LayoutTests/imported/w3c/web-platform-tests/css/css-contain/container-queries/container-type-invalidation-expected.txt:3 > +FAIL Changing the container type invalidates relevant descendants assert_equals: expected "rgb(0, 128, 0)" but got "rgb(0, 0, 0)" What an odd change!
Created attachment 450405 [details] Patch for landing
Committed r288813 (246589@main): <https://commits.webkit.org/246589@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 450405 [details].
<rdar://problem/88268007>