diff --git a/Cargo.lock b/Cargo.lock index 20263a8..dc49c87 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1442,9 +1442,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.4" +version = "4.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" +checksum = "301b56658598e48f3648647ac6fc887be7e7108eddfa4e9b63fcf3ec58c0cadf" dependencies = [ "clap_builder", "clap_derive", @@ -1452,9 +1452,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.2" +version = "4.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" +checksum = "94a65403d1a1bd28f7dc68eb8506e8874808ee5eecb59298de588e2e1407a078" dependencies = [ "anstream", "anstyle", @@ -4513,9 +4513,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hybrid-array" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" +checksum = "707114b52a152fa7bdb290cd7cd5912d9467273b6d74e21b8d81aca1f8533f6b" dependencies = [ "ctutils", "subtle", @@ -6391,9 +6391,9 @@ dependencies = [ [[package]] name = "mozjs" -version = "0.20.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6420d19b6156c4da540ed91a4dd395271009aefaf1127291098d58d49daa21" +checksum = "a98fbcb42b13894ad89fcab77fef45980679f3b24c93b3d2b823f9f0a899583e" dependencies = [ "bindgen", "cc", @@ -10173,6 +10173,7 @@ version = "0.4.0" dependencies = [ "accesskit", "app_units", + "arrayvec", "atomic_refcell", "bitflags 2.13.1", "data-url", @@ -14643,9 +14644,9 @@ dependencies = [ [[package]] name = "xcursor" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec9e4a500ca8864c5b47b8b482a73d62e4237670e5b5f1d6b9e3cae50f28f2b" +checksum = "163b33ed8786455e2fa5d72f554057ce3f3182425434f756cd39c99839d88e23" [[package]] name = "xkbcommon-dl" diff --git a/Cargo.toml b/Cargo.toml index 3fa405f..4a4a0f9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -136,7 +136,7 @@ iroh = { version = "1.0", default-features = false, features = ["tls-aws-lc-rs"] iroh-mdns-address-lookup = "0.4" iroh-persist = { git = "https://github.com/webbeef/iroh-persist.git", branch = "iroh-1.0" } itertools = "0.15" -js = { package = "mozjs", version = "=0.20", default-features = false, features = ["libz-sys", "intl"] } +js = { package = "mozjs", version = "=0.21", default-features = false, features = ["libz-sys", "intl"] } jstraceable_derive = { package = "servo-jstraceable-derive", version = "0.4.0", path = "source/components/jstraceable_derive" } keyboard-types = { version = "0.8.3", features = ["serde", "webdriver"] } kurbo = { version = "0.13.1", features = ["euclid"] } diff --git a/forkme.lock b/forkme.lock index da4bd49..db64a91 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -55c25d8b2753854e3e471727f1690cd82f8253e3 +2633cdd4dad58449e9813f94bdab45fe22b137d6 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index 7a2a9df..cfc51a7 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -645,7 +645,7 @@ "tracing", ] -@@ -8675,9 +9094,11 @@ +@@ -8676,9 +9095,11 @@ name = "servo-net" version = "0.4.0" dependencies = [ @@ -657,7 +657,7 @@ "base64", "bytes", "chrono", -@@ -8707,6 +9128,7 @@ +@@ -8708,6 +9129,7 @@ "parking_lot", "quick_cache", "regex", @@ -665,7 +665,7 @@ "resvg", "rustc-hash 2.1.3", "rustls", -@@ -8713,9 +9135,11 @@ +@@ -8714,9 +9136,11 @@ "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -677,7 +677,7 @@ "servo-devtools-traits", "servo-embedder-traits", "servo-fonts", -@@ -8768,6 +9192,7 @@ +@@ -8769,6 +9193,7 @@ "rustc-hash 2.1.3", "rustls-pki-types", "serde", @@ -685,7 +685,7 @@ "servo-base", "servo-config", "servo-default-resources", -@@ -8779,8 +9204,10 @@ +@@ -8780,8 +9205,10 @@ "servo-profile-traits", "servo-url", "servo_arc", @@ -696,7 +696,7 @@ "url", "uuid", "webrender_api", -@@ -9392,6 +9819,7 @@ +@@ -9393,6 +9820,7 @@ "bpaf", "cc", "cfg-if", @@ -704,7 +704,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9406,6 +9834,7 @@ +@@ -9407,6 +9835,7 @@ "headers", "hilog", "hitrace", @@ -712,7 +712,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9426,6 +9855,7 @@ +@@ -9427,6 +9856,7 @@ "ohos-window-manager-sys", "raw-window-handle", "rustls", @@ -720,7 +720,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9432,6 +9862,7 @@ +@@ -9433,6 +9863,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -728,7 +728,7 @@ "surfman", "tokio", "tracing", -@@ -10078,6 +10509,9 @@ +@@ -10079,6 +10510,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -738,7 +738,7 @@ [[package]] name = "synstructure" -@@ -10112,6 +10546,27 @@ +@@ -10113,6 +10547,27 @@ ] [[package]] @@ -766,7 +766,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10137,6 +10592,12 @@ +@@ -10138,6 +10593,12 @@ ] [[package]] @@ -779,7 +779,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10454,6 +10915,16 @@ +@@ -10455,6 +10916,16 @@ ] [[package]] @@ -796,7 +796,7 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10556,11 +11027,30 @@ +@@ -10557,11 +11028,30 @@ "futures-util", "pin-project-lite", "sync_wrapper", @@ -827,7 +827,7 @@ name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10875,6 +11365,12 @@ +@@ -10876,6 +11366,12 @@ ] [[package]] @@ -840,7 +840,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -11997,6 +12493,17 @@ +@@ -11998,6 +12494,17 @@ ] [[package]] diff --git a/patches/components/script/dom/document/focus.rs.patch b/patches/components/script/dom/document/focus.rs.patch index e6cba73..b79a63a 100644 --- a/patches/components/script/dom/document/focus.rs.patch +++ b/patches/components/script/dom/document/focus.rs.patch @@ -1,7 +1,7 @@ --- original +++ modified -@@ -311,6 +311,11 @@ - mut old_focus_chain: Vec, +@@ -317,6 +317,11 @@ + mut old_focus_chain: RootedGuard<'_, Vec>, new_focus_target: &FocusableArea, ) { + // Ignore focus changes for "hide focus" embedded webviews. diff --git a/patches/components/script/dom/embedder.rs.patch b/patches/components/script/dom/embedder.rs.patch index 93c17ff..cf2c8c4 100644 --- a/patches/components/script/dom/embedder.rs.patch +++ b/patches/components/script/dom/embedder.rs.patch @@ -21,7 +21,6 @@ +use js::realm::CurrentRealm; +use js::rust::HandleObject; +use js::rust::wrappers2::JS_DefineProperty; -+use script_bindings::conversions::SafeToJSValConvertible; +use script_bindings::interfaces::EmbedderHelpers; +use script_bindings::reflector::reflect_dom_object_with_cx; +use script_bindings::str::USVString; @@ -50,6 +49,7 @@ +use crate::dom::pairing::Pairing; +use crate::dom::power::Power; +use crate::dom::promise::Promise; ++use crate::js::conversions::ToJSValConvertible; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; + +#[dom_struct] diff --git a/patches/components/script/dom/html/documentmetadata/htmllinkelement.rs.patch b/patches/components/script/dom/html/documentmetadata/htmllinkelement.rs.patch index d1a1da2..144155e 100644 --- a/patches/components/script/dom/html/documentmetadata/htmllinkelement.rs.patch +++ b/patches/components/script/dom/html/documentmetadata/htmllinkelement.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -464,6 +464,10 @@ +@@ -465,6 +465,10 @@ self.handle_preload_url(); } @@ -11,7 +11,7 @@ // https://html.spec.whatwg.org/multipage/#link-type-modulepreload if relations.contains(LinkRelations::MODULE_PRELOAD) { let link = DomRoot::from_ref(self); -@@ -652,6 +656,32 @@ +@@ -653,6 +657,32 @@ document.fetch_background(request, fetch_context); } @@ -44,7 +44,7 @@ /// fn handle_stylesheet_url(&self, cx: &mut js::context::JSContext) { let document = self.owner_document(); -@@ -740,7 +770,7 @@ +@@ -741,7 +771,7 @@ if !window.is_top_level() { return; } diff --git a/patches/components/script/dom/html/htmlwebviewelement.rs.patch b/patches/components/script/dom/html/htmlwebviewelement.rs.patch index 1840940..502ac50 100644 --- a/patches/components/script/dom/html/htmlwebviewelement.rs.patch +++ b/patches/components/script/dom/html/htmlwebviewelement.rs.patch @@ -35,7 +35,6 @@ +use net_traits::request::Destination; +use script_bindings::cell::DomRefCell; +use script_bindings::codegen::GenericBindings::CustomEventBinding::CustomEventMethods; -+use script_bindings::conversions::SafeToJSValConvertible; +use servo_base::generic_channel::GenericSender; +use servo_base::id::{BrowsingContextId, Index, PipelineId, PipelineNamespaceId, WebViewId}; +use servo_base::{Epoch, generic_channel}; @@ -78,6 +77,7 @@ +use crate::dom::types::Blob; +use crate::dom::url::URL; +use crate::dom::windowproxy::{CreatorBrowsingContextInfo, WindowProxy}; ++use crate::js::conversions::ToJSValConvertible; +use crate::routed_promise::{RoutedPromiseListener, callback_promise}; +use crate::script_thread::ScriptThread; +use crate::script_window_proxies::ScriptWindowProxies; diff --git a/patches/components/script/dom/node/layout_dom.rs.patch b/patches/components/script/dom/node/layout_dom.rs.patch index 61a4029..fbd8aec 100644 --- a/patches/components/script/dom/node/layout_dom.rs.patch +++ b/patches/components/script/dom/node/layout_dom.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -33,6 +33,7 @@ +@@ -31,6 +31,7 @@ use crate::dom::html::htmlslotelement::HTMLSlotElement; use crate::dom::html::htmltextareaelement::HTMLTextAreaElement; use crate::dom::html::htmlvideoelement::HTMLVideoElement; @@ -8,7 +8,7 @@ use crate::dom::shadowroot::ShadowRoot; use crate::dom::svg::svgsvgelement::SVGSVGElement; use crate::dom::text::Text; -@@ -348,13 +349,27 @@ +@@ -336,13 +337,27 @@ } pub(crate) fn iframe_browsing_context_id(self) -> Option { diff --git a/patches/components/script/dom/servointernals.rs.patch b/patches/components/script/dom/servointernals.rs.patch index 4f5aac4..fcefb17 100644 --- a/patches/components/script/dom/servointernals.rs.patch +++ b/patches/components/script/dom/servointernals.rs.patch @@ -1,8 +1,8 @@ --- original +++ modified @@ -14,9 +14,10 @@ + use js::rust::HandleObject; 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}; diff --git a/patches/components/script/dom/window/window.rs.patch b/patches/components/script/dom/window/window.rs.patch index 11958e8..bec6f36 100644 --- a/patches/components/script/dom/window/window.rs.patch +++ b/patches/components/script/dom/window/window.rs.patch @@ -9,9 +9,9 @@ }; use euclid::{Point2D, Rect, Scale, Size2D, Vector2D}; use fonts::{ -@@ -35,8 +35,10 @@ - }; +@@ -36,8 +36,10 @@ use js::context::{JSContext, NoGC}; + use js::conversions::ToJSValConvertible; use js::glue::DumpJSStack; -use js::jsapi::{GCReason, Heap, JSContext as RawJSContext, JSObject, JSPROP_ENUMERATE}; -use js::jsval::{NullValue, UndefinedValue}; @@ -22,7 +22,7 @@ use js::realm::{AutoRealm, CurrentRealm}; use js::rust::wrappers2::{JS_DefineProperty, JS_GC}; use js::rust::{ -@@ -50,6 +52,7 @@ +@@ -51,6 +53,7 @@ ReflowRequestRestyle, ReflowStatistics, RestyleReason, ScrollContainerQueryFlags, ScrollContainerResponse, TrustedNodeAddress, combine_id_with_fragment_type, }; diff --git a/patches/components/script/dom/workers/workerglobalscope.rs.patch b/patches/components/script/dom/workers/workerglobalscope.rs.patch index 43f068a..c76ff63 100644 --- a/patches/components/script/dom/workers/workerglobalscope.rs.patch +++ b/patches/components/script/dom/workers/workerglobalscope.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -393,6 +393,8 @@ +@@ -394,6 +394,8 @@ gpu_id_hub, init.inherited_secure_context, init.unminify_js, diff --git a/patches/components/script/layout_dom/servo_layout_node.rs.patch b/patches/components/script/layout_dom/servo_layout_node.rs.patch index 23ececd..cee75ce 100644 --- a/patches/components/script/layout_dom/servo_layout_node.rs.patch +++ b/patches/components/script/layout_dom/servo_layout_node.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -297,6 +297,10 @@ +@@ -296,6 +296,10 @@ self.node.iframe_pipeline_id() } diff --git a/patches/components/shared/layout/layout_node.rs.patch b/patches/components/shared/layout/layout_node.rs.patch index 3b7118a..435e2cb 100644 --- a/patches/components/shared/layout/layout_node.rs.patch +++ b/patches/components/shared/layout/layout_node.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -208,6 +208,12 @@ +@@ -207,6 +207,12 @@ /// not an iframe element, fails. Returns None if there is no nested browsing context. fn iframe_pipeline_id(&self) -> Option; diff --git a/patches/python/servo/platform/build_target.py.patch b/patches/python/servo/platform/build_target.py.patch index 0f00eae..a03110e 100644 --- a/patches/python/servo/platform/build_target.py.patch +++ b/patches/python/servo/platform/build_target.py.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -60,6 +60,8 @@ +@@ -61,6 +61,8 @@ return AndroidTarget(target_triple) elif "ohos" in target_triple: return OpenHarmonyTarget(target_triple)