 Issue 29894564:
  Issue 6999 - Remove inlineEmulated flag in content.applyFilters  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluschrome/
    
  
    Issue 29894564:
  Issue 6999 - Remove inlineEmulated flag in content.applyFilters  (Closed) 
  Base URL: https://hg.adblockplus.org/adblockpluschrome/| Index: include.preload.js | 
| =================================================================== | 
| --- a/include.preload.js | 
| +++ b/include.preload.js | 
| @@ -393,20 +393,19 @@ | 
| } | 
| }; | 
| function ContentFiltering() | 
| { | 
| this.styles = new Map(); | 
| this.tracer = null; | 
| this.inline = true; | 
| - this.inlineEmulated = true; | 
| this.elemHideEmulation = new ElemHideEmulation( | 
| - this.addSelectors.bind(this), | 
| + () => {}, | 
| 
Sebastian Noack
2018/09/29 00:18:47
It seems if ElemHideEmulation is no longer call ad
 
Manish Jethani
2018/09/29 01:58:50
Let's make this change part of https://codereview.
 | 
| this.hideElements.bind(this) | 
| ); | 
| } | 
| ContentFiltering.prototype = { | 
| selectorGroupSize: 1024, | 
| addSelectorsInline(selectors, groupName, appendOnly = false) | 
| { | 
| @@ -456,17 +455,17 @@ | 
| let selector = selectors.slice(i, i + this.selectorGroupSize).join(", "); | 
| style.sheet.insertRule(selector + "{display: none !important;}", | 
| style.sheet.cssRules.length); | 
| } | 
| }, | 
| addSelectors(selectors, filters, groupName = "emulated", appendOnly = false) | 
| { | 
| - if (this.inline || this.inlineEmulated) | 
| + if (this.inline) | 
| { | 
| // Insert the style rules inline if we have been instructed by the | 
| // background page to do so. This is usually the case, except on platforms | 
| // that do support user stylesheets via the browser.tabs.insertCSS API | 
| // (Firefox 53 onwards for now and possibly Chrome in the near future). | 
| // Once all supported platforms have implemented this API, we can remove | 
| // the code below. See issue #5090. | 
| // Related Chrome and Firefox issues: | 
| @@ -516,29 +515,23 @@ | 
| if (this.tracer) | 
| this.tracer.disconnect(); | 
| this.tracer = null; | 
| if (response.trace) | 
| this.tracer = new ElementHidingTracer(); | 
| this.inline = response.inline; | 
| - this.inlineEmulated = !!response.inlineEmulated; | 
| if (this.inline) | 
| this.addSelectorsInline(response.selectors, "standard"); | 
| if (this.tracer) | 
| this.tracer.addSelectors(response.selectors); | 
| - // Prefer CSS selectors for -abp-has and -abp-contains unless the | 
| - // background page has asked us to use inline styles. | 
| - this.elemHideEmulation.useInlineStyles = this.inline || | 
| - this.inlineEmulated; | 
| - | 
| this.elemHideEmulation.apply(response.emulatedPatterns); | 
| }); | 
| } | 
| }; | 
| if (document instanceof HTMLDocument) | 
| { | 
| checkSitekey(); |