Index: lib/content/elemHideEmulation.js |
=================================================================== |
--- a/lib/content/elemHideEmulation.js |
+++ b/lib/content/elemHideEmulation.js |
@@ -406,35 +406,29 @@ |
let elementFilters = []; |
let cssStyles = []; |
let stylesheetOnlyChange = !!stylesheets; |
if (!stylesheets) |
stylesheets = this.document.styleSheets; |
- // Chrome < 51 doesn't have an iterable StyleSheetList |
- // https://issues.adblockplus.org/ticket/5381 |
- for (let i = 0; i < stylesheets.length; i++) |
+ for (let stylesheet of stylesheets) |
{ |
- 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; |
- // Chrome < 51 doesn't have an iterable CSSRuleList |
- // https://issues.adblockplus.org/ticket/5773 |
- for (let j = 0; j < rules.length; j++) |
+ for (let rule of rules) |
{ |
- let rule = rules[j]; |
if (rule.type != rule.STYLE_RULE) |
continue; |
cssStyles.push(stringifyStyle(rule)); |
} |
} |
let patterns = this.patterns.slice(); |