Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: chrome/content/elemHideEmulation.js

Issue 29481659: Issue 5381 - iterate stylesheet with an array subscript (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created July 6, 2017, 1:33 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/content/elemHideEmulation.js
===================================================================
--- a/chrome/content/elemHideEmulation.js
+++ b/chrome/content/elemHideEmulation.js
@@ -398,18 +398,21 @@
let selectors = [];
let selectorFilters = [];
let elements = [];
let elementFilters = [];
let cssStyles = [];
- for (let stylesheet of stylesheets)
+ // Chrome < 51 doesn't have an iterable StyleSheetList
+ // https://issues.adblockplus.org/ticket/5381
+ for (let i = 0; i < stylesheets.length; i++)
{
+ let stylesheet = stylesheets[i];
// Explicitly ignore third-party stylesheets to ensure consistent behavior
// between Firefox and Chrome.
if (!this.isSameOrigin(stylesheet))
continue;
let rules = stylesheet.cssRules;
if (!rules)
continue;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld