diff --git a/Cargo.lock b/Cargo.lock index a42d0b2..1045d00 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -952,11 +952,10 @@ dependencies = [ [[package]] name = "blake3" -version = "1.8.6" +version = "1.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ae7bad254120e9e4c63bafc385310756f90c484eac0e36b8317cf09cb92a77" +checksum = "6d9e454fc11f76977dc803893aff6304ed33d6a26efae8696573bea74baa27ae" dependencies = [ - "arrayref", "arrayvec", "cc", "cfg-if", @@ -2534,9 +2533,9 @@ dependencies = [ [[package]] name = "either" -version = "1.17.0" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" +checksum = "252afb9ae5eaa683babdc6a068b3f5726eb19e05070c731f9b2a23a7c3e8ed34" [[package]] name = "elliptic-curve" @@ -2918,15 +2917,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb" -[[package]] -name = "font-types" -version = "0.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b38ad915f6dadd993ced50848a8291a543bd41ca62bc10740d5e64e2ab4cfd7" -dependencies = [ - "bytemuck", -] - [[package]] name = "font-types" version = "0.12.3" @@ -3508,7 +3498,7 @@ dependencies = [ "log", "peniko", "png 0.18.1", - "skrifa 0.44.0", + "skrifa", "smallvec", "vello_common", ] @@ -4071,9 +4061,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.17" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f877e75f39e9827ec50a572dd592684ac28c029578726c85f1b2aa6ab807449" +checksum = "839c0e8a181239723652be9062bb56ca5bf5f64011f73b623f6f4fc59086a228" dependencies = [ "atomic-waker", "bytes", @@ -4122,7 +4112,7 @@ checksum = "c03d949a14aa089bbb282f7dd76a498a7f684428e4257202efc119ec010376f9" dependencies = [ "bitflags 2.13.1", "bytemuck", - "read-fonts 0.41.0", + "read-fonts", "smallvec", ] @@ -4298,7 +4288,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "h2 0.4.17", + "h2 0.4.18", "hickory-proto 0.26.1", "http 1.5.0", "idna", @@ -4567,7 +4557,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.17", + "h2 0.4.18", "http 1.5.0", "http-body 1.1.0", "httparse", @@ -4898,7 +4888,7 @@ checksum = "251af8e57c9400e3eb58242fe5b8b1152b2a64fdf4cf632f923c38ccee6f2fa9" dependencies = [ "icu_locale_core", "icu_locale_fallback_data", - "icu_provider 2.3.0", + "icu_provider 2.3.1", "potential_utf", "tinystr 0.8.4", "zerovec 0.11.8", @@ -4970,7 +4960,7 @@ dependencies = [ "icu_collections 2.3.0", "icu_normalizer_data 2.3.0", "icu_properties 2.3.0", - "icu_provider 2.3.0", + "icu_provider 2.3.1", "smallvec", "zerovec 0.11.8", ] @@ -5046,7 +5036,7 @@ dependencies = [ "icu_collections 2.3.0", "icu_locale_core", "icu_properties_data 2.3.0", - "icu_provider 2.3.0", + "icu_provider 2.3.1", "zerotrie 0.2.5", "zerovec 0.11.8", ] @@ -5082,9 +5072,9 @@ dependencies = [ [[package]] name = "icu_provider" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92a7ed671a6aad807a8651a2e1782a6598fda9ce5185dd8158549e95a91c6428" +checksum = "d27bbb9d3abbefac45d55f647c9de1d44aafcd1186eb91879afef17c396c3e73" dependencies = [ "displaydoc", "icu_locale_core", @@ -5146,7 +5136,7 @@ dependencies = [ "core_maths", "icu_collections 2.3.0", "icu_locale_fallback", - "icu_provider 2.3.0", + "icu_provider 2.3.1", "icu_segmenter_data 2.3.0", "potential_utf", "smallvec", @@ -7478,9 +7468,9 @@ dependencies = [ [[package]] name = "ohos-sys-opaque-types" -version = "0.1.10" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0135000ddab1491bd02a60e855c02e71be855845ca354162c1e189dea79d015" +checksum = "709d9a23a7fd92c4c1f94c6772fd0e6607aa302c382601cc475000b68758cbbf" [[package]] name = "ohos-window-sys" @@ -8437,9 +8427,9 @@ dependencies = [ [[package]] name = "psl" -version = "2.1.225" +version = "2.1.226" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d71c4a0dab830345e50e8d0dc881bf219d0a9ff261dd2500d36e7cd24427d1e" +checksum = "7bc88482eea924ca3a2f56a547454169af58deef35567965eb4fc2392a834841" dependencies = [ "psl-types", ] @@ -8781,16 +8771,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "read-fonts" -version = "0.39.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ed38b89c2c77ff968c524145ad65fb010f38af5c7a224b53b81d47ac2daa81" -dependencies = [ - "bytemuck", - "font-types 0.11.3", -] - [[package]] name = "read-fonts" version = "0.41.0" @@ -8798,7 +8778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "046a7d674daf459825b32f5062056d6882db0d2f5a479fbd76ccfc870ac18709" dependencies = [ "bytemuck", - "font-types 0.12.3", + "font-types", "once_cell", ] @@ -8900,7 +8880,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-core", - "h2 0.4.17", + "h2 0.4.18", "http 1.5.0", "http-body 1.1.0", "http-body-util", @@ -10048,7 +10028,7 @@ dependencies = [ "content-security-policy", "dwrote", "euclid", - "font-types 0.12.3", + "font-types", "fontsan", "freetype-sys", "harfbuzz-sys", @@ -10067,7 +10047,7 @@ dependencies = [ "ohos-deviceinfo-sys", "parking_lot", "postcard", - "read-fonts 0.41.0", + "read-fonts", "rustc-hash 2.1.3", "serde", "servo-allocator", @@ -10081,7 +10061,7 @@ dependencies = [ "servo-tracing", "servo-url", "servo_arc", - "skrifa 0.44.0", + "skrifa", "smallvec", "stylo", "stylo_atoms", @@ -10108,7 +10088,7 @@ dependencies = [ "num-derive", "num-traits", "parking_lot", - "read-fonts 0.41.0", + "read-fonts", "serde", "servo-base", "servo-malloc-size-of", @@ -11438,16 +11418,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ee5873ec9cce0195efcb7a4e9507a04cd49aec9c83d0389df45b1ef7ba2e649" -[[package]] -name = "skrifa" -version = "0.42.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c34617370ae968efb7161bb2beb517d9084659aae19e24b89e3db25b46e4564" -dependencies = [ - "bytemuck", - "read-fonts 0.39.2", -] - [[package]] name = "skrifa" version = "0.44.0" @@ -11455,7 +11425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "819ab7d62b1d3e72d9d9dea5650bac30424f9111364bb94928dbf5ecad1baa68" dependencies = [ "bytemuck", - "read-fonts 0.41.0", + "read-fonts", ] [[package]] @@ -12995,7 +12965,7 @@ dependencies = [ "roxmltree 0.21.1", "simplecss", "siphasher", - "skrifa 0.44.0", + "skrifa", "strict-num", "svgtypes", "tiny-skia-path 0.12.0", @@ -13061,16 +13031,16 @@ checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "vello" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261359dbef879f8110ef7e1c442246c838d33d3d91cb05e0ea9288d432760c9f" +checksum = "af76ceb17b2869be23598baef40a9c8db4de86b87c60510c3bc245559275a617" dependencies = [ "bytemuck", "futures-intrusive", "log", "peniko", "png 0.18.1", - "skrifa 0.42.1", + "skrifa", "static_assertions", "thiserror 2.0.20", "vello_encoding", @@ -13113,22 +13083,22 @@ dependencies = [ [[package]] name = "vello_encoding" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2346f5f0d7dccb3582fcd397b4a57b43165209f1424e0d76e85dd814db164af7" +checksum = "1e31cd622201690d8dfe9fd8fea8d1ae59db1bfeea414856a617d1d03438418c" dependencies = [ "bytemuck", "guillotiere", "peniko", - "skrifa 0.42.1", + "skrifa", "smallvec", ] [[package]] name = "vello_shaders" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dd38937516fa4b47423d9255bb5e4a65e839ec9d57c38c4af6189ce56bf46b7" +checksum = "abf943bd2920bfd22928a9c1bad39866f7ffcc1109b6ed924ab52773e3868a83" dependencies = [ "bytemuck", "log", @@ -14886,7 +14856,7 @@ dependencies = [ "serde", "yoke 0.8.3", "zerofrom", - "zerovec-derive 0.11.5", + "zerovec-derive 0.11.6", ] [[package]] @@ -14902,9 +14872,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.5" +version = "0.11.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9" +checksum = "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index 85ccbfa..02bc47a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -317,7 +317,7 @@ url = "2.5" urlpattern = "0.6" utf-8 = "0.7" uuid = { version = "1.20.0", features = ["v4", "v5"] } -vello = "0.9" +vello = "0.10" vello_cpu = { version = "0.2.0", features = ["multithreading"] } warp = "0.4.2" web_atoms = "0.2" diff --git a/forkme.lock b/forkme.lock index 465bc5e..074a752 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -7576642cae7fc3515bde0e75679d82de9168cf14 +fe082febc243f846fe0bee2067f8dfd3745ea283 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index e23941e..a870f0a 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -61,7 +61,7 @@ + +[[package]] name = "cc" - version = "1.4.0" + version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1328,6 +1370,20 @@ ] @@ -120,7 +120,7 @@ version = "0.5.16" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1906,6 +1977,26 @@ - checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" + checksum = "4583a4551df46e2792f82ceeac45e850d2e2d5debba0b91f102385cda5b11f06" [[package]] +name = "data-encoding-macro" diff --git a/patches/components/config/prefs.rs.patch b/patches/components/config/prefs.rs.patch index 71650db..3822048 100644 --- a/patches/components/config/prefs.rs.patch +++ b/patches/components/config/prefs.rs.patch @@ -54,7 +54,7 @@ /// A convenience macro for accessing a preference value using its static path. /// Passing an invalid path is a compile-time error. #[macro_export] -@@ -177,6 +198,8 @@ +@@ -174,6 +195,8 @@ pub dom_geolocation_enabled: bool, // feature: Screen Wake Lock API | #43615 | Web/API/Screen_Wake_Lock_API pub dom_wakelock_enabled: bool, @@ -63,7 +63,7 @@ // feature: IndexedDB | #6963 | Web/API/IndexedDB_API pub dom_indexeddb_enabled: bool, // feature: IntersectionObserver | #35767 | Web/API/Intersection_Observer_API -@@ -459,6 +482,7 @@ +@@ -451,6 +474,7 @@ dom_gamepad_enabled: true, dom_geolocation_enabled: false, dom_wakelock_enabled: false, diff --git a/patches/components/script/dom/document/document.rs.patch b/patches/components/script/dom/document/document.rs.patch index bfbce01..82eb728 100644 --- a/patches/components/script/dom/document/document.rs.patch +++ b/patches/components/script/dom/document/document.rs.patch @@ -42,7 +42,7 @@ use crate::dom::intersectionobserver::IntersectionObserver; use crate::dom::iterators::ShadowIncluding; use crate::dom::keyboardevent::KeyboardEvent; -@@ -203,7 +210,9 @@ +@@ -204,7 +211,9 @@ use crate::dom::touchevent::TouchEvent as DomTouchEvent; use crate::dom::touchlist::TouchList; use crate::dom::trustedtypes::trustedhtml::TrustedHTML; @@ -53,7 +53,7 @@ use crate::dom::uievent::UIEvent; use crate::dom::window::Window; use crate::dom::window::scrolling_box::{ScrollAxisState, ScrollingBox}; -@@ -220,6 +229,7 @@ +@@ -221,6 +230,7 @@ use crate::tasks::task_manager::TaskManager; use crate::tasks::task_source::TaskSourceName; use crate::timers::{OneshotTimerCallback, OneshotTimers}; @@ -61,7 +61,7 @@ use crate::xpath::parse_expression; #[derive(Clone, Copy, PartialEq)] -@@ -418,6 +428,8 @@ +@@ -419,6 +429,8 @@ applets: MutNullableDom, /// Information about the `` in this [`Document`]. iframes: RefCell, @@ -70,7 +70,7 @@ /// Shared locks used for style attributes, author-origin stylesheets, and user and /// user agent stylesheets in this document. Can be acquired once for accessing many /// objects. This is shared with the owning [`ScriptThread`]. -@@ -584,6 +596,14 @@ +@@ -585,6 +597,14 @@ /// - /// - resize_observers: DomRefCell>>, @@ -85,7 +85,7 @@ /// The set of all fonts loaded by this document. /// fonts: MutNullableDom, -@@ -663,6 +683,9 @@ +@@ -664,6 +684,9 @@ #[no_trace] favicon: RefCell>, @@ -95,7 +95,7 @@ /// All websockets created that are associated with this document. websockets: DOMTracker, -@@ -676,6 +699,18 @@ +@@ -677,6 +700,18 @@ /// Reflect the value of that preferences to prevent paying the cost of a RwLock access. layout_animations_test_enabled: bool, @@ -114,10 +114,10 @@ /// #[no_trace] state_override: DomRefCell>, -@@ -720,6 +755,11 @@ - /// Theme specific for this document, set by a meta element - #[no_trace] - theme: Cell>, +@@ -725,6 +760,11 @@ + /// True if this document is no longer the active document of its associated + /// window. + window_detached: Cell, + + /// Whether spatial navigation is enabled for this document. + /// When enabled, arrow keys move focus to the nearest focusable element @@ -126,7 +126,7 @@ } impl Document { -@@ -947,6 +987,68 @@ +@@ -952,6 +992,68 @@ self.dirty_root.take() } @@ -195,7 +195,7 @@ #[inline] pub(crate) fn loader(&self) -> Ref<'_, DocumentLoader> { self.loader.borrow() -@@ -1018,6 +1120,12 @@ +@@ -1023,6 +1125,12 @@ // Set the document's activity level, reflow if necessary, and suspend or resume timers. self.activity.set(activity); @@ -208,7 +208,7 @@ let media = ServoMedia::get(); let pipeline_id = self.window().pipeline_id(); let client_context_id = -@@ -1031,6 +1139,7 @@ +@@ -1042,6 +1150,7 @@ self.title_changed(); self.notify_embedder_favicon(); @@ -216,7 +216,7 @@ self.dirty_all_nodes(cx.no_gc()); self.window().resume(cx); media.resume(&client_context_id); -@@ -1425,6 +1534,9 @@ +@@ -1436,6 +1545,9 @@ )); self.send_to_embedder(EmbedderMsg::Status(self.webview_id(), None)); update_with_current_instant(&self.navigation_timing.dom_loading); @@ -226,7 +226,7 @@ } }, DocumentReadyState::Complete => { -@@ -1433,6 +1545,9 @@ +@@ -1444,6 +1556,9 @@ self.webview_id(), LoadStatus::Complete, )); @@ -236,7 +236,7 @@ } update_with_current_instant(&self.navigation_timing.dom_complete); }, -@@ -1513,7 +1628,13 @@ +@@ -1524,7 +1639,13 @@ let window = self.window(); if window.is_top_level() { let title = self.title().map(String::from); @@ -251,7 +251,7 @@ } } -@@ -1522,6 +1643,18 @@ +@@ -1533,6 +1654,18 @@ window.send_to_embedder(msg); } @@ -270,7 +270,7 @@ pub(crate) fn dirty_all_nodes(&self, no_gc: &NoGC) { let root = match self.GetDocumentElement() { Some(root) => root, -@@ -2972,6 +3105,17 @@ +@@ -2994,6 +3127,17 @@ self.iframes.borrow_mut() } @@ -288,7 +288,7 @@ pub(crate) fn set_navigation_start(&self, navigation_start: CrossProcessInstant) { self.interactive_time .borrow_mut() -@@ -3274,6 +3418,60 @@ +@@ -3296,6 +3440,60 @@ .push(Dom::from_ref(resize_observer)); } @@ -349,7 +349,7 @@ /// /// pub(crate) fn gather_active_resize_observations_at_depth( -@@ -3871,6 +4069,7 @@ +@@ -3893,6 +4091,7 @@ anchors: Default::default(), applets: Default::default(), iframes: RefCell::new(IFrameCollection::new()), @@ -357,7 +357,7 @@ shared_style_locks, stylesheets: DomRefCell::new(DocumentStylesheetSet::new()), stylesheet_list: MutNullableDom::new(None), -@@ -3930,6 +4129,8 @@ +@@ -3952,6 +4151,8 @@ dirty_root: Default::default(), declarative_refresh: Default::default(), resize_observers: Default::default(), @@ -366,7 +366,7 @@ fonts: Default::default(), visibility_state: Cell::new(DocumentVisibilityState::Hidden), status_code, -@@ -3952,10 +4153,12 @@ +@@ -3974,10 +4175,12 @@ active_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), creation_sandboxing_flag_set: Cell::new(creation_sandboxing_flag_set), favicon: RefCell::new(None), @@ -379,15 +379,15 @@ state_override: Default::default(), value_override: Default::default(), default_single_line_container_name: Default::default(), -@@ -3973,6 +4176,7 @@ - image_cache, +@@ -3996,6 +4199,7 @@ history: Default::default(), theme: Default::default(), + window_detached: Default::default(), + spatial_navigation_enabled: Cell::new(false), } } -@@ -4724,6 +4928,33 @@ +@@ -4755,6 +4959,33 @@ .mark_animating_nodes_as_dirty(no_gc, current_timeline_value); } @@ -421,7 +421,7 @@ pub(crate) fn current_animation_timeline_value(&self) -> f64 { self.timeline .upcast::() -@@ -4783,10 +5014,8 @@ +@@ -4814,10 +5045,8 @@ /// An implementation of . pub(crate) fn update_animations_and_send_events(&self, cx: &mut CurrentRealm) { @@ -434,7 +434,7 @@ // > 1. Update the current time of all timelines associated with doc passing now // > as the timestamp. -@@ -5032,6 +5261,36 @@ +@@ -5063,6 +5292,36 @@ pub(crate) fn notify_embedder_favicon(&self) { if let Some(ref image) = *self.favicon.borrow() { @@ -471,7 +471,7 @@ self.send_to_embedder(EmbedderMsg::NewFavicon(self.webview_id(), image.clone())); } } -@@ -5119,6 +5378,30 @@ +@@ -5150,6 +5409,30 @@ self.theme.set(new_theme); self.window.refresh_theme(); } diff --git a/patches/components/script/dom/globalscope/globalscope.rs.patch b/patches/components/script/dom/globalscope/globalscope.rs.patch index be5dfd3..2275612 100644 --- a/patches/components/script/dom/globalscope/globalscope.rs.patch +++ b/patches/components/script/dom/globalscope/globalscope.rs.patch @@ -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) = -@@ -3216,6 +3249,16 @@ +@@ -3221,6 +3254,16 @@ self.inherited_secure_context } diff --git a/patches/components/script/dom/html/embedded_content/htmliframeelement.rs.patch b/patches/components/script/dom/html/embedded_content/htmliframeelement.rs.patch index 46db122..fa4cf92 100644 --- a/patches/components/script/dom/html/embedded_content/htmliframeelement.rs.patch +++ b/patches/components/script/dom/html/embedded_content/htmliframeelement.rs.patch @@ -10,7 +10,7 @@ use crate::dom::bindings::codegen::Bindings::HTMLIFrameElementBinding::HTMLIFrameElementMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::Window_Binding::WindowMethods; -@@ -316,6 +316,8 @@ +@@ -304,6 +304,8 @@ embedder_theme: window.embedder_theme(), target_snapshot_params, frame_name: self.frozen_name.borrow().clone(), @@ -19,7 +19,7 @@ }; self.pipeline_id.set(Some(new_pipeline_id)); -@@ -1173,7 +1175,16 @@ +@@ -1149,7 +1151,16 @@ // 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. @@ -37,7 +37,7 @@ debug!("iframe src set while in browsing context."); self.process_the_iframe_attributes(ProcessingMode::NotFirstTime, cx); } -@@ -1266,7 +1277,7 @@ +@@ -1242,7 +1253,7 @@ } // The iframe HTML element removing steps, given removedNode, are to destroy a child diff --git a/patches/components/script/dom/window/window.rs.patch b/patches/components/script/dom/window/window.rs.patch index b97253d..69a773a 100644 --- a/patches/components/script/dom/window/window.rs.patch +++ b/patches/components/script/dom/window/window.rs.patch @@ -236,7 +236,7 @@ dom_position_for_selection: result .dom_position_for_selection .map(|(node, offset)| (from_opaque_node(node), offset)), -@@ -3662,17 +3777,19 @@ +@@ -3670,17 +3785,19 @@ } pub(crate) fn send_to_embedder(&self, msg: EmbedderMsg) { @@ -262,7 +262,7 @@ } #[cfg(feature = "webxr")] -@@ -3906,6 +4023,8 @@ +@@ -3914,6 +4031,8 @@ #[cfg(feature = "webgpu")] gpu_id_hub: Arc, inherited_secure_context: Option, embedder_theme: Theme, @@ -271,7 +271,7 @@ weak_script_thread: Weak, ) -> DomRoot { let error_reporter = CSSErrorReporter { -@@ -3929,6 +4048,8 @@ +@@ -3937,6 +4056,8 @@ gpu_id_hub, inherited_secure_context, unminify_js, @@ -280,7 +280,7 @@ ), caches: Default::default(), ongoing_navigation: Default::default(), -@@ -4200,3 +4321,114 @@ +@@ -4237,3 +4358,114 @@ Window::origin(self) } } diff --git a/patches/components/script/event_loop/document_collection.rs.patch b/patches/components/script/event_loop/document_collection.rs.patch index 6fac13d..ccae6af 100644 --- a/patches/components/script/event_loop/document_collection.rs.patch +++ b/patches/components/script/event_loop/document_collection.rs.patch @@ -8,7 +8,7 @@ use crate::dom::window::Window; /// The collection of all [`Document`]s managed by the [`crate::event_loop::script_thread::ScriptThread`]. -@@ -64,6 +65,15 @@ +@@ -66,6 +67,15 @@ }) } diff --git a/patches/components/script/event_loop/script_thread.rs.patch b/patches/components/script/event_loop/script_thread.rs.patch index 78bfc4f..756d2ec 100644 --- a/patches/components/script/event_loop/script_thread.rs.patch +++ b/patches/components/script/event_loop/script_thread.rs.patch @@ -9,7 +9,7 @@ }; use encoding_rs::Encoding; use fonts::{FontContext, SystemFontServiceProxy, WebFontLoadEvent}; -@@ -83,7 +83,8 @@ +@@ -84,7 +84,8 @@ use servo_base::cross_process_instant::CrossProcessInstant; use servo_base::generic_channel::GenericSender; use servo_base::id::{ @@ -19,7 +19,7 @@ }; use servo_base::threadboost::{BoostAffinity, ThreadPriority}; use servo_base::{Epoch, generic_channel}; -@@ -90,12 +91,14 @@ +@@ -91,12 +92,14 @@ #[cfg(feature = "webgl")] use servo_canvas_traits::webgl::WebGLPipeline; use servo_config::opts::{self, DiagnosticsLoggingOption}; @@ -38,7 +38,7 @@ }; use servo_url::{ImmutableOrigin, MutableOrigin, OriginSnapshot, ServoUrl}; use storage_traits::StorageThreads; -@@ -116,6 +119,8 @@ +@@ -117,6 +120,8 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ DocumentMethods, DocumentReadyState, }; @@ -47,7 +47,7 @@ use crate::dom::bindings::codegen::Bindings::NavigatorBinding::NavigatorMethods; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::conversions::{ -@@ -134,9 +139,13 @@ +@@ -135,9 +140,13 @@ Document, DocumentSource, HasBrowsingContext, IsHTMLDocument, RenderingUpdateReason, }; use crate::dom::element::Element; @@ -61,7 +61,7 @@ use crate::dom::servoparser::{ParserContext, ServoParser}; use crate::dom::types::DebuggerGlobalScope; #[cfg(feature = "webgpu")] -@@ -1262,18 +1271,22 @@ +@@ -1261,18 +1270,22 @@ // Unspecified, but necessary: Any of the previous callbacks may have put the // document into a render-blocked state. If that's the case, then abort the // rendering process now. @@ -93,7 +93,7 @@ } let should_generate_frame = !painters_generating_frames.is_empty(); -@@ -1801,6 +1814,14 @@ +@@ -1800,6 +1813,14 @@ ScriptThreadMessage::GetDocumentOrigin(pipeline_id, result_sender) => { self.handle_get_document_origin(pipeline_id, result_sender); }, @@ -108,7 +108,7 @@ ScriptThreadMessage::GetTitle(pipeline_id) => self.handle_get_title_msg(pipeline_id), ScriptThreadMessage::SetDocumentActivity(pipeline_id, activity) => { self.handle_set_document_activity_msg(cx, pipeline_id, activity) -@@ -1966,11 +1987,46 @@ +@@ -1965,11 +1986,46 @@ self.handle_refresh_cursor(pipeline_id); }, ScriptThreadMessage::PreferencesUpdated(updates) => { @@ -159,7 +159,7 @@ }, ScriptThreadMessage::ForwardKeyboardScroll(pipeline_id, scroll) => { if let Some(document) = self.documents.borrow().find_document(pipeline_id) { -@@ -2003,6 +2059,52 @@ +@@ -2002,6 +2058,52 @@ ScriptThreadMessage::TriggerGarbageCollection => unsafe { JS_GC(cx, GCReason::API); }, @@ -212,7 +212,7 @@ } } -@@ -3067,16 +3169,32 @@ +@@ -3066,16 +3168,32 @@ reason: UpdatePipelineIdReason, cx: &mut js::context::JSContext, ) { @@ -249,7 +249,7 @@ let Some(window) = self.documents.borrow().find_window(new_pipeline_id) else { return; -@@ -3095,6 +3213,7 @@ +@@ -3094,6 +3212,7 @@ // is no need to pass along existing opener information that // will be discarded. None, @@ -257,7 +257,7 @@ ); } -@@ -3386,6 +3505,212 @@ +@@ -3389,6 +3508,212 @@ } } @@ -470,49 +470,49 @@ fn ask_constellation_for_top_level_info( &self, sender_webview_id: WebViewId, -@@ -3495,7 +3820,13 @@ - self.senders.pipeline_to_embedder_sender.clone(), - self.senders.constellation_sender.clone(), - incomplete.pipeline_id, -- incomplete.parent_info, -+ // For embedded webviews, don't pass parent_info to Window so that -+ // is_top_level() returns true (they are top-level browsing contexts). -+ if incomplete.is_embedded_webview { -+ None -+ } else { -+ incomplete.parent_info -+ }, - incomplete.viewport_details, - origin.clone(), - final_url.clone(), -@@ -3519,6 +3850,8 @@ - self.gpu_id_hub.clone(), - incomplete.load_data.inherited_secure_context, - incomplete.embedder_theme, -+ incomplete.is_embedded_webview, -+ incomplete.hide_focus, - self.this.clone(), +@@ -3519,7 +3844,13 @@ + self.senders.pipeline_to_embedder_sender.clone(), + self.senders.constellation_sender.clone(), + incomplete.pipeline_id, +- incomplete.parent_info, ++ // For embedded webviews, don't pass parent_info to Window so that ++ // is_top_level() returns true (they are top-level browsing contexts). ++ if incomplete.is_embedded_webview { ++ None ++ } else { ++ incomplete.parent_info ++ }, + incomplete.viewport_details, + origin.clone(), + creation_url, +@@ -3543,6 +3874,8 @@ + self.gpu_id_hub.clone(), + incomplete.load_data.inherited_secure_context, + incomplete.embedder_theme, ++ incomplete.is_embedded_webview, ++ incomplete.hide_focus, + self.this.clone(), + ) + }, +@@ -3651,8 +3984,6 @@ + image_cache, ); - if self.senders.devtools_server_sender.is_some() { -@@ -3627,6 +3960,8 @@ - ); - } -+ window.init_document(&document); -+ - document.set_ready_state(cx, DocumentReadyState::Loading); - - self.documents -@@ -3633,8 +3968,6 @@ - .borrow_mut() - .insert(incomplete.pipeline_id, &document); - -- window.init_document(&document); +- document.set_ready_state(cx, DocumentReadyState::Loading); - + // Step 8. Let loadTimingInfo be a new document load timing info with its + // navigation start time set to navigationParams's response's timing + // info's start time. +@@ -3672,6 +4003,8 @@ + // Step 10. Set window's associated Document to document. + window.init_document(&document); + ++ document.set_ready_state(cx, DocumentReadyState::Loading); ++ // Initialize the browsing context for the window. let window_proxy = self.window_proxies.local_window_proxy( cx, -@@ -3645,6 +3978,7 @@ +@@ -3682,6 +4015,7 @@ incomplete.webview_id, incomplete.parent_info, incomplete.opener, @@ -520,7 +520,7 @@ ); if let Some(name) = incomplete.frame_name { window_proxy.set_name(DOMString::from(name)); -@@ -3822,11 +4156,11 @@ +@@ -3870,11 +4204,11 @@ target_snapshot_params: TargetSnapshotParams, cx: &mut js::context::JSContext, ) { @@ -535,7 +535,7 @@ iframe.navigate_or_reload_child_browsing_context( load_data, history_handling, -@@ -3834,7 +4168,17 @@ +@@ -3882,7 +4216,17 @@ target_snapshot_params, cx, ); @@ -553,7 +553,7 @@ } /// Turn javascript: URL into JS code to eval, according to the steps in -@@ -4390,10 +4734,88 @@ +@@ -4438,10 +4782,88 @@ document.event_handler().handle_refresh_cursor(); } @@ -642,7 +642,7 @@ fn handle_request_screenshot_readiness( &self, webview_id: WebViewId, -@@ -4434,7 +4856,7 @@ +@@ -4482,7 +4904,7 @@ pinch_zoom_infos: PinchZoomInfos, ) { let Some(window) = self.documents.borrow().find_window(pipeline_id) else { diff --git a/patches/python/servo/platform/build_target.py.patch b/patches/python/servo/platform/build_target.py.patch index a03110e..0f00eae 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 -@@ -61,6 +61,8 @@ +@@ -60,6 +60,8 @@ return AndroidTarget(target_triple) elif "ohos" in target_triple: return OpenHarmonyTarget(target_triple)