Replace urlpattern implementation with rust-urlpattern crate (#36826)

This change implements the full URLPattern API using
https://github.com/denoland/rust-urlpattern, except the two most
important functions (`test` and `exec`). These two are blocked on
https://github.com/servo/servo/issues/28679 due to this union:
539ca27284/components/script_bindings/webidls/URLPattern.webidl (L61).

Testing: Covered by existing web platform tests
Makes https://github.com/servo/servo/pull/36421 obsolete

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-06 11:42:55 +02:00 committed by GitHub
parent 54c2818974
commit 03abec4148
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 292 additions and 2483 deletions

57
Cargo.lock generated
View file

@ -2227,7 +2227,7 @@ dependencies = [
[[package]]
name = "fontsan"
version = "0.5.2"
source = "git+https://github.com/servo/fontsan#138bdb0451c4ea02a303caddc1a6c1fd654ae927"
source = "git+https://github.com/servo/fontsan#c0d0b5333117901e1c31bc3c502c384115b93e6f"
dependencies = [
"cc",
"glob",
@ -6323,6 +6323,7 @@ dependencies = [
"unicode-bidi",
"unicode-segmentation",
"url",
"urlpattern",
"utf-8",
"uuid",
"webdriver",
@ -6828,6 +6829,7 @@ dependencies = [
"unicode-bidi",
"unicode-script",
"url",
"urlpattern",
"uuid",
"webrender_api",
"wr_malloc_size_of",
@ -8010,6 +8012,47 @@ dependencies = [
"arrayvec",
]
[[package]]
name = "unic-char-property"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8c57a407d9b6fa02b4795eb81c5b6652060a15a7903ea981f3d723e6c0be221"
dependencies = [
"unic-char-range",
]
[[package]]
name = "unic-char-range"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0398022d5f700414f6b899e10b8348231abf9173fa93144cbc1a43b9793c1fbc"
[[package]]
name = "unic-common"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "80d7ff825a6a654ee85a63e80f92f054f904f21e7d12da4e22f9834a4aaa35bc"
[[package]]
name = "unic-ucd-ident"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e230a37c0381caa9219d67cf063aa3a375ffed5bf541a452db16e744bdab6987"
dependencies = [
"unic-char-property",
"unic-char-range",
"unic-ucd-version",
]
[[package]]
name = "unic-ucd-version"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96bd2f2237fe450fcd0a1d2f5f4e91711124f7857ba2e964247776ebeeb7b0c4"
dependencies = [
"unic-common",
]
[[package]]
name = "unicase"
version = "2.8.1"
@ -8090,6 +8133,18 @@ dependencies = [
"serde",
]
[[package]]
name = "urlpattern"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70acd30e3aa1450bc2eece896ce2ad0d178e9c079493819301573dae3c37ba6d"
dependencies = [
"regex",
"serde",
"unic-ucd-ident",
"url",
]
[[package]]
name = "utf-8"
version = "0.7.6"