diff --git a/Cargo.lock b/Cargo.lock index 4fc4f15..51daf39 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1291,9 +1291,9 @@ dependencies = [ [[package]] name = "chacha20" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f8d983286843e49675a4b7a2d174efe136dc93a18d69130dd18198a6c167601" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" dependencies = [ "cfg-if", "cipher 0.5.2", @@ -4644,7 +4644,7 @@ dependencies = [ "icu_properties 1.5.1", "icu_provider 1.5.0", "icu_provider_adapters", - "icu_segmenter", + "icu_segmenter 1.5.0", "icu_timezone", "tinystr 0.7.6", "unicode-bidi", @@ -4829,6 +4829,21 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52b1a7fbdbf3958f1be8354cb59ac73f165b7b7082d447ff2090355c9a069120" +[[package]] +name = "icu_locale" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5a396343c7208121dc86e35623d3dfe19814a7613cfd14964994cdc9c9a2e26" +dependencies = [ + "icu_collections 2.2.0", + "icu_locale_core", + "icu_locale_data", + "icu_provider 2.2.0", + "potential_utf", + "tinystr 0.8.3", + "zerovec 0.11.6", +] + [[package]] name = "icu_locale_core" version = "2.2.0" @@ -4837,11 +4852,18 @@ checksum = "92219b62b3e2b4d88ac5119f8904c10f8f61bf7e95b640d25ba3075e6cac2c29" dependencies = [ "displaydoc", "litemap 0.8.2", + "serde", "tinystr 0.8.3", "writeable 0.6.3", "zerovec 0.11.6", ] +[[package]] +name = "icu_locale_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fdcc9ac77c6d74ff5cf6e65ef3181d6af32003b16fce3a77fb451d2f695993" + [[package]] name = "icu_locid" version = "1.5.0" @@ -5019,6 +5041,8 @@ checksum = "139c4cf31c8b5f33d7e199446eff9c1e02decfc2f0eec2c8d71f65befa45b421" dependencies = [ "displaydoc", "icu_locale_core", + "serde", + "stable_deref_trait", "writeable 0.6.3", "yoke 0.8.3", "zerofrom", @@ -5061,17 +5085,39 @@ dependencies = [ "icu_collections 1.5.0", "icu_locid", "icu_provider 1.5.0", - "icu_segmenter_data", + "icu_segmenter_data 1.5.1", "utf8_iter", "zerovec 0.10.4", ] +[[package]] +name = "icu_segmenter" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c0794db0b1a86193ac9c48768d0e6c52c54448e0870ad87907d456ee0dac964" +dependencies = [ + "core_maths", + "icu_collections 2.2.0", + "icu_locale", + "icu_provider 2.2.0", + "icu_segmenter_data 2.2.0", + "potential_utf", + "utf8_iter", + "zerovec 0.11.6", +] + [[package]] name = "icu_segmenter_data" version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1e52775179941363cc594e49ce99284d13d6948928d8e72c755f55e98caa1eb" +[[package]] +name = "icu_segmenter_data" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4a2c462a4d927d512f5f882a033ddd62f33a05bb9f230d98f736ac3dc85938f" + [[package]] name = "icu_timezone" version = "1.5.0" @@ -5687,9 +5733,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.102" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ "cfg-if", "futures-util", @@ -8083,6 +8129,8 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0103b1cef7ec0cf76490e969665504990193874ea05c85ff9bab8b911d0a0564" dependencies = [ + "serde_core", + "writeable 0.6.3", "zerovec 0.11.6", ] @@ -9265,7 +9313,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.38.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "bitflags 2.13.0", "cssparser", @@ -10008,7 +10056,7 @@ dependencies = [ "euclid", "icu_locid", "icu_properties 1.5.1", - "icu_segmenter", + "icu_segmenter 1.5.0", "itertools 0.15.0", "kurbo", "log", @@ -11027,7 +11075,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.4.3" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "serde", "stable_deref_trait", @@ -11560,7 +11608,7 @@ dependencies = [ [[package]] name = "stylo" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "app_units", "arrayvec", @@ -11571,7 +11619,7 @@ dependencies = [ "derive_more", "encoding_rs", "euclid", - "icu_segmenter", + "icu_segmenter 2.2.0", "indexmap", "itertools 0.14.0", "itoa", @@ -11616,7 +11664,7 @@ dependencies = [ [[package]] name = "stylo_atoms" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "string_cache", "string_cache_codegen", @@ -11625,7 +11673,7 @@ dependencies = [ [[package]] name = "stylo_derive" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "darling", "proc-macro2", @@ -11637,7 +11685,7 @@ dependencies = [ [[package]] name = "stylo_dom" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "bitflags 2.13.0", "stylo_malloc_size_of", @@ -11646,7 +11694,7 @@ dependencies = [ [[package]] name = "stylo_malloc_size_of" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "app_units", "cssparser", @@ -11663,7 +11711,7 @@ dependencies = [ [[package]] name = "stylo_static_prefs" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "toml 1.1.2+spec-1.1.0", ] @@ -11671,7 +11719,7 @@ dependencies = [ [[package]] name = "stylo_traits" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "app_units", "bitflags 2.13.0", @@ -12166,6 +12214,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8323304221c2a851516f22236c5722a72eaa19749016521d6dff0824447d96d" dependencies = [ "displaydoc", + "serde_core", "zerovec 0.11.6", ] @@ -12197,7 +12246,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.4.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "cssparser", "servo_arc", @@ -12210,7 +12259,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.1.0" -source = "git+https://github.com/servo/stylo?rev=71bbb705678fbcdbab105f0ffc5a339b6600186f#71bbb705678fbcdbab105f0ffc5a339b6600186f" +source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" dependencies = [ "darling", "proc-macro2", @@ -12804,9 +12853,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.3" +version = "1.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" +checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -13060,9 +13109,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -13073,9 +13122,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.75" +version = "0.4.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503b14d284f2c8dac03b819967e155ea753f573586193b2b2c95990cb5d69280" +checksum = "c62df1340f32221cb9c54d6a27b030e3dba64361d4a95bed55f9aacb44da291d" dependencies = [ "js-sys", "wasm-bindgen", @@ -13083,9 +13132,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -13093,9 +13142,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", @@ -13106,9 +13155,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] @@ -13237,9 +13286,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.102" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" +checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" dependencies = [ "js-sys", "wasm-bindgen", @@ -13277,7 +13326,7 @@ dependencies = [ "bytes", "cookie 0.16.2", "http 0.2.12", - "icu_segmenter", + "icu_segmenter 1.5.0", "log", "serde", "serde_derive", @@ -14499,6 +14548,7 @@ dependencies = [ "displaydoc", "yoke 0.8.3", "zerofrom", + "zerovec 0.11.6", ] [[package]] @@ -14518,6 +14568,7 @@ version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90f911cbc359ab6af17377d242225f4d75119aec87ea711a880987b18cd7b239" dependencies = [ + "serde", "yoke 0.8.3", "zerofrom", "zerovec-derive 0.11.3", diff --git a/Cargo.toml b/Cargo.toml index c53e66c..44b3915 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -220,7 +220,7 @@ script_bindings = { package = "servo-script-bindings", version = "0.1.0", path = script_traits = { package = "servo-script-traits", path = "source/components/shared/script" } sea-query = { version = "1.0.0-rc.30", default-features = false, features = ["backend-sqlite", "derive"] } sea-query-rusqlite = { version = "0.8.0-rc.15" } -selectors = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } +selectors = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } seq-macro = "0.3.6" serde = "1.0.228" serde_bytes = "0.11" @@ -259,7 +259,7 @@ servo-media-webrtc = { version = "0.1.0", path = "source/components/media/webrtc servo-wakelock = { version = "0.1.0", path = "source/components/wakelock" } servo_allocator = { package = "servo-allocator", version = "0.1.0", path = "source/components/allocator" } servo-tracing = { path = "source/components/servo_tracing" } -servo_arc = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } +servo_arc = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } servo-url = { version = "0.1.0", path = "source/components/url" } sha1 = "0.11" sha2 = "0.11" @@ -271,13 +271,13 @@ storage = { package = "servo-storage", version = "0.1.0", path = "source/compone storage_traits = { package = "servo-storage-traits", path = "source/components/shared/storage" } string_cache = "0.9" strum = { version = "0.27", features = ["derive"] } -stylo = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_atoms = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_config = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_dom = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } -stylo_traits = { git = "https://github.com/servo/stylo", rev = "71bbb705678fbcdbab105f0ffc5a339b6600186f" } +stylo = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_atoms = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_config = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_dom = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } +stylo_traits = { git = "https://github.com/servo/stylo", rev = "89499265377cfdf48b9257531259b02642aafa06" } surfman = { version = "0.13.0", features = ["chains"] } swapper = "0.1" syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } diff --git a/forkme.lock b/forkme.lock index 0690b87..ac2c6c1 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -c8d4985b4768f2bf562051f62c0ec53a77aa3e24 +c3ddc1bbf2d9c9f708b32f2d9e3cbd24b6adc3e5 diff --git a/patches/components/script/dom/embedder.rs.patch b/patches/components/script/dom/embedder.rs.patch index 3a48522..76c238e 100644 --- a/patches/components/script/dom/embedder.rs.patch +++ b/patches/components/script/dom/embedder.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,560 @@ +@@ -0,0 +1,552 @@ +/* SPDX Id: AGPL-3.0-or-later */ + +//! The `Embedder` interface provides communication between web content and the embedder. @@ -97,11 +97,9 @@ + if !detail_obj.get().is_null() { + // Set errorType property + rooted!(&in(cx) let mut error_type_val = UndefinedValue()); -+ error_type.as_str().safe_to_jsval( -+ cx.into(), -+ error_type_val.handle_mut(), -+ CanGc::from_cx(cx), -+ ); ++ error_type ++ .as_str() ++ .safe_to_jsval(cx, error_type_val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -112,7 +110,7 @@ + + // Set message property + rooted!(&in(cx) let mut message_val = UndefinedValue()); -+ message.safe_to_jsval(cx.into(), message_val.handle_mut(), CanGc::from_cx(cx)); ++ message.safe_to_jsval(cx, message_val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -156,7 +154,7 @@ + if !detail_obj.get().is_null() { + // Set name property + rooted!(&in(cx) let mut name_val = UndefinedValue()); -+ name.safe_to_jsval(cx.into(), name_val.handle_mut(), CanGc::from_cx(cx)); ++ name.safe_to_jsval(cx, name_val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -170,16 +168,10 @@ + match value { + PrefValue::Bool(b) => value_val.set(BooleanValue(*b)), + PrefValue::Int(i) => value_val.set(Int32Value(*i as i32)), -+ PrefValue::Str(s) => { -+ s.safe_to_jsval(cx.into(), value_val.handle_mut(), CanGc::from_cx(cx)) -+ }, ++ PrefValue::Str(s) => s.safe_to_jsval(cx, value_val.handle_mut()), + _ => { + // For other types, convert to string representation -+ format!("{:?}", value).safe_to_jsval( -+ cx.into(), -+ value_val.handle_mut(), -+ CanGc::from_cx(cx), -+ ); ++ format!("{:?}", value).safe_to_jsval(cx, value_val.handle_mut()); + }, + } + JS_DefineProperty( @@ -227,7 +219,7 @@ + if !detail_obj.get().is_null() { + rooted!(&in(cx) let mut val = UndefinedValue()); + -+ request_id.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ request_id.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -236,7 +228,7 @@ + JSPROP_ENUMERATE as u32, + ); + -+ task_name.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ task_name.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -245,7 +237,7 @@ + JSPROP_ENUMERATE as u32, + ); + -+ providers_json.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ providers_json.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -255,7 +247,7 @@ + ); + + if let Some(default_id) = default_provider { -+ default_id.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ default_id.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -300,7 +292,7 @@ + if !detail_obj.get().is_null() { + rooted!(&in(cx) let mut val = UndefinedValue()); + -+ request_id.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ request_id.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -309,7 +301,7 @@ + JSPROP_ENUMERATE as u32, + ); + -+ url.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ url.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -318,7 +310,7 @@ + JSPROP_ENUMERATE as u32, + ); + -+ title.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ title.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -361,7 +353,7 @@ + if !detail_obj.get().is_null() { + rooted!(&in(cx) let mut val = UndefinedValue()); + -+ request_id.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ request_id.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), @@ -370,7 +362,7 @@ + JSPROP_ENUMERATE as u32, + ); + -+ providers_json.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ providers_json.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( + cx.raw_cx(), + detail_obj.handle(), diff --git a/patches/components/script/dom/html/htmlembeddedwebview.rs.patch b/patches/components/script/dom/html/htmlembeddedwebview.rs.patch index f8663af..42ea8fa 100644 --- a/patches/components/script/dom/html/htmlembeddedwebview.rs.patch +++ b/patches/components/script/dom/html/htmlembeddedwebview.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -0,0 +1,1138 @@ +@@ -0,0 +1,1132 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ @@ -119,16 +119,12 @@ + // Convert event data to JS value for CustomEvent detail + match &event { + EmbeddedWebViewEventType::UrlChanged(url) => { -+ url.as_str() -+ .safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ url.as_str().safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::TitleChanged(title) => { + // Option needs special handling - convert to null or string + match title { -+ Some(t) => { -+ t.as_str() -+ .safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)) -+ }, ++ Some(t) => t.as_str().safe_to_jsval(cx, detail.handle_mut()), + None => { + // detail stays as undefined for null/None title + }, @@ -140,7 +136,7 @@ + LoadStatus::HeadParsed => "headparsed", + LoadStatus::Complete => "complete", + }; -+ status_str.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ status_str.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::FaviconChanged { + bytes, @@ -151,25 +147,23 @@ + let global = self.owner_global(); + let blob_impl = BlobImpl::new_from_bytes(bytes.to_vec(), "image/png".to_string()); + let blob = Blob::new(cx, &global, blob_impl); -+ blob.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ blob.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::Closed => { + // detail stays as undefined for closed event + }, + EmbeddedWebViewEventType::HistoryChanged(_, index) => { + // For history change, expose the current index -+ (*index as u32).safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ (*index as u32).safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::HistoryTraversalComplete(traversal_id) => { + // Expose the traversal ID so scripts can match with goBack()/goForward() return values -+ traversal_id.to_string().safe_to_jsval( -+ cx.into(), -+ detail.handle_mut(), -+ CanGc::from_cx(cx), -+ ); ++ traversal_id ++ .to_string() ++ .safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::ThemeColorChanged(content) => { -+ content.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ content.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::InputReceived => { + // detail stays as undefined for input received event @@ -396,14 +390,14 @@ + permissionParameters: permission_parameters, + }; + -+ event_detail.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ event_detail.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::EmbedderControlHide { id } => { + // Create a dictionary for hide events + let event_detail = EmbedderControlHideEventDetail { + controlId: DOMString::from(format!("{:?}", id)), + }; -+ event_detail.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ event_detail.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::SimpleDialogShow(request) => { + // Clone the request to take ownership since we're matching on a reference @@ -456,7 +450,7 @@ + message: DOMString::from(message), + defaultValue: Some(default_value.map(DOMString::from)), + }; -+ event_detail.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ event_detail.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::NotificationShow(notification) => { + let event_detail = EmbedderNotificationShowEventDetail { @@ -468,7 +462,7 @@ + .as_ref() + .map(|url| DOMString::from(url.as_str())), + }; -+ event_detail.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ event_detail.safe_to_jsval(cx, detail.handle_mut()); + }, + EmbeddedWebViewEventType::MediaSessionEvent(session_event) => { + let event_detail = match session_event { @@ -512,7 +506,7 @@ + } + }, + }; -+ event_detail.safe_to_jsval(cx.into(), detail.handle_mut(), CanGc::from_cx(cx)); ++ event_detail.safe_to_jsval(cx, detail.handle_mut()); + }, + } + diff --git a/patches/components/script/dom/html/input_element/mod.rs.patch b/patches/components/script/dom/html/input_element/mod.rs.patch index e7deffa..cd7b071 100644 --- a/patches/components/script/dom/html/input_element/mod.rs.patch +++ b/patches/components/script/dom/html/input_element/mod.rs.patch @@ -11,7 +11,7 @@ use encoding_rs::Encoding; use fonts::{ByteIndex, TextByteRange}; use html5ever::{LocalName, Prefix, local_name}; -@@ -1989,10 +1991,25 @@ +@@ -1982,10 +1984,25 @@ .hide_embedder_control(self.upcast()); } else if *event_type == *"focus" { let input_type = &*self.input_type(); diff --git a/patches/components/script/dom/servointernals.rs.patch b/patches/components/script/dom/servointernals.rs.patch index aa03f05..03a629f 100644 --- a/patches/components/script/dom/servointernals.rs.patch +++ b/patches/components/script/dom/servointernals.rs.patch @@ -1,27 +1,26 @@ --- original +++ modified -@@ -13,10 +13,11 @@ +@@ -13,9 +13,10 @@ use profile_traits::mem::MemoryReportResult; use script_bindings::conversions::SafeToJSValConvertible; use script_bindings::error::{Error, Fallible}; -use script_bindings::interfaces::ServoInternalsHelpers; +use script_bindings::interfaces::{EmbedderHelpers, ServoInternalsHelpers}; use script_bindings::reflector::{Reflector, reflect_dom_object}; - use script_bindings::script_runtime::JSContext; use script_bindings::str::USVString; +use servo_config::embedder_prefs; use servo_config::prefs::{self, PrefValue, Preferences}; use servo_constellation_traits::ScriptToConstellationMessage; -@@ -24,6 +25,7 @@ - use crate::dom::bindings::import::base::SafeJSContext; +@@ -22,6 +23,7 @@ + use crate::dom::bindings::codegen::Bindings::ServoInternalsBinding::ServoInternalsMethods; use crate::dom::bindings::reflector::DomGlobal; use crate::dom::bindings::root::DomRoot; +use crate::dom::embedder::Embedder; use crate::dom::globalscope::GlobalScope; use crate::dom::promise::Promise; use crate::routed_promise::{RoutedPromiseListener, callback_promise}; -@@ -143,22 +145,38 @@ +@@ -141,22 +143,38 @@ /// fn GetBoolPreference(&self, name: USVString) -> Fallible { @@ -70,7 +69,7 @@ } Err(Error::TypeMismatch(None)) } -@@ -165,11 +183,19 @@ +@@ -163,11 +181,19 @@ /// fn GetStringPreference(&self, name: USVString) -> Fallible { @@ -95,7 +94,7 @@ } Err(Error::TypeMismatch(None)) } -@@ -176,23 +202,59 @@ +@@ -174,23 +200,59 @@ /// fn SetBoolPreference(&self, name: USVString, value: bool) { @@ -164,7 +163,7 @@ } } -@@ -212,7 +274,10 @@ +@@ -210,7 +272,10 @@ impl ServoInternalsHelpers for ServoInternals { /// The navigator.servo api is exposed to about: pages except about:blank, as /// well as any URLs provided by embedders that register new protocol handlers. diff --git a/patches/components/script/dom/window/window.rs.patch b/patches/components/script/dom/window/window.rs.patch index 36eccbc..8751946 100644 --- a/patches/components/script/dom/window/window.rs.patch +++ b/patches/components/script/dom/window/window.rs.patch @@ -18,9 +18,9 @@ +}; +use js::jsval::{NullValue, ObjectValue, UndefinedValue}; use js::realm::{AutoRealm, CurrentRealm}; - use js::rust::wrappers::JS_DefineProperty; - use js::rust::wrappers2::JS_GC; -@@ -48,6 +50,7 @@ + use js::rust::wrappers2::{JS_DefineProperty, JS_GC}; + use js::rust::{ +@@ -47,6 +49,7 @@ ReflowStatistics, RestyleReason, ScrollContainerQueryFlags, ScrollContainerResponse, TrustedNodeAddress, combine_id_with_fragment_type, }; @@ -28,7 +28,7 @@ use malloc_size_of::MallocSizeOf; use media::WindowGLContext; use net_traits::image_cache::{ -@@ -156,6 +159,7 @@ +@@ -155,6 +158,7 @@ use crate::dom::html::htmliframeelement::HTMLIFrameElement; use crate::dom::idbfactory::IDBFactory; use crate::dom::inputevent::HitTestResult; @@ -36,7 +36,7 @@ use crate::dom::location::Location; use crate::dom::medialist::MediaList; use crate::dom::mediaquerylist::{MediaQueryList, MediaQueryListMatchState}; -@@ -1146,12 +1150,22 @@ +@@ -1143,12 +1147,22 @@ let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -60,7 +60,7 @@ receiver.recv().unwrap_or_else(|_| { // If the receiver is closed, we assume the dialog was cancelled. debug!("Alert dialog was cancelled or failed to show."); -@@ -1179,13 +1193,22 @@ +@@ -1176,13 +1190,22 @@ // the user to respond with a positive or negative response. let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -84,7 +84,7 @@ // Step 5: Let userPromptHandler be WebDriver BiDi user prompt opened with this, // "confirm", and message. // -@@ -1230,6 +1253,7 @@ +@@ -1227,6 +1250,7 @@ // defaulted to the value given by default. let (sender, receiver) = ProfiledGenericChannel::channel(self.global().time_profiler_chan().clone()).unwrap(); @@ -92,7 +92,7 @@ let dialog = SimpleDialogRequest::Prompt { id: self.Document().embedder_controls().next_control_id(), message: String::from(message), -@@ -1236,8 +1260,16 @@ +@@ -1233,8 +1257,16 @@ default: String::from(default), response_sender: sender, }; @@ -110,7 +110,7 @@ // Step 6: Let userPromptHandler be WebDriver BiDi user prompt opened with this, // "prompt", and message. // TODO: Add support for WebDriver BiDi. -@@ -1730,6 +1762,27 @@ +@@ -1727,6 +1759,27 @@ // https://html.spec.whatwg.org/multipage/#windoweventhandlers window_event_handlers!(); @@ -138,7 +138,7 @@ /// fn Screen(&self, can_gc: CanGc) -> DomRoot { self.screen.or_init(|| Screen::new(self, can_gc)) -@@ -3112,9 +3165,33 @@ +@@ -3095,9 +3148,33 @@ &self, input_event: &ConstellationInputEvent, ) -> Option { @@ -175,7 +175,7 @@ } #[expect(unsafe_code)] -@@ -3133,8 +3210,34 @@ +@@ -3116,8 +3193,34 @@ // SAFETY: This is safe because `Window::query_elements_from_point` has ensured that // layout has run and any OpaqueNodes that no longer refer to real nodes are gone. let address = UntrustedNodeAddress(result.node.0 as *const c_void); @@ -211,7 +211,7 @@ cursor: result.cursor, point_in_node: result.point_in_target, point_in_frame, -@@ -3503,17 +3606,19 @@ +@@ -3486,17 +3589,19 @@ } pub(crate) fn send_to_embedder(&self, msg: EmbedderMsg) { @@ -237,7 +237,7 @@ } #[cfg(feature = "webxr")] -@@ -3695,6 +3800,8 @@ +@@ -3678,6 +3783,8 @@ player_context: WindowGLContext, #[cfg(feature = "webgpu")] gpu_id_hub: Arc, inherited_secure_context: Option, @@ -246,7 +246,7 @@ theme: Theme, weak_script_thread: Weak, ) -> DomRoot { -@@ -3720,6 +3827,8 @@ +@@ -3703,6 +3810,8 @@ gpu_id_hub, inherited_secure_context, unminify_js, @@ -255,7 +255,7 @@ Some(font_context), ), ongoing_navigation: Default::default(), -@@ -3982,3 +4091,114 @@ +@@ -3965,3 +4074,114 @@ Self::create_named_properties_object(cx, proto, object) } } @@ -336,9 +336,9 @@ + rooted!(&in(cx) let mut val = UndefinedValue()); + + // name -+ task_name.safe_to_jsval(cx.into(), val.handle_mut(), CanGc::from_cx(cx)); ++ task_name.safe_to_jsval(cx, val.handle_mut()); + JS_DefineProperty( -+ cx.raw_cx(), ++ cx, + result_obj.handle(), + c"name".as_ptr(), + val.handle(), @@ -347,7 +347,7 @@ + + // data + JS_DefineProperty( -+ cx.raw_cx(), ++ cx, + result_obj.handle(), + c"data".as_ptr(), + data_val.handle(), @@ -356,9 +356,9 @@ + + // port + rooted!(&in(cx) let mut port_val = UndefinedValue()); -+ local_port.safe_to_jsval(cx.into(), port_val.handle_mut(), CanGc::from_cx(cx)); ++ local_port.safe_to_jsval(cx, port_val.handle_mut()); + JS_DefineProperty( -+ cx.raw_cx(), ++ cx, + result_obj.handle(), + c"port".as_ptr(), + port_val.handle(), diff --git a/patches/components/script_bindings/codegen/Bindings.conf.patch b/patches/components/script_bindings/codegen/Bindings.conf.patch index 4789bc1..03ff59c 100644 --- a/patches/components/script_bindings/codegen/Bindings.conf.patch +++ b/patches/components/script_bindings/codegen/Bindings.conf.patch @@ -60,16 +60,16 @@ 'implicitCxSetters': True, }, -@@ -1089,7 +1119,7 @@ +@@ -1103,7 +1133,7 @@ 'Navigator': { 'inRealms': ['GetVRDisplays'], -- 'cx': ['Bluetooth', 'Clipboard', 'Gpu', 'Languages', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], -+ 'cx': ['Atproto', 'Bluetooth', 'Clipboard', 'CreatePeerStream', 'Embedder', 'Gpu', 'Keyboard', 'Languages', 'RequestTask', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], +- 'cx': ['Bluetooth', 'Clipboard', 'Geolocation', 'Gpu', 'Languages', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], ++ 'cx': ['Atproto', 'Bluetooth', 'Clipboard', 'CreatePeerStream', 'Embedder', 'Geolocation', 'Gpu', 'Keyboard', 'Languages', 'RequestTask', 'SendBeacon', 'ServiceWorker', 'Storage', 'UserActivation', 'WakeLock', 'Xr'], }, 'CredentialsContainer': { -@@ -1149,6 +1179,10 @@ +@@ -1163,6 +1193,10 @@ 'cx': ['RegisterPaint'], }, @@ -80,11 +80,11 @@ 'PannerNode': { 'cx': ['Constructor'], }, -@@ -1542,6 +1576,7 @@ +@@ -1557,6 +1591,7 @@ 'additionalTraits': ['crate::interfaces::WindowHelpers'], 'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'WebdriverCallback', 'GetOpener', 'Fetch'], 'cx': [ + 'AcceptTask', 'Close', 'CustomElements', - 'Focus', + 'Event',