diff --git a/Cargo.lock b/Cargo.lock index 24d463a..d5321a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -9313,7 +9313,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.38.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "bitflags 2.13.0", "cssparser", @@ -9690,6 +9690,7 @@ dependencies = [ "euclid", "glow", "kurbo", + "log", "malloc_size_of_derive", "serde", "servo-base", @@ -11074,7 +11075,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.4.3" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "serde", "stable_deref_trait", @@ -11607,7 +11608,7 @@ dependencies = [ [[package]] name = "stylo" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "app_units", "arrayvec", @@ -11663,7 +11664,7 @@ dependencies = [ [[package]] name = "stylo_atoms" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "string_cache", "string_cache_codegen", @@ -11672,7 +11673,7 @@ dependencies = [ [[package]] name = "stylo_derive" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "darling", "proc-macro2", @@ -11684,7 +11685,7 @@ dependencies = [ [[package]] name = "stylo_dom" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "bitflags 2.13.0", "stylo_malloc_size_of", @@ -11693,7 +11694,7 @@ dependencies = [ [[package]] name = "stylo_malloc_size_of" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "app_units", "cssparser", @@ -11710,7 +11711,7 @@ dependencies = [ [[package]] name = "stylo_static_prefs" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "toml 1.1.2+spec-1.1.0", ] @@ -11718,7 +11719,7 @@ dependencies = [ [[package]] name = "stylo_traits" version = "0.18.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "app_units", "bitflags 2.13.0", @@ -12244,7 +12245,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.4.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "cssparser", "servo_arc", @@ -12257,7 +12258,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.1.0" -source = "git+https://github.com/servo/stylo?rev=89499265377cfdf48b9257531259b02642aafa06#89499265377cfdf48b9257531259b02642aafa06" +source = "git+https://github.com/servo/stylo?rev=556f7273f299462d84e1ab30e8b0269addbe76bc#556f7273f299462d84e1ab30e8b0269addbe76bc" dependencies = [ "darling", "proc-macro2", diff --git a/Cargo.toml b/Cargo.toml index 27333c9..2d520b4 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 = "89499265377cfdf48b9257531259b02642aafa06" } +selectors = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } 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 = "89499265377cfdf48b9257531259b02642aafa06" } +servo_arc = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } 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 = "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" } +stylo = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_atoms = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_config = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_dom = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } +stylo_traits = { git = "https://github.com/servo/stylo", rev = "556f7273f299462d84e1ab30e8b0269addbe76bc" } 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 5eca289..5754101 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -073512c72dfdc90cf9cfd898120438ddd3b6d8a1 +84836312bb34882f56b51445445a9912e6bdc1ed diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index 8a49e10..8336c48 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -637,7 +637,7 @@ name = "serde_json" version = "1.0.150" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -7878,6 +8294,7 @@ +@@ -7879,6 +8295,7 @@ "rand 0.10.1", "rustc-hash 2.1.2", "serde", @@ -645,7 +645,7 @@ "servo-background-hang-monitor", "servo-background-hang-monitor-api", "servo-base", -@@ -7904,6 +8321,8 @@ +@@ -7905,6 +8322,8 @@ "servo-webxr-api", "stylo", "stylo_traits", @@ -654,7 +654,7 @@ "tracing", ] -@@ -8536,9 +8955,11 @@ +@@ -8537,9 +8956,11 @@ name = "servo-net" version = "0.3.0" dependencies = [ @@ -666,7 +666,7 @@ "base64", "bytes", "chrono", -@@ -8568,6 +8989,7 @@ +@@ -8569,6 +8990,7 @@ "parking_lot", "quick_cache", "regex", @@ -674,7 +674,7 @@ "resvg", "rustc-hash 2.1.2", "rustls", -@@ -8574,9 +8996,11 @@ +@@ -8575,9 +8997,11 @@ "rustls-pki-types", "rustls-platform-verifier", "serde", @@ -686,7 +686,7 @@ "servo-devtools-traits", "servo-embedder-traits", "servo-hyper-serde", -@@ -8627,6 +9051,7 @@ +@@ -8628,6 +9052,7 @@ "rustc-hash 2.1.2", "rustls-pki-types", "serde", @@ -694,7 +694,7 @@ "servo-base", "servo-config", "servo-default-resources", -@@ -8638,8 +9063,10 @@ +@@ -8639,8 +9064,10 @@ "servo-profile-traits", "servo-url", "servo_arc", @@ -705,7 +705,7 @@ "url", "uuid", "webrender_api", -@@ -9217,6 +9644,7 @@ +@@ -9218,6 +9645,7 @@ "bpaf", "cc", "cfg-if", @@ -713,7 +713,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9231,6 +9659,7 @@ +@@ -9232,6 +9660,7 @@ "headers", "hilog", "hitrace", @@ -721,7 +721,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9251,6 +9680,7 @@ +@@ -9252,6 +9681,7 @@ "ohos-window-manager-sys", "raw-window-handle", "rustls", @@ -729,7 +729,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9257,6 +9687,7 @@ +@@ -9258,6 +9688,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -737,7 +737,7 @@ "surfman", "tokio", "tracing", -@@ -9875,6 +10306,9 @@ +@@ -9876,6 +10307,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -747,7 +747,7 @@ [[package]] name = "synstructure" -@@ -9909,6 +10343,27 @@ +@@ -9910,6 +10344,27 @@ ] [[package]] @@ -775,7 +775,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -9934,6 +10389,12 @@ +@@ -9935,6 +10390,12 @@ ] [[package]] @@ -788,7 +788,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10252,6 +10713,16 @@ +@@ -10253,6 +10714,16 @@ ] [[package]] @@ -805,7 +805,7 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10353,6 +10824,25 @@ +@@ -10354,6 +10825,25 @@ "futures-util", "pin-project-lite", "sync_wrapper", @@ -831,7 +831,7 @@ "tower-layer", "tower-service", ] -@@ -10672,6 +11162,12 @@ +@@ -10673,6 +11163,12 @@ ] [[package]] @@ -844,7 +844,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -11657,6 +12153,17 @@ +@@ -11658,6 +12154,17 @@ ] [[package]] diff --git a/patches/components/layout/layout_impl.rs.patch b/patches/components/layout/layout_impl.rs.patch index 8e84269..fdf0525 100644 --- a/patches/components/layout/layout_impl.rs.patch +++ b/patches/components/layout/layout_impl.rs.patch @@ -41,7 +41,7 @@ device.set_viewport_size(viewport_details.size); device.set_device_pixel_ratio(device_pixel_ratio); self.device_has_changed = true; -@@ -831,6 +848,7 @@ +@@ -834,6 +851,7 @@ accessibility_active: Cell::new(false), accessibility_tree: Default::default(), needs_accessibility_update: Cell::new(false), diff --git a/patches/components/paint/paint.rs.patch b/patches/components/paint/paint.rs.patch index 0228579..c3670af 100644 --- a/patches/components/paint/paint.rs.patch +++ b/patches/components/paint/paint.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -13,7 +13,8 @@ +@@ -14,7 +14,8 @@ use crossbeam_channel::Sender; use dpi::PhysicalSize; use embedder_traits::{ @@ -10,16 +10,16 @@ Scroll, ShutdownState, ViewportDetails, WebViewPoint, WebViewRect, }; use euclid::{Scale, Size2D}; -@@ -30,7 +31,7 @@ +@@ -31,7 +32,7 @@ }; use profile_traits::path; use profile_traits::time::{self as profile_time}; --use servo_base::generic_channel::{self, GenericSender, RoutedReceiver}; -+use servo_base::generic_channel::{self, GenericCallback, GenericSender, RoutedReceiver}; +-use servo_base::generic_channel::{GenericSender, RoutedReceiver}; ++use servo_base::generic_channel::{GenericCallback, GenericSender, RoutedReceiver}; use servo_base::id::{PainterId, PipelineId, WebViewId}; use servo_canvas_traits::webgl::{WebGLContextId, WebGLThreads}; use servo_config::pref; -@@ -44,7 +45,7 @@ +@@ -45,7 +46,7 @@ #[cfg(feature = "webgpu")] use webgpu::canvas_context::WebGpuExternalImageMap; use webrender::{CaptureBits, MemoryReport}; @@ -28,7 +28,7 @@ use webrender_api::{FontInstanceKey, FontKey, ImageKey}; use crate::InitialPaintState; -@@ -135,6 +136,11 @@ +@@ -139,6 +140,11 @@ /// An map of external images shared between all `WebGpuExternalImages`. #[cfg(feature = "webgpu")] webgpu_image_map: std::cell::OnceCell, @@ -40,7 +40,7 @@ } /// Why we need to be repainted. This is used for debugging. -@@ -214,6 +220,7 @@ +@@ -220,6 +226,7 @@ webxr_main_thread: RefCell::new(webxr_main_thread), #[cfg(feature = "webgpu")] webgpu_image_map: Default::default(), @@ -48,7 +48,7 @@ })) } -@@ -546,6 +553,92 @@ +@@ -557,6 +564,92 @@ painter.enable_lcp_calculation(&webview_id); } }, @@ -141,7 +141,7 @@ } } -@@ -603,6 +696,69 @@ +@@ -614,6 +707,69 @@ sender.send(ProcessReports::new(reports)); } @@ -211,7 +211,7 @@ /// Handle messages sent to `Paint` during the shutdown process. In general, /// the things `Paint` can do in this state are limited. It's very important to /// answer any synchronous messages though as other threads might be waiting on the -@@ -747,10 +903,37 @@ +@@ -758,10 +914,37 @@ #[cfg(feature = "webxr")] self.webxr_main_thread.borrow_mut().run_one_frame(); @@ -250,7 +250,7 @@ self.shutdown_state() != ShutdownState::FinishedShuttingDown } -@@ -800,6 +983,53 @@ +@@ -811,6 +994,53 @@ if self.shutdown_state() != ShutdownState::NotShuttingDown { return; } diff --git a/patches/components/script/script_thread.rs.patch b/patches/components/script/script_thread.rs.patch index 38feb1d..c80f187 100644 --- a/patches/components/script/script_thread.rs.patch +++ b/patches/components/script/script_thread.rs.patch @@ -57,7 +57,16 @@ use crate::dom::servoparser::{ParserContext, ServoParser}; use crate::dom::types::DebuggerGlobalScope; #[cfg(feature = "webgpu")] -@@ -1965,11 +1973,46 @@ +@@ -154,7 +162,7 @@ + use crate::mime::{APPLICATION, CHARSET, MimeExt, TEXT, XML}; + use crate::navigation::{InProgressLoad, NavigationListener}; + use crate::network_listener::{FetchResponseListener, submit_timing}; +-use crate::realms::enter_auto_realm; ++use crate::realms::{enter_auto_realm, enter_realm}; + use crate::script_mutation_observers::ScriptMutationObservers; + use crate::script_runtime::{ + CanGc, IntroductionType, Runtime, ScriptThreadEventCategory, ThreadSafeJSContext, get_reports, +@@ -1980,12 +1988,47 @@ self.handle_refresh_cursor(pipeline_id); }, ScriptThreadMessage::PreferencesUpdated(updates) => { @@ -81,7 +90,7 @@ + + // Dispatch preferencechanged events to all Embedder instances + self.dispatch_preference_changed_to_embedders(cx, &updates); -+ }, + }, + ScriptThreadMessage::ShowTaskChooser( + request_id, + task_name, @@ -105,10 +114,11 @@ + ScriptThreadMessage::TaskProvidersUpdate(request_id, providers_json) => { + // Dispatch an embedder event to update the chooser with remote providers. + self.dispatch_task_providers_update(cx, &request_id, &providers_json); - }, ++ }, ScriptThreadMessage::ForwardKeyboardScroll(pipeline_id, scroll) => { if let Some(document) = self.documents.borrow().find_document(pipeline_id) { -@@ -2002,6 +2045,46 @@ + document.event_handler().do_keyboard_scroll(cx, scroll); +@@ -2017,6 +2060,46 @@ ScriptThreadMessage::TriggerGarbageCollection => unsafe { JS_GC(*GlobalScope::get_cx(), GCReason::API); }, @@ -155,7 +165,7 @@ } } -@@ -3055,6 +3138,9 @@ +@@ -3075,6 +3158,9 @@ .documents .borrow() .find_iframe(parent_pipeline_id, browsing_context_id); @@ -165,7 +175,7 @@ let Some(frame_element) = frame_element else { return; }; -@@ -3079,6 +3165,7 @@ +@@ -3099,6 +3185,7 @@ // is no need to pass along existing opener information that // will be discarded. None, @@ -173,7 +183,7 @@ ); } -@@ -3365,6 +3452,183 @@ +@@ -3385,6 +3472,183 @@ } } @@ -357,7 +367,7 @@ fn ask_constellation_for_top_level_info( &self, sender_webview_id: WebViewId, -@@ -3472,7 +3736,13 @@ +@@ -3492,7 +3756,13 @@ self.senders.pipeline_to_embedder_sender.clone(), self.senders.constellation_sender.clone(), incomplete.pipeline_id, @@ -372,7 +382,7 @@ incomplete.viewport_details, origin.clone(), final_url.clone(), -@@ -3494,6 +3764,8 @@ +@@ -3514,6 +3784,8 @@ #[cfg(feature = "webgpu")] self.gpu_id_hub.clone(), incomplete.load_data.inherited_secure_context, @@ -381,7 +391,7 @@ incomplete.theme, self.this.clone(), ); -@@ -3599,6 +3871,8 @@ +@@ -3619,6 +3891,8 @@ ); } @@ -390,7 +400,7 @@ document.set_ready_state(cx, DocumentReadyState::Loading); self.documents -@@ -3605,8 +3879,6 @@ +@@ -3625,8 +3899,6 @@ .borrow_mut() .insert(incomplete.pipeline_id, &document); @@ -399,7 +409,7 @@ // Initialize the browsing context for the window. let window_proxy = self.window_proxies.local_window_proxy( cx, -@@ -3617,6 +3889,7 @@ +@@ -3637,6 +3909,7 @@ incomplete.webview_id, incomplete.parent_info, incomplete.opener, @@ -407,7 +417,7 @@ ); if window_proxy.parent().is_some() { // https://html.spec.whatwg.org/multipage/#navigating-across-documents:delaying-load-events-mode-2 -@@ -4355,10 +4628,84 @@ +@@ -4375,10 +4648,84 @@ document.event_handler().handle_refresh_cursor(); } @@ -492,7 +502,7 @@ fn handle_request_screenshot_readiness( &self, webview_id: WebViewId, -@@ -4399,7 +4746,7 @@ +@@ -4419,7 +4766,7 @@ can_gc: CanGc, ) { let Some(window) = self.documents.borrow().find_window(pipeline_id) else {