There are some interesting :has() tests
Created attachment 456726 [details] Patch
Committed r292419 (249282@main): <https://commits.webkit.org/249282@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456726 [details].
<rdar://problem/91313304>