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

Unified Diff: lib/content/elemHideEmulation.js

Issue 29730630: Issue 6437 - Skip DOM-only patterns on initial load (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created March 22, 2018, 4:09 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
@@ -451,17 +451,17 @@
() => this.selectors.some(selector => selector.dependsOnCharacterData)
);
}
};
function filterPatterns(patterns, {stylesheets, mutations})
{
if (!stylesheets && !mutations)
- return patterns.slice();
+ return patterns.filter(pattern => pattern.dependsOnStyles);
return patterns.filter(
pattern => (stylesheets && pattern.dependsOnStyles) ||
(mutations && pattern.dependsOnDOM)
);
}
function shouldObserveAttributes(patterns)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld