Opened on 10/10/2016 at 09:30:26 AM
Closed on 11/10/2017 at 11:15:18 AM
#4509 closed defect (rejected)
Element hiding exception rules don't show up in Blockable items
Reported by: | trev | Assignee: | |
---|---|---|---|
Priority: | P4 | Milestone: | |
Module: | Adblock-Plus-for-Firefox | Keywords: | |
Cc: | mapx, smed79 | Blocked By: | |
Blocking: | Platform: | Unknown / Cross platform | |
Ready: | yes | Confidential: | no |
Tester: | Unknown | Verified working: | no |
Review URL(s): |
Description
Environment
Adblock Plus 2.7.3.4204-beta
How to reproduce
- Add the following filter rules: ##body, example.com#@#body
- Go to http://example.com/, note that the page contents aren't hidden (exception rule in effect).
- Open the list of blockable items.
Observed behaviour
No entries in the list.
Expected behaviour
The list should show example.com#@#body being effective.
Background
With #524 fixed we apply element hiding exceptions before knowing whether the rules in question would have matched anything on the page. So the "usual" approach to hit counting doesn't work.
What to change
Have RequestNotifier calculate exceptions that are effective on the current page:
- Compile a list of element hiding rules that would have been active on the current page but are not because of exceptions.
- Run document.querySelector() for the corresponding selector to determine whether there are matches.
- Report any selectors with matches as a hit for the exception rules.
This would need to be run when the page loads as well as when elements are added to the document (via mutation observer).
Supporting exceptions applying to CSS property filters requires even more complexity.
Mass-closing all bugs in Adblock Plus for Firefox module, the codebase of Adblock Plus 3.0 belongs into Platform and User-Interface modules. Old bugs are unlikely to still apply.