Opened 6 years ago

Closed 4 years ago

Last modified 4 years ago

#524 closed change (fixed)

Stop using @-moz-document

Reported by: trev Assignee:
Priority: P4 Milestone: Adblock-Plus-2.8-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: arthur, mapx Blocked By: #235, #521, #4167, #4450, #4499, #4527
Blocking: Platform: Unknown / Cross platform
Ready: yes Confidential: no
Tester: Unknown Verified working: no
Review URL(s):

Description (last modified by trev)


According to it seems that the many conditional blocks via @-moz-document make it hard to share our stylesheet across documents, an own copy has to be created for each document instead. However, out of the 23759 element hiding filters in EasyList right now, 13005 filters apply on every webpage without exceptions so that part of our stylesheet can be completely fixed. There are 534 exceptions meaning that 534 filters will apply on almost every page but cannot be part of the global stylesheet. All other rules are domain-specific, there should never be all too many of them applying on a single page.

What to change

Update adblockpluscore dependency to include the changes in #4167 and #4450. This will import some additional changes, only affecting unit tests however.

Only preload the rules which will apply on every page unconditionally with about:abp-elemhide?css. For websites where element hiding is enabled there will be an additional stylesheet, e.g. about:abp-elemhide? (note that host name has to be URL-encoded). The protocol handler needs to be adjusted to call ElemHide.getSelectorsForDomain() in that case.

The about:abp-elemhide?hit responses should always block the elements unconditionally now - exceptions are dealt with elsewhere, here we are really only counting hits. The hit counting also doesn't need to go through the complete processing in Policy.shouldAllow() - simpler processing can be established in element hiding code, and the special cases for element hiding in Policy.shouldAllow() can be removed.

Change History (11)

comment:1 Changed 6 years ago by mapx

  • Cc smultron45@… added

comment:2 Changed 6 years ago by arthur

  • Cc arthur added

comment:3 Changed 5 years ago by trev

  • Platform set to Unknown / Cross platform
  • Priority changed from P2 to P4
  • Tester set to Unknown

Changing priority to reflect reality, the important change is actually #521.

comment:4 Changed 4 years ago by mapx

  • Cc mapx added; smultron45@… removed

comment:5 Changed 4 years ago by trev

  • Description modified (diff)

comment:6 Changed 4 years ago by trev

  • Blocked By 4167 added

comment:7 Changed 4 years ago by trev

  • Blocked By 4450 added
  • Description modified (diff)
  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:8 Changed 4 years ago by abpbot

A commit referencing this issue has landed:
Issue 524 - Stop using @-moz-document

comment:9 Changed 4 years ago by trev

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

comment:10 Changed 4 years ago by trev

  • Blocked By 4499 added

comment:11 Changed 4 years ago by trev

  • Blocked By 4527 added
Note: See TracTickets for help on using tickets.