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

Unified Diff: include.preload.js

Issue 29575739: Issue 5864 - Remove previous style sheet before adding one (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Created Oct. 13, 2017, 11:59 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 | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -341,16 +341,17 @@
function ElemHide()
{
this.shadow = this.createShadowTree();
this.style = null;
this.tracer = null;
this.inject = true;
this.emulatedPatterns = null;
+ this.emulatedSelectors = null;
this.elemHideEmulation = new ElemHideEmulation(
this.addSelectors.bind(this),
this.hideElements.bind(this)
);
}
ElemHide.prototype = {
selectorGroupSize: 200,
@@ -449,18 +450,20 @@
// https://bugs.chromium.org/p/chromium/issues/detail?id=632009
// https://bugzilla.mozilla.org/show_bug.cgi?id=1310026
this.injectSelectors(selectors, filters);
Manish Jethani 2017/10/14 00:08:03 We should also do the same for when styles are inj
}
else
{
chrome.runtime.sendMessage({
type: "elemhide.injectSelectors",
- selectors
+ selectors,
Manish Jethani 2017/10/14 00:08:03 Note that earlier in this function we're exiting i
Manish Jethani 2017/10/14 13:38:18 Done.
+ previousSelectors: this.emulatedSelectors
});
+ this.emulatedSelectors = selectors;
}
if (this.tracer)
this.tracer.addSelectors(selectors, filters);
},
hideElements(elements, filters)
{
« no previous file with comments | « no previous file | lib/cssInjection.js » ('j') | lib/cssInjection.js » ('J')

Powered by Google App Engine
This is Rietveld