Files
servo/components/xpath
Simon Wülker a417dc5f23 xpath: Don't panic in node name test when namespace prefix is unknown (#39952)
We don't need to care about namespace prefixes in name tests because
they are already resolved to namespaces at this point.

The old implementation was also masking a few other small bugs which
I've fixed here. When the namespace resolver doesn't give us any results
then we should not lookup the namespace on the node itself. In XPath,
namespaces on html elements in html documents are compared a in a
relaxed way, and we were previously also using the relaxed comparison
mode on non-html elements in html documents (like svg).

Testing: Existing tests continue to pass (and the web platform tests
contain numerous namespace tests which cover this behaviour)
Fixes https://github.com/servo/servo/issues/39939
Part of #34527

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
2025-10-18 07:14:37 +00:00
..