Opened 2 months ago

Closed 2 months ago

#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-Chrome-Opera-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).

Change History (8)

comment:1 Changed 2 months ago by sebastian

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

comment:2 Changed 2 months ago by sebastian

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

comment:3 Changed 2 months ago by sebastian

  • Description modified (diff)

comment:4 Changed 2 months ago by mjethani

  • Cc mjethani added

comment:5 Changed 2 months ago by sebastian

  • Description modified (diff)

comment:6 Changed 2 months ago by abpbot

comment:8 Changed 2 months ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.