Index: lib/content/elemHideEmulation.js |
=================================================================== |
--- a/lib/content/elemHideEmulation.js |
+++ b/lib/content/elemHideEmulation.js |
@@ -222,16 +222,18 @@ |
function PlainSelector(selector) |
{ |
this._selector = selector; |
this.maybeDependsOnAttributes = /[#.]|\[.+\]/.test(selector); |
} |
PlainSelector.prototype = { |
+ preferHideWithSelector: true, |
+ |
/** |
* Generator function returning a pair of selector |
* string and subtree. |
* @param {string} prefix the prefix for the selector. |
* @param {Node} subtree the subtree we work on. |
* @param {StringifiedStyle[]} styles the stringified style objects. |
*/ |
*getSelectors(prefix, subtree, styles) |
@@ -403,17 +405,17 @@ |
this.text = text; |
} |
Pattern.prototype = { |
isSelectorHidingOnlyPattern() |
{ |
return getCachedPropertyValue( |
this, "_selectorHidingOnlyPattern", |
- () => this.selectors.some(selector => selector.preferHideWithSelector) && |
+ () => this.selectors.every(selector => selector.preferHideWithSelector) && |
!this.selectors.some(selector => selector.requiresHiding) |
); |
}, |
get dependsOnStyles() |
{ |
return getCachedPropertyValue( |
this, "_dependsOnStyles", |