Opened 3 years ago

Closed 3 years ago

#4253 closed change (fixed)

Implement a less fragile way to detect documents that element hiding needs to apply to

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

https://codereview.adblockplus.org/29348029/

Description

Background

In #521 we started to apply element hiding on per-document basis. However, it turned out that we often got the documents too early and had to wait until they were ready (meaning especially: document URL set). As a consequence, we had a number of issues: #4243, #4211, #4251. The latest solution is a hack, making use of beforescriptexecute event which is to be removed.

What to change

Use document-element-inserted observer notification rather than chrome-document-global-created. While it isn't limited to content documents, we can check document type manually. On the other hand, document-element-inserted fires when the first element is created - meaning that the document is already initialized by definition.

Change History (3)

comment:1 Changed 3 years ago by trev

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

comment:3 Changed 3 years ago by trev

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