fix matches-path and matches-media fast path

This commit is contained in:
Anton Lazarev
2025-05-21 19:15:00 -07:00
parent 89ddc4c2fb
commit bae8d7dee2
2 changed files with 3 additions and 3 deletions
@@ -2825,8 +2825,8 @@ IN_PROC_BROWSER_TEST_F(AdBlockServiceTest, ProceduralFilterMatchesPath) {
UpdateAdBlockInstanceWithRules(
"a.com##section .positive-string-case "
"p.odd:matches-path(cosmetic_filtering.html)\n"
"a.com##section .positive-regex-case "
"p.odd:matches-path(/c[aeiou]smetic\\_[a-z]{9}/)\n"
"a.com##:matches-path(/c[aeiou]smetic\\_[a-z]{9}/) section "
".positive-regex-case p.odd\n"
"a.com##section .negative-case:matches-path(/some-other-page.html)");
GURL tab_url =
@@ -580,7 +580,7 @@ const applyCompiledSelector = (selector: CompiledProceduralSelector,
// Note that unless we've taken the if-true branch above, then
// the nodesToConsider array will still have all the elements
// it started with.
break
continue
}
let newNodesToConsider: HTMLElement[] = []