Move XPath implementation into its own crate (#39546)

XPath (and, in the future, XSLT) is only loosely coupled to `script`. As
`script` is already very large, I'd like to move the xpath parser and
evaluator into a seperate crate. Doing so allows us to iterate on it
more easily, without having to recompile `script`. Abstracting over the
concrete DOM implementation could also allow us to write some more
comprehensive unit tests.

Testing: Covered by existing web platform tests
Part of https://github.com/servo/servo/issues/34527
Fixes https://github.com/servo/servo/issues/39551

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-09-30 21:55:10 +02:00 committed by GitHub
parent d0dd9d7e3a
commit e5017b1b50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 756 additions and 431 deletions

View file

@ -1,6 +1,7 @@
[workspace]
resolver = "2"
members = [
"components/xpath",
"ports/servoshell",
"tests/unit/*",
]
@ -188,6 +189,7 @@ wio = "0.2"
wr_malloc_size_of = { git = "https://github.com/servo/webrender", branch = "0.67" }
xi-unicode = "0.3.0"
xml5ever = "0.35"
xpath = { path = "components/xpath" }
[profile.release]
opt-level = 3