mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-20 01:12:38 +01:00
Parse -abp-has as declarative if possible
With the new csstree-based parser, it should now be safe to parse `-abp-has` as declarative. There are over a hundred such cosmetic filters in EasyList, and we want to have these filters declaratively enforced whenever possible in order to let the browser do the work natively rather than rely on JS code.
This commit is contained in:
parent
5d97353287
commit
30bd6c7bb8
@ -1425,6 +1425,7 @@ Parser.prototype.SelectorCompiler = class {
|
||||
if ( match === ':-abp-contains(' ) {
|
||||
return ':has-text(';
|
||||
} else if ( match === ':-abp-has(' ) {
|
||||
this.asProcedural = false;
|
||||
return ':has(';
|
||||
}
|
||||
return match;
|
||||
|
Loading…
Reference in New Issue
Block a user