mirror of
https://github.com/gorhill/uBlock.git
synced 2024-09-20 13:03:56 +02:00
query-selectable selectors are not necessarily sheet-selectable
Related commits: -4f923384de
-97a33c9572
-ef07171f5a
For instance, with "Experimental Web Platform features" enabled, the following filter becomes natively query-selectable: .fail:has(+ a > b) Meaning uBO won't need to emulate the `:has()` operator, it will be executed natively using `querySelectorAll()`. This commit fixes the erroneous assumption that a query-selectable is also sheet-selectable.
This commit is contained in:
parent
b4adc3a44e
commit
3891b4d050
1 changed files with 6 additions and 3 deletions
|
@ -1404,9 +1404,12 @@ Parser.prototype.SelectorCompiler = class {
|
|||
const compiled = this.compileProceduralSelector(raw);
|
||||
if ( compiled === undefined ) { return false; }
|
||||
|
||||
out.compiled = compiled.selector !== compiled.raw
|
||||
? JSON.stringify(compiled)
|
||||
: compiled.selector;
|
||||
out.compiled =
|
||||
compiled.selector !== compiled.raw ||
|
||||
this.sheetSelectable(compiled.selector) === false
|
||||
? JSON.stringify(compiled)
|
||||
: compiled.selector;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue