Add more procedural cosmetic filter cases

Related discussion:
- https://github.com/uBlockOrigin/uBlock-issues/issues/1011#issuecomment-884806241
This commit is contained in:
Raymond Hill 2021-07-23 08:39:23 -04:00
parent d5ced9bced
commit 31e0ea1e83
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 58 additions and 43 deletions

View File

@ -84,68 +84,83 @@
</div> </div>
<div id="a3" class="tile"> <div id="a3" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a3 .fail:not(:has(c))</code> <code>#pcf #a3 .fail:has(+ a > b)</code>
</div> </div>
<div id="a4" class="tile"> <div id="a4" class="tile">
<div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div> <div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a4 .fail:has-text(needle)</code> <code>#pcf #a4 .fail:has(:scope + a > b)</code>
</div> </div>
<div id="a5" class="tile"> <div id="a5" class="tile">
<div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a5 .fail:has-text(/NEEDLE/i)</code> <code>#pcf #a5 .fail:has(:is(.pass a > b))</code>
</div> </div>
<div id="a6" class="tile"> <div id="a6" class="tile">
<div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a6 .fail:not(:has-text(haystack))</code> <code>#pcf #a6 .fail:not(:has(c))</code>
</div> </div>
<div id="a7" class="tile"> <div id="a7" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div>
<code>#pcf #a7 .fail:matches-css(position: absolute)</code> <code>#pcf #a7 .fail:has-text(needle)</code>
</div> </div>
<div id="a8" class="tile"> <div id="a8" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div>
<code>#pcf #a8 .fail:has(a:matches-css-before(opacity: 0))</code> <code>#pcf #a8 .fail:has-text(/NEEDLE/i)</code>
</div> </div>
<div id="a9" class="tile"> <div id="a9" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b>I am a needle!!!</b></a></div></div>
<code>#pcf #a9 .fail:has(b:matches-css-after(opacity: 0))</code> <code>#pcf #a9 .fail:not(:has-text(haystack))</code>
</div> </div>
<div id="a10" class="tile"> <div id="a10" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a10 .fail > a > b:nth-ancestor(2)</code> <code>#pcf #a10 .fail:matches-css(position: absolute)</code>
</div> </div>
<div id="a11" class="tile"> <div id="a11" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a11:xpath(.//b/../..)</code> <code>#pcf #a11 .fail:has(a:matches-css-before(opacity: 0))</code>
</div> </div>
<div id="a12" class="tile"> <div id="a12" class="tile">
<div class="pass"><div class="fail"><a>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna<b>aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</b>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a12 .fail:min-text-length(300)</code> <code>#pcf #a12 .fail:has(b:matches-css-after(opacity: 0))</code>
</div> </div>
<div id="a13" class="tile"> <div id="a13" class="tile">
<div class="pass"><a><b></b></a><div class="fail"></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a13 .pass > a:has(b) + .fail</code> <code>#pcf #a13 .fail > a > b:nth-ancestor(2)</code>
</div> </div>
<div id="a14" class="tile"> <div id="a14" class="tile">
<div class="pass"><a><b></b></a><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a14 .pass > a:has(b) + .fail:has(b)</code> <code>#pcf #a14:xpath(.//b/../..)</code>
</div> </div>
<div id="a15" class="tile"> <div id="a15" class="tile">
<div class="pass"><div class="fail"><a>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna<b>aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</b>Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</a></div></div>
<code>#pcf #a15 .fail:min-text-length(300)</code>
</div>
<div id="a16" class="tile">
<div class="pass"><a><b></b></a><div class="fail"></div></div>
<code>#pcf #a16 .pass > a:has(b) + .fail</code>
</div>
<div id="a17" class="tile">
<div class="pass"><a><b></b></a><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a17 .pass > a:has(b) + .fail:has(b)</code>
</div>
<div id="a18" class="tile">
<div class="pass"><div class="pass"><a><b class="ok"></b></a></div></div> <div class="pass"><div class="pass"><a><b class="ok"></b></a></div></div>
<code>#pcf #a15 .pass:watch-attr(class) > .fail:has(b.notok)</code> <code>#pcf #a18 .pass:watch-attr(class) > .fail:has(b.notok)</code>
<script> <script>
self.setTimeout(( ) => self.setTimeout(( ) =>
{ {
@ -157,34 +172,34 @@
</script> </script>
</div> </div>
<div id="a16" class="tile">
<div class="pass"><div class="fail"></div><a></a><b></b></div>
<code>#pcf #a16 .fail:has(+ a)</code>
</div>
<div id="a17" class="tile">
<div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a17 .fail:has(~ a:has(b))</code>
</div>
<div id="a18" class="tile">
<div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a18 .fail:remove()</code>
</div>
<div id="a19" class="tile"> <div id="a19" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"></div><a></a><b></b></div>
<code>#pcf #a19 b:upward(2)</code> <code>#pcf #a19 .fail:has(+ a)</code>
</div> </div>
<div id="a20" class="tile"> <div id="a20" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a20 b:upward(.fail)</code> <code>#pcf #a20 .fail:has(~ a:has(b))</code>
</div> </div>
<div id="a21" class="tile"> <div id="a21" class="tile">
<div class="pass"><div class="fail"></div><a><b></b></a></div>
<code>#pcf #a21 .fail:remove()</code>
</div>
<div id="a22" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div> <div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a21 b:upward(.fail):style(visibility: hidden !important)</code> <code>#pcf #a22 b:upward(2)</code>
</div>
<div id="a23" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a23 b:upward(.fail)</code>
</div>
<div id="a24" class="tile">
<div class="pass"><div class="fail"><a><b></b></a></div></div>
<code>#pcf #a24 b:upward(.fail):style(visibility: hidden !important)</code>
</div> </div>
</div> </div>