Process subtractive_selectors first
Currently, if a filter rule is more selective than the subtractive selector, the subtractive selector will not be executed because the information by which to do the subtraction is already discarded. This fixes that by removing elements first and then applying filter selections.
I haven't tested this PR at all. This changes the behavior of the filtering method (I think to the correct behavior), but it might break automated tests or change the experience for other users.
hmmm running tests then we see :)
@emichael very interesting, can you give me some example html here ?
Sure.
<html>
<body>
<div class="foo">
ABC
</div>
<div id="bar">
<div class="foo">
DEF
</div>
</div>
</body>
</html>
Currently, if you remove div#bar but filter on div.foo, the output is
ABC
DEF
With this change, it would just be
ABC