Implement URLPattern::{text, exec} (#37044)

With this change the URLPattern API is fully implemented. I'll look into
the remaining failures and then enable the preference by default.

Testing: Covered by web platform tests

Depends on https://github.com/servo/servo/pull/37042

---------

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
This commit is contained in:
Simon Wülker 2025-05-24 13:12:11 +02:00 committed by GitHub
parent 0ed2c4816c
commit 7fd0c81f55
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 169 additions and 3633 deletions

View file

@ -7,7 +7,7 @@
use std::cmp::Eq;
use std::hash::Hash;
use std::marker::Sized;
use std::ops::Deref;
use std::ops::{Deref, DerefMut};
use indexmap::IndexMap;
use js::conversions::{ConversionResult, FromJSValConvertible, ToJSValConvertible};
@ -94,11 +94,17 @@ impl<K: RecordKey, V> Record<K, V> {
impl<K: RecordKey, V> Deref for Record<K, V> {
type Target = IndexMap<K, V>;
fn deref(&self) -> &IndexMap<K, V> {
fn deref(&self) -> &Self::Target {
&self.map
}
}
impl<K: RecordKey, V> DerefMut for Record<K, V> {
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.map
}
}
impl<K, V, C> FromJSValConvertible for Record<K, V>
where
K: RecordKey,