Bug 248868 - [content-blocker] css-display-none doesn't removes elements with :has selector
Summary: [content-blocker] css-display-none doesn't removes elements with :has selector
Status: RESOLVED DUPLICATE of bug 250609
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari 16
Hardware: All macOS 13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-12-07 05:12 PST by maximtop
Modified: 2023-02-09 05:54 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***