Opened on 09/25/2017 at 11:05:52 PM

Closed on 09/26/2017 at 11:14:27 PM

#5781 closed change (fixed)

Merge message listeners for regular and emulated element hiding

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

https://codereview.adblockplus.org/29555932
https://codereview.adblockplus.org/29555936

Description (last modified by sebastian)

Background

Element hiding emulation filters are retrieved through a message listener in adblockplusui, so that the same logic could be reused in adblockplus and adblockpluschrome. However, adblockplus (the legacy Gecko extension) is deprecated now, and support has already been removed from adblockplusui. By moving this code into adblockpluschrome and having the same message listener handle regular element hiding and element hiding emulation filters, we can remove redundancy, avoid unnecessary operations, and minimize the round-trip between content script and background page.

What to change

Remove element hiding emulation code from the message responder in adblockplusui and merge it into the message listener handling element hiding in adblockpluschrome.

While on it, reuse the result of extractHostFromFrame(sender.frame) also when retrieving element hiding emulation filters, instead of just sender.frame.url.hostname (which was inconsistent/incorrect).

Attachments (0)

Change History (8)

comment:1 Changed on 09/25/2017 at 11:10:38 PM by sebastian

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

comment:2 Changed on 09/25/2017 at 11:15:18 PM by sebastian

  • Summary changed from Merge element hiding message listeners to Merge message listeners for regular and emulated element hiding

comment:3 Changed on 09/25/2017 at 11:17:01 PM by sebastian

  • Description modified (diff)

comment:4 Changed on 09/26/2017 at 10:17:51 AM by mjethani

  • Cc mjethani added

comment:5 Changed on 09/26/2017 at 09:18:54 PM by sebastian

  • Description modified (diff)

comment:6 Changed on 09/26/2017 at 11:08:49 PM by abpbot

comment:7 Changed on 09/26/2017 at 11:13:23 PM by abpbot

comment:8 Changed on 09/26/2017 at 11:14:27 PM by sebastian

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

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.