Bug 151702
| Summary: | Content Blocker does not apply "css-display-none" rules when page is loaded in non-active tab | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Andrey Meshkov <am> |
| Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | achristensen, benjamin, krzysztof.modras, mjs |
| Priority: | P2 | ||
| Version: | Safari 9 | ||
| Hardware: | All | ||
| OS: | iOS 9.0 | ||
Andrey Meshkov
Steps to reproduce (tested on ipad mini 2):
1. Register a simple content blocker with one rule (hiding "share" buttons on macrumors.com)
[{trigger: {url-filter: ".*", resource-type: ["document"], if-domain: ["*macrumors.com"]}, action: {type: "css-display-none", selector: ".social"}}]
2. Open macrumors.com. Share buttons are hidden http://screencast.com/t/88mfI2UM
3. Tap on the article header and select "Open in New Tab"
4. Wait a bit then switch to that new tab
Expected result:
Share buttons should be hidden
Real result:
Share buttons block is visible
The block will be hidden if you refresh the page
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Andrey Meshkov
The issue is still there.
Here's an easier way to reproduce:
1. Register a simple content blocker with one rule (hiding "share" buttons on macrumors.com)
[{trigger: {url-filter: ".*", if-domain: ["*iana.org"]}, action: {type: "css-display-none", selector: "body"}}]
2. Open example.org
3. Cmd+Click on the "More information..." link
4. Wait a bit then switch to the IANA tab
Expected result:
The page content is hidden
Actual result:
Nothing is hidden, you need to refresh the page for the rules to be applied
Maciej Stachowiak
Strange that opening in a background tab would have an effect.
Andrey Meshkov
Huh, it seems that this issue is invalid after all.
Most likely I've not waited enough for a content blocker to be compiled and applied.