Bug 248868

Summary: [content-blocker] css-display-none doesn't removes elements with :has selector
Product: WebKit Reporter: maximtop <maximtop>
Component: CSSAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: achristensen, koivisto, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: Safari 16   
Hardware: All   
OS: macOS 13   

Description maximtop 2022-12-07 05:12:03 PST
Safari 16 started supporting `:has` selector, but it doesn't work in the content blocker.

STR:
1. add rule
```
[{"trigger":{"url-filter":".*","if-domain":["*example.org"]},"action":{"type":"css-display-none","selector":"div:has(p)"}}]
```

2. go to `example.org`
expected: the whole div should be hidden
actual: div is not hidden

also, other CSS rules in content-blocker don't work as well if added with this rule
Comment 1 Radar WebKit Bug Importer 2022-12-14 05:12:17 PST
<rdar://problem/103352966>
Comment 2 maximtop 2023-02-09 02:56:16 PST
seems to be resolved here https://bugs.webkit.org/show_bug.cgi?id=250609
Comment 3 Antti Koivisto 2023-02-09 05:54:46 PST
Thanks! Sorry for the forward duplicate.

*** This bug has been marked as a duplicate of bug 250609 ***