"For selectors with pseudo elements, query containers can be established by the shadow-including inclusive ancestors of the ultimate originating element." https://drafts.csswg.org/css-contain-3/#container-queries
Created attachment 457050 [details] Patch
Created attachment 457061 [details] Patch
Committed r292635 (249455@main): <https://commits.webkit.org/249455@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 457061 [details].
<rdar://problem/91503297>