diff --git a/Cargo.lock b/Cargo.lock index b0e22c2..e7f419b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -432,9 +432,9 @@ checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" [[package]] name = "arrayvec" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +checksum = "f02882884d3e1bc524fb12c79f107f6ad0e1cfd498c536ffb494301740995dfe" dependencies = [ "serde", ] @@ -2099,6 +2099,38 @@ dependencies = [ "tokio", ] +[[package]] +name = "defmt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e524506490a1953d237cb87b1cfc1e46f88c18f10a22dfe0f507dc6bfc7f7f" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a27770e9c8f719a79d8b638281f4d828f77d8fd61e0bd94451b9b85e576a0b" +dependencies = [ + "defmt-parser", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.118", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror 2.0.18", +] + [[package]] name = "der" version = "0.7.10" @@ -5559,10 +5591,11 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" +checksum = "34f877a98676d2fb664698d74cc6a51ce6c484ce8c770f05d0108ec9090aeb46" dependencies = [ + "defmt", "jiff-static", "log", "portable-atomic", @@ -5572,9 +5605,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" +checksum = "0666b5ab5ecaca213fc2a85b8c0083d9004e84ee2d5f9a7e0017aaf50986f25f" dependencies = [ "proc-macro2", "quote", @@ -5998,9 +6031,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953f07c43838f8e6f9758cab68bf5bed85465e7587ebe0b823f1bcd81978ad3a" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "loom" @@ -8217,6 +8250,28 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.118", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -10578,7 +10633,6 @@ dependencies = [ "cssparser", "ctr 0.10.1", "data-url", - "digest 0.11.3", "ecdsa 0.17.0-rc.20", "elliptic-curve 0.14.0-rc.35", "encoding_rs", diff --git a/Cargo.toml b/Cargo.toml index 1054933..155b956 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,7 +66,6 @@ deny_public_fields = { package = "servo-deny-public-fields", version = "0.1.0", der = { version = "0.7", features = ["alloc", "derive"] } devtools = { package = "servo-devtools", version = "0.1.0", path = "source/components/devtools" } devtools_traits = { package = "servo-devtools-traits", path = "source/components/shared/devtools" } -digest = "0.11" dom_struct = { package = "servo-dom-struct", version = "0.1.0", path = "source/components/dom_struct" } dpi = "0.1" dwrote = "0.11.5" diff --git a/forkme.lock b/forkme.lock index 65a3a11..7e6e350 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -12d384266f3112285c7107c077179d973f0e130b +f8eb3c4d98f0bb7d0dfb5ed2ed184614cc850b40 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index ef72ba4..a80351c 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -705,7 +705,7 @@ "url", "uuid", "webrender_api", -@@ -9133,6 +9560,7 @@ +@@ -9132,6 +9559,7 @@ "bpaf", "cc", "cfg-if", @@ -713,7 +713,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9147,6 +9575,7 @@ +@@ -9146,6 +9574,7 @@ "headers", "hilog", "hitrace", @@ -721,7 +721,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9167,6 +9596,7 @@ +@@ -9166,6 +9595,7 @@ "ohos-window-manager-sys", "raw-window-handle", "rustls", @@ -729,7 +729,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9173,6 +9603,7 @@ +@@ -9172,6 +9602,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -737,7 +737,7 @@ "surfman", "tokio", "tracing", -@@ -9791,6 +10222,9 @@ +@@ -9790,6 +10221,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -747,7 +747,7 @@ [[package]] name = "synstructure" -@@ -9825,6 +10259,27 @@ +@@ -9824,6 +10258,27 @@ ] [[package]] @@ -775,7 +775,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -9850,6 +10305,12 @@ +@@ -9849,6 +10304,12 @@ ] [[package]] @@ -788,7 +788,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10168,6 +10629,16 @@ +@@ -10167,6 +10628,16 @@ ] [[package]] @@ -805,7 +805,7 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10269,6 +10740,25 @@ +@@ -10268,6 +10739,25 @@ "futures-util", "pin-project-lite", "sync_wrapper", @@ -831,7 +831,7 @@ "tower-layer", "tower-service", ] -@@ -10588,6 +11078,12 @@ +@@ -10587,6 +11077,12 @@ ] [[package]] @@ -844,7 +844,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -11573,6 +12069,17 @@ +@@ -11572,6 +12068,17 @@ ] [[package]] diff --git a/patches/components/script/dom/atproto.rs.patch b/patches/components/script/dom/atproto.rs.patch index 5307a5b..d05d821 100644 --- a/patches/components/script/dom/atproto.rs.patch +++ b/patches/components/script/dom/atproto.rs.patch @@ -41,7 +41,7 @@ +impl AtProto { + fn request(&self, cx: &mut JSContext, request: AtProtoRequest) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + diff --git a/patches/components/script/dom/contentblocker.rs.patch b/patches/components/script/dom/contentblocker.rs.patch index 22440a7..e213b3f 100644 --- a/patches/components/script/dom/contentblocker.rs.patch +++ b/patches/components/script/dom/contentblocker.rs.patch @@ -42,7 +42,7 @@ +impl ContentBlockerMethods for ContentBlocker { + fn GetOriginState(&self, cx: &mut JSContext, origin: USVString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -65,7 +65,7 @@ + enabled: bool, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -85,7 +85,7 @@ + + fn ResetCounts(&self, cx: &mut JSContext, origin: USVString) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + diff --git a/patches/components/script/dom/dbus.rs.patch b/patches/components/script/dom/dbus.rs.patch index 296e87f..7e4a500 100644 --- a/patches/components/script/dom/dbus.rs.patch +++ b/patches/components/script/dom/dbus.rs.patch @@ -83,7 +83,7 @@ + options: RootedTraceableBox, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -113,7 +113,7 @@ + + fn GetProperty(&self, cx: &mut JSContext, options: &DBusPropertyOptions) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -141,7 +141,7 @@ + value: HandleValue, + ) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -167,7 +167,7 @@ + + fn Subscribe(&self, cx: &mut JSContext, options: &DBusSignalOptions) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + @@ -196,7 +196,7 @@ + + fn Unsubscribe(&self, cx: &mut JSContext, subscription_id: u32) -> Rc { + let global = &self.global(); -+ let promise = Promise::new2(cx, global); ++ let promise = Promise::new(cx, global); + let task_source = global.task_manager().dom_manipulation_task_source(); + let callback = callback_promise(&promise, self, task_source); + diff --git a/patches/components/script/dom/document/mod.rs.patch b/patches/components/script/dom/document/mod.rs.patch index 3f4dd07..59d2e12 100644 --- a/patches/components/script/dom/document/mod.rs.patch +++ b/patches/components/script/dom/document/mod.rs.patch @@ -1,9 +1,12 @@ --- original +++ modified -@@ -11,5 +11,6 @@ +@@ -11,7 +11,9 @@ pub(crate) mod documentorshadowroot; pub(crate) mod documenttype; pub(crate) mod focus; +pub(crate) mod spatial_navigation; + mod tree_ordered_index_map; ++ + pub(crate) mod visibilitystateentry; pub(crate) use self::document::*; diff --git a/patches/components/script/dom/globalscope.rs.patch b/patches/components/script/dom/globalscope.rs.patch index f530303..89212f7 100644 --- a/patches/components/script/dom/globalscope.rs.patch +++ b/patches/components/script/dom/globalscope.rs.patch @@ -17,7 +17,7 @@ /// Directory to store unminified scripts for this window if unminify-js /// opt is enabled. unminified_js_dir: Option, -@@ -802,6 +812,8 @@ +@@ -805,6 +815,8 @@ #[cfg(feature = "webgpu")] gpu_id_hub: Arc, inherited_secure_context: Option, unminify_js: bool, @@ -26,7 +26,7 @@ font_context: Option>, ) -> Self { Self { -@@ -844,6 +856,8 @@ +@@ -847,6 +859,8 @@ console_group_stack: DomRefCell::new(Vec::new()), console_count_map: Default::default(), inherited_secure_context, @@ -35,7 +35,7 @@ unminified_js_dir: unminify_js.then(|| unminified_path("unminified-js")), byte_length_queuing_strategy_size_function: OnceCell::new(), count_queuing_strategy_size_function: OnceCell::new(), -@@ -1173,6 +1187,25 @@ +@@ -1176,6 +1190,25 @@ .send(ScriptToConstellationMessage::EntanglePorts(port1, port2)); } @@ -61,7 +61,7 @@ /// Handle the transfer of a port in the current task. pub(crate) fn mark_port_as_transferred(&self, port_id: &MessagePortId) -> MessagePortImpl { if let MessagePortState::Managed(_id, message_ports) = -@@ -3174,6 +3207,16 @@ +@@ -3180,6 +3213,16 @@ self.inherited_secure_context } diff --git a/patches/components/script/dom/html/htmlembeddedwebview.rs.patch b/patches/components/script/dom/html/htmlembeddedwebview.rs.patch index 3fd34c8..b8a0696 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,1139 @@ +@@ -0,0 +1,1138 @@ +/* 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/. */ @@ -766,10 +766,9 @@ + /// Take a screenshot of the embedded webview. + pub(crate) fn embedded_take_screenshot( + &self, ++ cx: &mut JSContext, + options: &ScreenshotOptions, + ) -> Fallible> { -+ let can_gc = CanGc::deprecated_note(); -+ + // Must be an embedded webview + let Some(webview_id) = self.embedded_webview_id() else { + return Err(Error::InvalidState(Some( @@ -778,7 +777,7 @@ + }; + + let global = self.owner_global(); -+ let promise = Promise::new(&global, can_gc); ++ let promise = Promise::new(cx, &global); + + // Parse image type from options + let image_type = match &*options.type_.str() { diff --git a/patches/components/script/dom/html/htmliframeelement.rs.patch b/patches/components/script/dom/html/htmliframeelement.rs.patch index dde6787..675c037 100644 --- a/patches/components/script/dom/html/htmliframeelement.rs.patch +++ b/patches/components/script/dom/html/htmliframeelement.rs.patch @@ -283,7 +283,7 @@ } } -@@ -719,7 +917,146 @@ +@@ -719,6 +917,145 @@ self.webview_id.get() } @@ -376,7 +376,7 @@ + + /// Returns true if this iframe is hosting an embedded webview (created with "embed" attribute). + /// Embedded webviews have their own top-level WebViewId and window.parent === window.self. - #[inline] ++ #[inline] + pub(crate) fn is_embedded_webview(&self) -> bool { + self.is_embedded_webview.get() + } @@ -426,11 +426,10 @@ + self.page_zoom.set(zoom); + } + -+ #[inline] + #[inline] pub(crate) fn sandboxing_flag_set(&self) -> SandboxingFlagSet { self.sandboxing_flag_set - .get() -@@ -1086,6 +1423,97 @@ +@@ -1086,6 +1423,101 @@ // https://html.spec.whatwg.org/multipage/#dom-iframe-longdesc make_url_setter!(cx, SetLongDesc, "longdesc"); @@ -470,8 +469,12 @@ + self.embedded_go_forward() + } + -+ fn TakeScreenshot(&self, options: &ScreenshotOptions) -> Fallible> { -+ self.embedded_take_screenshot(options) ++ fn TakeScreenshot( ++ &self, ++ cx: &mut JSContext, ++ options: &ScreenshotOptions, ++ ) -> Fallible> { ++ self.embedded_take_screenshot(cx, options) + } + + fn RespondToSelectControl(&self, control_id: DOMString, selected_index: i32) -> Fallible<()> { @@ -528,7 +531,7 @@ } impl VirtualMethods for HTMLIFrameElement { -@@ -1141,9 +1569,54 @@ +@@ -1141,9 +1573,54 @@ // may be in a different script thread. Instead, we check to see if the parent // is in a document tree and has a browsing context, which is what causes // the child browsing context to be created. @@ -585,7 +588,7 @@ } }, local_name!("loading") => { -@@ -1208,6 +1681,23 @@ +@@ -1208,6 +1685,23 @@ debug!("