Opened on 07/06/2017 at 12:42:35 PM

Closed on 07/06/2017 at 02:16:12 PM

Last modified on 09/25/2017 at 01:24:35 PM

#5381 closed defect (fixed)

CSS property filters error in old Chrome versions

Reported by: Ross Assignee: hfiguiere
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 hfiguiere)

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.

Attachments (0)

Change History (12)

comment:1 Changed on 07/06/2017 at 12:47:21 PM by sebastian

  • Cc kzar hfiguiere sebastian added

comment:2 Changed on 07/06/2017 at 12:51:34 PM by hfiguiere

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

comment:3 Changed on 07/06/2017 at 12:53:13 PM by Ross

  • Description modified (diff)

(Added relevant Opera versions too)

Last edited on 07/06/2017 at 12:53:39 PM by Ross

comment:4 Changed on 07/06/2017 at 12:59:58 PM by Ross

  • Description modified (diff)

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

comment:5 Changed on 07/06/2017 at 01:00:01 PM by hfiguiere

  • Description modified (diff)
  • Owner set to hfiguiere

I can fix that, how far back do I have to test?

comment:6 Changed on 07/06/2017 at 01:02:34 PM by hfiguiere

  • Description modified (diff)

comment:7 Changed on 07/06/2017 at 01:04:32 PM by sebastian

  • Component changed from Platform to Core
  • Priority changed from Unknown to P2
  • Ready set

Ok, since this is not a regression introduced since the last release (as per Ross' comment above), we don't need to fix this before releasing Adblock Plus 1.13.3. However, it would be great if we could include a fix with Adblock Plus 1.13.4.

The oldest supported version as of now is Chrome 49. You find the compatibility information here.

comment:8 Changed on 07/06/2017 at 01:34:04 PM by hfiguiere

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

comment:9 Changed on 07/06/2017 at 02:14:23 PM by abpbot

A commit referencing this issue has landed:
Issue 5381 - iterate stylesheet with an array subscript

comment:10 Changed on 07/06/2017 at 02:16:12 PM by hfiguiere

  • Resolution set to fixed
  • Status changed from reviewing to closed

comment:11 Changed on 09/25/2017 at 12:43:23 PM by Ross

This no longer causes an error in old versions, but element hiding filters do not appear to work in old versions (which is not a regression).

ABP 1.13.3.1838
Chrome 49 / 61 / Windows 10
Opera 36 / 47 / Windows 10

Last edited on 09/25/2017 at 01:19:09 PM by Ross

comment:12 Changed on 09/25/2017 at 01:24:35 PM by Ross

  • Tester changed from Unknown to Ross
  • Verified working set

Marking this verified as the error itself is fixed. Opened a new issue for the filter application itself #5773.

Add Comment

Modify Ticket

Change Properties
Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from hfiguiere.
 
Note: See TracTickets for help on using tickets.