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

Unified Diff: lib/content/elemHideEmulation.js

Issue 29555834: Issue 5773 - Older Opera and Chrome don't have an iterable CSSRuleList (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Pass eslint. Created Sept. 25, 2017, 6:04 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: lib/content/elemHideEmulation.js
===================================================================
--- a/lib/content/elemHideEmulation.js
+++ b/lib/content/elemHideEmulation.js
@@ -425,18 +425,21 @@
// between Firefox and Chrome.
if (!this.isSameOrigin(stylesheet))
continue;
let rules = stylesheet.cssRules;
if (!rules)
continue;
- for (let rule of rules)
+ // Chrome < 51 doesn't have an iterable CSSRuleList
+ // https://issues.adblockplus.org/ticket/5773
+ for (let j = 0; j < rules.length; j++)
{
+ let rule = rules[j];
if (rule.type != rule.STYLE_RULE)
continue;
cssStyles.push(stringifyStyle(rule));
}
}
let {document} = this.window;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld