Opened 3 years ago

Closed 2 years ago

#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

  1. Add the following filter rules: ##body, example.com#@#body
  2. Go to http://example.com/, note that the page contents aren't hidden (exception rule in effect).
  3. 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.

Change History (3)

comment:1 Changed 3 years ago by mapx

  • Cc mapx added

comment:2 Changed 3 years ago by mapx

  • Cc smed79 added

comment:3 Changed 2 years ago by trev

  • Resolution set to rejected
  • Status changed from new to closed

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.

Note: See TracTickets for help on using tickets.