Opened on 04/22/2015 at 12:02:13 PM

Closed on 04/22/2015 at 12:03:13 PM

#2391 closed change (duplicate)

Create a new filter class for CSS property filters

Reported by: trev Assignee:
Priority: P2 Milestone:
Module: Core Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):



CSS property filters will use a syntax compatible with element hiding filters: > [-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 (1)

comment:1 Changed on 04/22/2015 at 12:03:13 PM by trev

  • Blocking 2389 removed
  • Resolution set to duplicate
  • Status changed from new to closed

Heh, Trac created two identical issues, see #2390.

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
Note: See TracTickets for help on using tickets.