Opened on 04/22/2015 at 12:02:05 PM
Closed on 06/10/2015 at 05:08:01 PM
#2390 closed change (fixed)
Create a new filter class for CSS property filters
Reported by: | trev | Assignee: | greiner |
---|---|---|---|
Priority: | P2 | Milestone: | Adblock-Plus-2.6.10-for-Firefox |
Module: | Core | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #2389, #2392 | Platform: | Unknown |
Ready: | yes | Confidential: | no |
Tester: | Verified working: | no | |
Review URL(s): |
Description
Background
CSS property filters will use a syntax compatible with element hiding filters: example.com##.foo > [-abp-properties='|background-image: url(data:*)']. However, the handling will be very different, meaning that they need their own class.
What to change
Create a new class CSSPropertyFilter extending ElemHideBase. This class should have additional properties selectorPrefix and selectorSuffix - substrings of the selector, before and after the -abp-properties clause respectively. It should also have a lazily resolved regexp property, similarly to RegExpFilter. The logic for converting abp-properties value into a regular expression should be shared between CSSPropertyFilter and RegExpFilter.
ElemHideBase.fromText() should be extended to recognize CSS property filters and return an instance of the correct class. Optional: verify that there is at least one positive entry in the domains list and return InvalidFilter if there is none (only if the performance won't suffer).
Attachments (0)
Change History (4)
comment:1 Changed on 04/22/2015 at 12:13:41 PM by trev
- Blocking 2392 added
comment:2 Changed on 04/23/2015 at 05:45:04 PM by greiner
- Owner set to greiner
comment:3 Changed on 05/04/2015 at 06:08:20 PM by greiner
- Review URL(s) modified (diff)
- Status changed from new to reviewing
comment:4 Changed on 06/10/2015 at 05:08:01 PM by greiner
- Milestone set to Adblock-Plus-for-Firefox-next
- Resolution set to fixed
- Status changed from reviewing to closed
https://hg.adblockplus.org/adblockplus/rev/f99ad521dd5f