Opened 2 years ago

Last modified 2 years ago

#5381 closed defect

CSS property filters error in old Chrome versions — at Version 4

Reported by: Ross Assignee:
Priority: P2 Milestone:
Module: Core Keywords:
Cc: kzar, hfiguiere, sebastian Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Ross Verified working: yes
Review URL(s):

https://codereview.adblockplus.org/29481659

Description (last modified by Ross)

Environment

ABP 1.13.2.1785
Chrome 49 / 50 / Windows 7
Opera 36 / 37 / Windows 7
Does not occur on Chrome 51+
Does not occur on Opera 38+

ABP 1.13.2 (Release)
Chrome 49 / Windows 7

How to reproduce

  1. Visit https://adblockplus.org
  2. Open the console.
  3. Add the filter to ABP: adblockplus.org#?#:-abp-properties(width: 76px)
  4. Refresh the page.

Observed behaviour

The CSS property filter is not applied (The ABP logo should be hidden) and the following errors appear in the console:

Error in event handler for (unknown): TypeError: stylesheets[Symbol.iterator] is not a function
at Object.addSelectors (chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/elemHideEmulation.js:408:26)
at getFiltersFunc.patterns (chrome-extension://ldcecbkkoecffmfljeihcmifjjdoepkn/elemHideEmulation.js:477:14)

Expected behaviour

No errors to occur and the CSS property filter to be applied.

Change History (4)

comment:1 Changed 2 years ago by sebastian

  • Cc kzar hfiguiere sebastian added

comment:2 Changed 2 years ago by hfiguiere

So in Chrome 50 and below, document.styleSheets is not iterable....

comment:3 Changed 2 years ago by Ross

  • Description modified (diff)

(Added relevant Opera versions too)

Last edited 2 years ago by Ross (previous) (diff)

comment:4 Changed 2 years ago by Ross

  • Description modified (diff)

This also occurs with the old syntax with the last release.

Note: See TracTickets for help on using tickets.