Opened 15 months ago

Last modified 15 months ago

#6455 reviewing change

Use tabs.removeCSS on Chromium

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

https://codereview.adblockplus.org/29717611/

Description (last modified by mjethani)

Background

We decided to use tabs.removeCSS specifically only on Firefox, because Chromium's implementation was likely to be different and possibly initially buggy. We now know that the API is going to be the same, with the following differences in behavior:

  1. An extension can only remove its own style sheets
  2. Injecting the same style sheet twice is not an error, instead a duplicate copy is injected; removing a style sheet only removes the last injected copy

Once the API is in Canary and is stable, we should start using it.

What to change

  1. Remove the check for Gecko in lib/cssInjection.js, instead use feature detection
  2. Since Chrome injects multiple copies instead of throwing an error, take care not to inject a duplicate (for this we may have to remove first instead of adding first as we are doing now)

Change History (5)

comment:1 Changed 15 months ago by mjethani

  • Cc kzar sebastian added

comment:2 Changed 15 months ago by mjethani

  • Description modified (diff)

comment:3 Changed 15 months ago by sebastian

  • Priority changed from Unknown to P3
  • Ready set

comment:4 Changed 15 months ago by mjethani

  • Owner set to mjethani
  • Review URL(s) modified (diff)

comment:5 Changed 15 months ago by mjethani

  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.