| Index: lib/content/elemHideEmulation.js |
| =================================================================== |
| --- a/lib/content/elemHideEmulation.js |
| +++ b/lib/content/elemHideEmulation.js |
| @@ -600,24 +600,23 @@ |
| function shouldObserveCharacterData(patterns) |
| { |
| return patterns.some(pattern => pattern.dependsOnCharacterData); |
| } |
| class ElemHideEmulation |
| { |
| - constructor(addSelectorsFunc, hideElemsFunc) |
| + constructor(hideElemsFunc) |
| { |
| this._filteringInProgress = false; |
| this._lastInvocation = -MIN_INVOCATION_INTERVAL; |
| this._scheduledProcessing = null; |
| this.document = document; |
| - this.addSelectorsFunc = addSelectorsFunc; |
| this.hideElemsFunc = hideElemsFunc; |
| this.observer = new MutationObserver(this.observe.bind(this)); |
| } |
| isSameOrigin(stylesheet) |
| { |
| try |
| { |
| @@ -710,19 +709,16 @@ |
| */ |
| _addSelectors(stylesheets, mutations, done) |
| { |
| if (testInfo) |
| testInfo.lastProcessedElements.clear(); |
| let patterns = filterPatterns(this.patterns, {stylesheets, mutations}); |
| - let selectors = []; |
| - let selectorFilters = []; |
| - |
| let elements = []; |
| let elementFilters = []; |
| let cssStyles = []; |
| // If neither any style sheets nor any DOM mutations have been specified, |
| // do full processing. |
| if (!stylesheets && !mutations) |
| @@ -778,18 +774,16 @@ |
| let processPatterns = () => |
| { |
| let cycleStart = performance.now(); |
| if (!pattern) |
| { |
| if (!patterns.length) |
| { |
| - if (selectors.length > 0) |
| - this.addSelectorsFunc(selectors, selectorFilters); |
| if (elements.length > 0) |
| this.hideElemsFunc(elements, elementFilters); |
| if (typeof done == "function") |
| done(); |
| return; |
| } |
| pattern = patterns.shift(); |