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

Unified Diff: include.preload.js

Issue 29367475: Issue 4659 - Incorporate element hiding emulation filters (Closed) Base URL: https://bitbucket.org/fhd/adblockpluschrome
Patch Set: Created Dec. 13, 2016, 9:24 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
Index: include.preload.js
===================================================================
--- a/include.preload.js
+++ b/include.preload.js
@@ -428,23 +428,23 @@
}
function ElemHide()
{
this.shadow = this.createShadowTree();
this.style = null;
this.tracer = null;
- this.propertyFilters = new CSSPropertyFilters(
+ this.elemHideEmulation = new ElemHideEmulation(
window,
function(callback)
{
ext.backgroundPage.sendMessage({
type: "filters.get",
- what: "cssproperties"
+ what: "elemhideemulation"
}, callback);
},
this.addSelectors.bind(this)
);
}
ElemHide.prototype = {
selectorGroupSize: 200,
@@ -542,47 +542,47 @@
this.style.sheet.insertRule(selector + "{display: none !important;}",
this.style.sheet.cssRules.length);
}
},
apply: function()
{
var selectors = null;
- var propertyFiltersLoaded = false;
+ var elemHideEmulationLoaded = false;
var checkLoaded = function()
{
- if (!selectors || !propertyFiltersLoaded)
+ if (!selectors || !elemHideEmulationLoaded)
return;
if (this.tracer)
this.tracer.disconnect();
this.tracer = null;
if (this.style && this.style.parentElement)
this.style.parentElement.removeChild(this.style);
this.style = null;
this.addSelectors(selectors.selectors);
- this.propertyFilters.apply();
+ this.elemHideEmulation.apply();
if (selectors.trace)
this.tracer = new ElementHidingTracer(selectors.selectors);
}.bind(this);
ext.backgroundPage.sendMessage({type: "get-selectors"}, function(response)
{
selectors = response;
checkLoaded();
});
- this.propertyFilters.load(function()
+ this.elemHideEmulation.load(function()
{
- propertyFiltersLoaded = true;
+ elemHideEmulationLoaded = true;
checkLoaded();
});
}
};
if (document instanceof HTMLDocument)
{
checkSitekey();

Powered by Google App Engine
This is Rietveld