Opened on 04/06/2017 at 02:35:28 PM

Closed on 04/07/2017 at 11:39:22 AM

Last modified on 07/04/2017 at 09:17:53 AM

#5117 closed change (fixed)

Identify ElemHideEmulationFilters based on the filter text in the devtools panel

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.13.3-for-Chrome-Opera
Module: Platform Keywords:
Cc: Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29404613/

Description (last modified by sebastian)

Background

In order to show applied ElemHideFilters in the devtools panel we match the injected selectors against each element in the document, and report any selector that matches a hidden element, back to the background page, which then finds the corresponding filter and logs it to the devtools panel.

With #3596, we added logic to deal with ElemHideEmulationFilters, so that they show up in the devtools panel as well. For these kind of filters we cannot associate the generated selector with the original filter, however the actual filter text is available. But instead of passing the orginal filter through all the way to the devtools panel, we went with a more pragmatic approach and just extracted the selector part from the filter so that it works with the existing logic, introducing a slightly leaky abstraction.

Now, with #5094, we are going to integrate a new kind of ElemHideEmulationFilter that don't generate a selector in the first place, but hides elements directly. In order to log these filters in the devtools panel, we have to skip the tracing functionality, and potentially end up duplicating the hack.

What to change

Change the ElementHidingTracer in the content script and the devtools.traceElemHide message handler in the background page, so that the full filter text is sent and used to identify the filter, if available.

Attachments (0)

Change History (6)

comment:1 Changed on 04/06/2017 at 02:56:32 PM by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:2 Changed on 04/06/2017 at 03:23:19 PM by sebastian

  • Description modified (diff)

comment:3 Changed on 04/06/2017 at 03:24:11 PM by sebastian

  • Description modified (diff)

comment:4 Changed on 04/07/2017 at 11:37:12 AM by abpbot

comment:5 Changed on 04/07/2017 at 11:39:22 AM by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next
  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:6 Changed on 07/04/2017 at 09:17:53 AM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Done. Hiding filters and ElemHideEmulationFilters appear in the ABP DevTools panel as expected.

ABP 1.13.2.1785
chrome 49 / 59 / Windows 7
Opera 39 / 45 / Windows 7

Add Comment

Modify Ticket

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