Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#3459 closed defect (fixed)

<img srcset>, <picture> and fetch() are recognized as other

Reported by: sebastian Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-2.7.1-for-Firefox
Module: Adblock-Plus-for-Firefox Keywords:
Cc: trev Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29333097
https://codereview.adblockplus.org/29333104
https://codereview.adblockplus.org/29333123
https://codereview.adblockplus.org/29333254
https://codereview.adblockplus.org/29333270

Description

Background

Images loaded from an URL provided by the srcet attribute or using the <picture> element are reported as TYPE_IMAGESET by Firefox, which is mapped to OTHER by Adblock Plus. Therefore filters using the $image option won't match these requests.

Also, requests send with the fetch() API are reported as TYPE_FETCH by Firefox, and mapped to OTHER as well by Adblock Plus. However, the fetch() API does essentially the same as the old XMLHttpRequest API. Therefore these requests should be rather mapped to XMLHTTPREQUEST, in order to match filters using the $xmlhttprequest option.

What to change

Map the content type IMAGESET to IMAGE and FETCH to XMLHTTPREQUEST.

Change History (11)

comment:1 Changed 4 years ago by sebastian

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

comment:2 Changed 4 years ago by sebastian

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

comment:3 Changed 4 years ago by sebastian

  • Review URL(s) modified (diff)

Added another patch adding tests.

comment:5 Changed 4 years ago by sebastian

  • Review URL(s) modified (diff)

comment:7 Changed 4 years ago by sebastian

  • Review URL(s) modified (diff)

comment:9 Changed 4 years ago by sebastian

  • Review URL(s) modified (diff)

comment:11 Changed 4 years ago by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Images from srcset, picture and fetch() requests are detected as correct types.

Useful link: https://github.com/mdn/fetch-examples/

ABP 2.7.0.4128-beta
Firefox 38 / 43 / 44 / 45 / 46.0a1 / Ubuntu 14.04 x64

Note: See TracTickets for help on using tickets.