New cosmetic filtering operators:
This is a plan CSS4 operator, but no browser supports it yet. I decided to go ahead and implement it so that it can already be used. See The Relational Pseudo-class: :has() in the Selector Level 4/Editor's Draft.
uBO's implementation is simplified so as to ensure performance. The :has operator must be used with at least one hostname (it must be _specific), and must be of the form (example):
In this example, yandex.ru is the hostname. The part preceding :has(...) -- .serp-item above -- is the DOM node which will be targeted (i.e. hidden by uBO), and must be a valid CSS expression. The part inside the :has parentheses -- .label_color_yellow above -- must be a valid CSS expression, and is the condition that must be fulfilled -- i.e. in the above example, nodes which have a class serp-item will be hidden if and only if they have a descendant with class label_color_yellow.
This new cosmetic filter operator is to support and leverage the power of XPaths. The :xpath() operator must always be used in a specific cosmetic filter, i.e. they must apply tp at least one hostname or entity. An example of how to use it:
These new operators are to be used only for cosmetic filtering cases which are hard to crack -- more and more of these are surfacing (for example DOM elements with random class or id values).
When it comes to cosmetic filtering, preferably, always favor a plain old CSS3-based cosmetic filter, since they can be used in a declarative way, inside a style tag. But there are cases where no CSS3-based expression will work, and in such case consider these new :has and :xpath operators.
These new cosmetic filtering operators can be "excepted" like any other standard CSS3-based cosmetic filter using the usual #@# prompt. Such exception cosmetic filters do not have to be specific however, i.e. you do not have to associate them to a specific hostname/entity.
Closed as fixed:
uMatrix's fix to issue #540 has been imported into uBO.
Fixed a static filtering issue reported in EasyList forum.
Separator ^ is being stripped off filters