fix(xpath): pass in correct context node for // and / in predicates (#37434)

For example `div[count(//p)]` should count all `<p>` elements in the
document, not just the ones underneath the `<div>`.

Testing: WPT tests cover this, the fix makes two more test pass.

Signed-off-by: Ville Lindholm <ville@lindholm.dev>
This commit is contained in:
Ville Lindholm 2025-06-17 21:45:00 +03:00 committed by GitHub
parent 56e901d0c2
commit 07c33a180c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 33 additions and 15 deletions

View file

@ -1,3 +0,0 @@
[predicates.html]
[An expression in a predicate should not change the context node]
expected: FAIL

View file

@ -23,8 +23,5 @@
[Select SVG element with non-ascii attribute 2]
expected: FAIL
[xmlns attribute]
expected: FAIL
[svg element with XLink attribute]
expected: FAIL