Index: chrome/content/elemHideEmulation.js |
=================================================================== |
--- a/chrome/content/elemHideEmulation.js |
+++ b/chrome/content/elemHideEmulation.js |
@@ -192,18 +192,16 @@ |
const incompletePrefixRegexp = /[\s>+~]$/; |
function HasSelector(selectors) |
{ |
this._innerSelectors = selectors; |
} |
HasSelector.prototype = { |
- requiresHiding: true, |
- |
*getSelectors(prefix, subtree, styles) |
{ |
for (let element of this.getElements(prefix, subtree, styles)) |
yield [makeSelector(element, ""), element]; |
}, |
/** |
* Generator function returning selected elements. |
@@ -241,16 +239,18 @@ |
} |
else |
regexpString = filterToRegExp(propertyExpression); |
this._regexp = new RegExp(regexpString, "i"); |
} |
PropsSelector.prototype = { |
+ hideWithStyleSheet: true, |
+ |
*findPropsSelectors(styles, prefix, regexp) |
{ |
for (let style of styles) |
if (regexp.test(style.style)) |
for (let subSelector of style.subSelectors) |
yield prefix + subSelector; |
}, |
@@ -372,17 +372,17 @@ |
} |
let {document} = this.window; |
for (let pattern of this.patterns) |
{ |
for (let selector of evaluate(pattern.selectors, |
0, "", document, cssStyles)) |
{ |
- if (!pattern.selectors.some(s => s.requiresHiding)) |
+ if (pattern.selectors.some(s => s.hideWithStyleSheet)) |
Wladimir Palant
2017/06/19 08:28:32
This logic reversal is wrong - any filter containi
hub
2017/06/19 13:37:15
Done.
|
{ |
selectors.push(selector); |
selectorFilters.push(pattern.text); |
} |
else |
{ |
for (let element of document.querySelectorAll(selector)) |
{ |