diff --git a/Cargo.lock b/Cargo.lock index 5b2d7b5..2a4419b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4071,9 +4071,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.15" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" +checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" dependencies = [ "atomic-waker", "bytes", @@ -4298,7 +4298,7 @@ dependencies = [ "futures-channel", "futures-io", "futures-util", - "h2 0.4.15", + "h2 0.4.16", "hickory-proto 0.26.1", "http 1.5.0", "idna", @@ -4567,7 +4567,7 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "httparse", @@ -8538,9 +8538,9 @@ dependencies = [ [[package]] name = "quinn-proto" -version = "0.11.16" +version = "0.11.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f4bfc015262b9df63c8845072ce59068853ff5872180c2ce2f13038b970e560" +checksum = "04759210543be93709136e28212294a659ef5001836ff4eab4d663e4529bba83" dependencies = [ "bytes", "getrandom 0.4.3", @@ -8900,7 +8900,7 @@ dependencies = [ "bytes", "encoding_rs", "futures-core", - "h2 0.4.15", + "h2 0.4.16", "http 1.5.0", "http-body 1.1.0", "http-body-util", @@ -9424,7 +9424,7 @@ dependencies = [ [[package]] name = "selectors" version = "0.40.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "bitflags 2.13.1", "cssparser", @@ -10968,6 +10968,7 @@ name = "servo-script-traits" version = "0.5.0" dependencies = [ "accesskit", + "bitflags 2.13.1", "crossbeam-channel", "euclid", "keyboard-types 0.8.3", @@ -11243,7 +11244,7 @@ dependencies = [ [[package]] name = "servo_arc" version = "0.4.3" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "serde", "stable_deref_trait", @@ -11787,7 +11788,7 @@ dependencies = [ [[package]] name = "stylo" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "app_units", "arrayvec", @@ -11843,7 +11844,7 @@ dependencies = [ [[package]] name = "stylo_atoms" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "string_cache", "string_cache_codegen", @@ -11852,7 +11853,7 @@ dependencies = [ [[package]] name = "stylo_derive" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "darling", "proc-macro2", @@ -11864,7 +11865,7 @@ dependencies = [ [[package]] name = "stylo_dom" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "bitflags 2.13.1", "stylo_malloc_size_of", @@ -11873,7 +11874,7 @@ dependencies = [ [[package]] name = "stylo_malloc_size_of" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "app_units", "cssparser", @@ -11890,7 +11891,7 @@ dependencies = [ [[package]] name = "stylo_static_prefs" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "toml 1.1.4+spec-1.1.0", ] @@ -11898,7 +11899,7 @@ dependencies = [ [[package]] name = "stylo_traits" version = "0.20.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "app_units", "bitflags 2.13.1", @@ -12434,7 +12435,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "to_shmem" version = "0.5.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "cssparser", "servo_arc", @@ -12447,7 +12448,7 @@ dependencies = [ [[package]] name = "to_shmem_derive" version = "0.1.0" -source = "git+https://github.com/servo/stylo?rev=cc499a88513045823fc66c2b67492271023d98b2#cc499a88513045823fc66c2b67492271023d98b2" +source = "git+https://github.com/servo/stylo?rev=e6b0b9dd4233237d13e28a8a8d0e484992a1a572#e6b0b9dd4233237d13e28a8a8d0e484992a1a572" dependencies = [ "darling", "proc-macro2", @@ -14873,7 +14874,7 @@ checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" dependencies = [ "yoke 0.7.5", "zerofrom", - "zerovec-derive 0.10.3", + "zerovec-derive 0.10.4", ] [[package]] @@ -14885,14 +14886,14 @@ dependencies = [ "serde", "yoke 0.8.3", "zerofrom", - "zerovec-derive 0.11.4", + "zerovec-derive 0.11.5", ] [[package]] name = "zerovec-derive" -version = "0.10.3" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +checksum = "3e3c6377872d72510393f688a555d7097b0f741995c7a00f0407f786dd486b2d" dependencies = [ "proc-macro2", "quote", @@ -14901,9 +14902,9 @@ dependencies = [ [[package]] name = "zerovec-derive" -version = "0.11.4" +version = "0.11.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47402523226a02bfe5230160dc3ccc089aa6f6f19e7fcbb4e6f824bbb1b4aa62" +checksum = "9f212a141d820099d57ffafb9569be9617a6f27d3dc881fbee8fb56642f917a9" dependencies = [ "proc-macro2", "quote", diff --git a/Cargo.toml b/Cargo.toml index ffb1640..0c47c2e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -226,7 +226,7 @@ script_webgpu = { package = "servo-script-webgpu", version = "=0.5.0", path = "s script_traits = { package = "servo-script-traits", path = "source/components/shared/script" } sea-query = { version = "1.0.1", default-features = false, features = ["backend-sqlite", "derive"] } sea-query-rusqlite = "0.8.0" -selectors = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } +selectors = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } seq-macro = "0.3.6" serde = "1.0.228" serde_bytes = "0.11" @@ -266,7 +266,7 @@ servo-wakelock = { version = "0.5.0", path = "source/components/wakelock" } servo-webvtt = { version = "0.5.0", path = "source/components/webvtt" } servo_allocator = { package = "servo-allocator", version = "0.5.0", path = "source/components/allocator" } servo-tracing = { path = "source/components/servo_tracing" } -servo_arc = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } +servo_arc = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } servo-url = { version = "0.5.0", path = "source/components/url" } sha1 = "0.11" sha2 = "0.11" @@ -279,13 +279,13 @@ storage = { package = "servo-storage", version = "0.5.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 = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_atoms = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_config = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_dom = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } -stylo_traits = { git = "https://github.com/servo/stylo", rev = "cc499a88513045823fc66c2b67492271023d98b2" } +stylo = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_atoms = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_config = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_dom = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_malloc_size_of = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_static_prefs = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } +stylo_traits = { git = "https://github.com/servo/stylo", rev = "e6b0b9dd4233237d13e28a8a8d0e484992a1a572" } surfman = { version = "0.13.0", features = ["chains"] } swapper = "0.1" syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } diff --git a/crates/beaver_shell/src/browser_window.rs b/crates/beaver_shell/src/browser_window.rs index 0627655..00e7bab 100644 --- a/crates/beaver_shell/src/browser_window.rs +++ b/crates/beaver_shell/src/browser_window.rs @@ -159,9 +159,9 @@ impl BrowserWindow { } let mouse_button = match &button { - MouseButton::Left => ServoMouseButton::Left, - MouseButton::Right => ServoMouseButton::Right, - MouseButton::Middle => ServoMouseButton::Middle, + MouseButton::Left => ServoMouseButton::Primary, + MouseButton::Right => ServoMouseButton::Secondary, + MouseButton::Middle => ServoMouseButton::Auxiliary, MouseButton::Back => ServoMouseButton::Back, MouseButton::Forward => ServoMouseButton::Forward, MouseButton::Other(value) => ServoMouseButton::Other(*value), diff --git a/forkme.lock b/forkme.lock index 19e4594..85c9564 100644 --- a/forkme.lock +++ b/forkme.lock @@ -1 +1 @@ -0be8e7b73fc931ace1eeb5803648365b38722478 +6ee336ce836324f52c1821f51e9b5cdb2b99c239 diff --git a/patches/Cargo.lock.patch b/patches/Cargo.lock.patch index 3552aa4..3889313 100644 --- a/patches/Cargo.lock.patch +++ b/patches/Cargo.lock.patch @@ -692,7 +692,7 @@ "url", "uuid", "webrender_api", -@@ -9414,6 +9840,7 @@ +@@ -9415,6 +9841,7 @@ "bpaf", "cc", "cfg-if", @@ -700,7 +700,7 @@ "crossbeam-channel", "dirs", "dpi", -@@ -9428,6 +9855,7 @@ +@@ -9429,6 +9856,7 @@ "headers", "hilog", "hitrace", @@ -708,7 +708,7 @@ "image", "ipc-channel", "jni 0.22.4", -@@ -9450,6 +9878,7 @@ +@@ -9451,6 +9879,7 @@ "ohos-window-sys", "raw-window-handle", "rustls", @@ -716,7 +716,7 @@ "serde_json", "servo", "servo-allocator", -@@ -9456,6 +9885,7 @@ +@@ -9457,6 +9886,7 @@ "servo-base", "servo-webdriver-server", "signal-hook-registry", @@ -724,7 +724,7 @@ "surfman", "tokio", "tracing", -@@ -10102,6 +10532,9 @@ +@@ -10103,6 +10533,9 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" @@ -734,7 +734,7 @@ [[package]] name = "synstructure" -@@ -10136,6 +10569,27 @@ +@@ -10137,6 +10570,27 @@ ] [[package]] @@ -762,7 +762,7 @@ name = "system-deps" version = "7.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10161,6 +10615,12 @@ +@@ -10162,6 +10616,12 @@ ] [[package]] @@ -775,7 +775,7 @@ name = "tar" version = "0.4.46" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10478,6 +10938,16 @@ +@@ -10479,6 +10939,16 @@ ] [[package]] @@ -792,7 +792,7 @@ name = "tokio-rustls" version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10580,11 +11050,30 @@ +@@ -10581,11 +11051,30 @@ "futures-util", "pin-project-lite", "sync_wrapper", @@ -823,7 +823,7 @@ name = "tower-layer" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -10898,6 +11387,12 @@ +@@ -10899,6 +11388,12 @@ ] [[package]] @@ -836,7 +836,7 @@ name = "urlpattern" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -@@ -12018,6 +12513,17 @@ +@@ -12019,6 +12514,17 @@ ] [[package]] diff --git a/patches/components/constellation/constellation.rs.patch b/patches/components/constellation/constellation.rs.patch index 8074c4f..7fa72d8 100644 --- a/patches/components/constellation/constellation.rs.patch +++ b/patches/components/constellation/constellation.rs.patch @@ -23,44 +23,46 @@ - AnimationState, EmbedderControlId, EmbedderControlResponse, EmbedderProxy, FocusSequenceNumber, - GenericEmbedderProxy, InputEvent, InputEventAndId, InputEventOutcome, JSValue, - JavaScriptEvaluationError, JavaScriptEvaluationId, KeyboardEvent, MediaSessionActionType, -- MediaSessionEvent, MediaSessionPlaybackState, MouseButton, MouseButtonAction, MouseButtonEvent, +- MediaSessionEvent, MediaSessionPlaybackState, MouseButtonAction, MouseButtonEvent, - NewWebViewDetails, PaintHitTestResult, Theme, ViewportDetails, WakeLockDelegate, WakeLockType, - WebDriverCommandMsg, WebDriverLoadStatus, WebDriverScriptCommand, + AnimationState, EmbedderControlId, EmbedderControlRequest, EmbedderControlResponse, + EmbedderMsg, EmbedderProxy, FocusSequenceNumber, GenericEmbedderProxy, InputEvent, + InputEventAndId, InputEventOutcome, JSValue, JavaScriptEvaluationError, JavaScriptEvaluationId, + KeyboardEvent, MediaSessionActionType, MediaSessionEvent, MediaSessionPlaybackState, -+ MouseButton, MouseButtonAction, MouseButtonEvent, NewWebViewDetails, PaintHitTestResult, Theme, ++ MouseButtonAction, MouseButtonEvent, NewWebViewDetails, PaintHitTestResult, Theme, + ViewportDetails, WakeLockDelegate, WakeLockType, WebDriverCommandMsg, WebDriverLoadStatus, + WebDriverScriptCommand, WebViewPoint, }; use euclid::Size2D; use euclid::default::Size2D as UntypedSize2D; -@@ -159,14 +162,15 @@ +@@ -159,15 +162,16 @@ use servo_canvas_traits::canvas::{CanvasId, CanvasMsg}; use servo_config::{opts, pref}; use servo_constellation_traits::{ - AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, ConstellationInterest, -- DocumentState, EmbedderToConstellationMessage, IFrameLoadInfo, IFrameLoadInfoWithData, -- IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, -- PortMessageTask, PortTransferInfo, RemoteFocusOperation, SWManagerSenders, -- ScreenshotReadinessResponse, ScriptToConstellationMessage, ScrollStateUpdate, -- ServiceWorkerAlgorithm, ServiceWorkerManagerFactory, ServiceWorkerMsg, +- DocumentState, EmbedderToConstellationMessage, HistoryTraversalSource, IFrameLoadInfo, +- IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, +- NavigationHistoryBehavior, PaintMetricEvent, PortMessageTask, PortTransferInfo, +- RemoteFocusOperation, SWManagerSenders, ScreenshotReadinessResponse, +- ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerAlgorithm, +- ServiceWorkerManagerFactory, ServiceWorkerMsg, SessionHistoryTraversalRequest, - StructuredSerializedData, TargetSnapshotParams, TraversalDirection, UserContentManagerAction, - WindowSizeType, WorkerAnimationFrameTick, + AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, BroadcastChannelMsg, + ConstellationInterest, DocumentState, EmbeddedWebViewCreationRequest, + EmbeddedWebViewCreationResponse, EmbeddedWebViewEventType, EmbedderToConstellationMessage, -+ IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, LogEntry, MessagePortMsg, -+ NavigationHistoryBehavior, PaintMetricEvent, PairingEvent, PortMessageTask, PortTransferInfo, -+ RemoteFocusOperation, SWManagerSenders, ScreenshotReadinessResponse, -+ ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerAlgorithm, -+ ServiceWorkerManagerFactory, ServiceWorkerMsg, StructuredSerializedData, TargetSnapshotParams, ++ HistoryTraversalSource, IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, LoadData, ++ LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, PairingEvent, ++ PortMessageTask, PortTransferInfo, RemoteFocusOperation, SWManagerSenders, ++ ScreenshotReadinessResponse, ScriptToConstellationMessage, ScrollStateUpdate, ++ ServiceWorkerAlgorithm, ServiceWorkerManagerFactory, ServiceWorkerMsg, ++ SessionHistoryTraversalRequest, StructuredSerializedData, TargetSnapshotParams, + TraversalDirection, UserContentManagerAction, WindowSizeType, WorkerAnimationFrameTick, }; use servo_url::{Host, ImmutableOrigin, ServoUrl}; use storage_traits::StorageThreads; -@@ -181,6 +185,7 @@ +@@ -182,6 +186,7 @@ use webgpu_traits::{WebGPU, WebGPURequest}; use super::embedder::ConstellationToEmbedderMsg; @@ -68,10 +70,10 @@ use crate::broadcastchannel::BroadcastChannels; use crate::browsingcontext::{ AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator, -@@ -187,11 +192,18 @@ +@@ -188,11 +193,18 @@ NewBrowsingContextInfo, }; - use crate::constellation_webview::ConstellationWebView; + use crate::constellation_webview::{ConstellationWebView, OngoingHistoryTraversalRequest}; +#[cfg(any(target_os = "linux", target_os = "macos"))] +use crate::dbus_service; use crate::event_loop::EventLoop; @@ -87,7 +89,7 @@ struct PendingApprovalNavigation { load_data: LoadData, -@@ -222,6 +234,12 @@ +@@ -223,6 +235,12 @@ /// While a completion failed, another global requested to complete the transfer. /// We are still buffering messages, and awaiting the return of the buffer from the global who failed. CompletionRequested(MessagePortRouterId, VecDeque), @@ -100,9 +102,9 @@ } #[derive(Debug)] -@@ -480,6 +498,13 @@ +@@ -481,6 +499,13 @@ /// currently being pressed. - pressed_mouse_buttons: u16, + pressed_mouse_buttons: MouseButtons, + /// True while a mouse button that went down over the chrome (root) webview is + /// still held. Pins the whole drag (moves + up) to the chrome so a fast @@ -114,7 +116,7 @@ /// The currently activated keyboard modifiers. active_keyboard_modifiers: Modifiers, -@@ -533,6 +558,47 @@ +@@ -534,6 +559,47 @@ /// to the `UserContents` need to be forwared to all the `ScriptThread`s that host /// the relevant `WebView`. pub(crate) user_contents_for_manager_id: FxHashMap, @@ -162,7 +164,7 @@ } /// State needed to construct a constellation. -@@ -597,6 +663,9 @@ +@@ -598,6 +664,9 @@ /// The wake lock provider for acquiring and releasing OS-level screen wake locks. pub wake_lock_provider: Box, @@ -172,7 +174,7 @@ } /// When we are exiting a pipeline, we can either force exiting or not. A normal exit -@@ -680,6 +749,11 @@ +@@ -681,6 +750,11 @@ let broken_image_icon_data = resources::read_bytes(Resource::BrokenImageIcon); @@ -184,7 +186,7 @@ let mut constellation: Constellation = Constellation { event_loops: Default::default(), namespace_receiver, -@@ -701,7 +775,7 @@ +@@ -702,7 +776,7 @@ script_to_devtools_callback: Default::default(), #[cfg(feature = "bluetooth")] bluetooth_ipc_sender: state.bluetooth_thread, @@ -193,15 +195,15 @@ private_resource_threads: state.private_resource_threads, public_storage_threads: state.public_storage_threads, private_storage_threads: state.private_storage_threads, -@@ -740,6 +814,7 @@ +@@ -741,6 +815,7 @@ canvas: OnceCell::new(), pending_approval_navigations: Default::default(), - pressed_mouse_buttons: 0, + pressed_mouse_buttons: MouseButtons::empty(), + mouse_drag_pinned_to_chrome: false, active_keyboard_modifiers: Modifiers::empty(), hard_fail, active_media_session: None, -@@ -756,6 +831,23 @@ +@@ -757,6 +832,23 @@ pending_viewport_changes: Default::default(), screenshot_readiness_requests: Vec::new(), user_contents_for_manager_id: Default::default(), @@ -225,7 +227,7 @@ }; constellation.run(); -@@ -781,6 +873,18 @@ +@@ -782,6 +874,18 @@ fn clean_up_finished_script_event_loops(&mut self) { self.event_loop_join_handles .retain(|join_handle| !join_handle.is_finished()); @@ -244,7 +246,7 @@ self.event_loops .retain(|event_loop| event_loop.upgrade().is_some()); } -@@ -1061,6 +1165,11 @@ +@@ -1063,6 +1167,11 @@ .get(&webview_id) .and_then(|webview| webview.user_content_manager_id); @@ -256,7 +258,7 @@ let new_pipeline_info = NewPipelineInfo { parent_info: parent_pipeline_id, new_pipeline_id, -@@ -1073,6 +1182,13 @@ +@@ -1075,6 +1184,13 @@ embedder_theme: theme, target_snapshot_params, frame_name: name, @@ -270,7 +272,7 @@ }; let pipeline = match Pipeline::spawn(new_pipeline_info, event_loop, self, throttled) { Ok(pipeline) => pipeline, -@@ -1238,6 +1354,9 @@ +@@ -1240,6 +1356,9 @@ Script((WebViewId, PipelineId, ScriptToConstellationMessage)), BackgroundHangMonitor(HangAlert), Embedder(EmbedderToConstellationMessage), @@ -280,7 +282,7 @@ RemoveProcess(usize), } // Get one incoming request. -@@ -1257,6 +1376,28 @@ +@@ -1259,6 +1378,28 @@ sel.recv(&self.background_hang_monitor_receiver); sel.recv(&self.embedder_to_constellation_receiver); @@ -309,7 +311,7 @@ self.process_manager.register(&mut sel); let request = { -@@ -1283,9 +1424,30 @@ +@@ -1285,9 +1426,30 @@ oper.recv(&self.embedder_to_constellation_receiver) .expect("Unexpected embedder channel panic in constellation"), )), @@ -341,7 +343,7 @@ let _ = oper.recv(self.process_manager.receiver_at(process_index)); Ok(Request::RemoveProcess(process_index)) }, -@@ -1308,10 +1470,67 @@ +@@ -1310,10 +1472,67 @@ Request::BackgroundHangMonitor(message) => { self.handle_request_from_background_hang_monitor(message); }, @@ -409,7 +411,7 @@ #[servo_tracing::instrument(skip_all)] fn handle_request_for_pipeline_namespace(&mut self, request: PipelineNamespaceRequest) { let PipelineNamespaceRequest(sender) = request; -@@ -1403,6 +1622,15 @@ +@@ -1398,6 +1617,15 @@ EmbedderToConstellationMessage::ThemeChange(webview_id, theme) => { self.handle_theme_change(webview_id, theme); }, @@ -425,7 +427,7 @@ EmbedderToConstellationMessage::TickAnimation(webview_ids) => { self.handle_tick_animation(webview_ids) }, -@@ -1421,6 +1649,16 @@ +@@ -1416,6 +1644,16 @@ EmbedderToConstellationMessage::ForwardInputEvent(webview_id, event, hit_test) => { self.forward_input_event(webview_id, event, hit_test); }, @@ -442,7 +444,7 @@ EmbedderToConstellationMessage::RefreshCursor(pipeline_id) => { self.handle_refresh_cursor(pipeline_id) }, -@@ -1470,11 +1708,7 @@ +@@ -1465,11 +1703,7 @@ } }, EmbedderToConstellationMessage::PreferencesUpdated(updates) => { @@ -455,7 +457,7 @@ let _ = event_loop.send(ScriptThreadMessage::PreferencesUpdated( updates .iter() -@@ -1501,6 +1735,18 @@ +@@ -1496,6 +1730,18 @@ EmbedderToConstellationMessage::SetAccessibilityActive(webview_id, active) => { self.set_accessibility_active(webview_id, active); }, @@ -474,7 +476,7 @@ } } -@@ -1698,7 +1944,13 @@ +@@ -1693,7 +1939,13 @@ return warn!("Attempt to add channel name from an unexpected origin."); } self.broadcast_channels @@ -489,7 +491,7 @@ }, ScriptToConstellationMessage::RemoveBroadcastChannelNameInRouter( router_id, -@@ -1712,7 +1964,13 @@ +@@ -1707,7 +1959,13 @@ return warn!("Attempt to remove channel name from an unexpected origin."); } self.broadcast_channels @@ -504,7 +506,7 @@ }, ScriptToConstellationMessage::RemoveBroadcastChannelRouter(router_id, origin) => { if self -@@ -1724,6 +1982,12 @@ +@@ -1719,6 +1977,12 @@ self.broadcast_channels .remove_broadcast_channel_router(router_id); }, @@ -517,7 +519,7 @@ ScriptToConstellationMessage::ScheduleBroadcast(router_id, message) => { if self .check_origin_against_pipeline(&source_pipeline_id, &message.origin) -@@ -1733,8 +1997,15 @@ +@@ -1728,8 +1992,15 @@ "Attempt to schedule broadcast from an origin not matching the origin of the msg." ); } @@ -534,7 +536,7 @@ }, ScriptToConstellationMessage::PipelineExited => { self.handle_pipeline_exited(source_pipeline_id); -@@ -1754,6 +2025,12 @@ +@@ -1749,6 +2020,12 @@ ScriptToConstellationMessage::CreateAuxiliaryWebView(load_info) => { self.handle_script_new_auxiliary(load_info); }, @@ -547,7 +549,7 @@ ScriptToConstellationMessage::ChangeRunningAnimationsState(animation_state) => { self.handle_change_running_animations_state(source_pipeline_id, animation_state) }, -@@ -1825,7 +2102,7 @@ +@@ -1820,7 +2097,7 @@ ScriptToConstellationMessage::SetFinalUrl(final_url) => { // The script may have finished loading after we already started shutting down. if let Some(ref mut pipeline) = self.pipelines.get_mut(&source_pipeline_id) { @@ -556,7 +558,7 @@ } else { warn!("constellation got set final url message for dead pipeline"); } -@@ -1950,6 +2227,12 @@ +@@ -1945,6 +2222,12 @@ .entry(interest) .or_default() .insert(source_pipeline_id); @@ -569,7 +571,7 @@ }, ScriptToConstellationMessage::UnregisterInterest(interest) => { if let Some(set) = self.pipeline_interests.get_mut(&interest) { -@@ -1975,6 +2258,29 @@ +@@ -1970,6 +2253,29 @@ new_value, ); }, @@ -599,7 +601,7 @@ ScriptToConstellationMessage::MediaSessionEvent(pipeline_id, event) => { // Unlikely at this point, but we may receive events coming from // different media sessions, so we set the active media session based -@@ -1993,8 +2299,13 @@ +@@ -1988,8 +2294,13 @@ }; self.active_media_session = Some(pipeline_id); self.constellation_to_embedder_proxy.send( @@ -614,7 +616,7 @@ }, #[cfg(feature = "webgpu")] ScriptToConstellationMessage::RequestAdapter(response_sender, options, ids) => self -@@ -2067,9 +2378,1088 @@ +@@ -2062,9 +2373,1093 @@ } }, }, @@ -658,9 +660,14 @@ + direction, + traversal_id, + ) => { -+ // Only allow if this is a valid embedded webview ++ // Only allow if this is a valid embedded webview: + if self.webviews.contains_key(&embedded_webview_id) { -+ self.handle_traverse_history_msg(embedded_webview_id, direction); ++ let request = SessionHistoryTraversalRequest::new( ++ embedded_webview_id, ++ direction, ++ HistoryTraversalSource::Script, ++ ); ++ self.handle_traverse_session_history_msg(request); + // Notify the embedded webview parent about traversal completion + self.handle_embedded_webview_notification( + embedded_webview_id, @@ -758,7 +765,7 @@ + let constellation_event = ConstellationInputEvent { + event, + hit_test_result: None, -+ pressed_mouse_buttons: 0, ++ pressed_mouse_buttons: MouseButtons::empty(), + active_keyboard_modifiers: Modifiers::empty(), + }; + let _ = pipeline @@ -1703,7 +1710,7 @@ /// Check the origin of a message against that of the pipeline it came from. /// Note: this is still limited as a security check, /// see -@@ -2386,6 +3776,55 @@ +@@ -2381,6 +3776,55 @@ TransferState::TransferInProgress(queue) => queue.push_back(task), TransferState::CompletionFailed(queue) => queue.push_back(task), TransferState::CompletionRequested(_, queue) => queue.push_back(task), @@ -1759,7 +1766,7 @@ } } -@@ -3200,6 +4639,101 @@ +@@ -3186,6 +4630,101 @@ ); } @@ -1861,7 +1868,7 @@ fn forward_input_event( &mut self, webview_id: WebViewId, -@@ -3219,6 +4753,66 @@ +@@ -3205,6 +4744,66 @@ let pressed_mouse_buttons = self.pressed_mouse_buttons; let active_keyboard_modifiers = self.active_keyboard_modifiers; @@ -1903,7 +1910,7 @@ + // target here; an embedded press keeps normal per-move routing, no regression). + self.mouse_drag_pinned_to_chrome = + !self.embedded_webview_to_iframe.contains_key(&webview_id); -+ } else if is_mouse_up && self.pressed_mouse_buttons == 0 { ++ } else if is_mouse_up && self.pressed_mouse_buttons == MouseButtons::empty() { + self.mouse_drag_pinned_to_chrome = false; + } + @@ -1928,7 +1935,7 @@ let event_id = event.id; let Some(webview) = self.webviews.get_mut(&webview_id) else { warn!("Got input event for unknown WebViewId: {webview_id:?}"); -@@ -3322,6 +4916,40 @@ +@@ -3308,6 +4907,40 @@ /// fn handle_close_top_level_browsing_context(&mut self, webview_id: WebViewId) { debug!("{webview_id}: Closing"); @@ -1969,7 +1976,7 @@ let browsing_context_id = BrowsingContextId::from(webview_id); // Step 5. Remove traversable from the user agent's top-level traversable set. let browsing_context = -@@ -3600,8 +5228,27 @@ +@@ -3600,8 +5233,27 @@ opener_webview_id, opener_pipeline_id, response_sender, @@ -1997,7 +2004,7 @@ let Some((webview_id_sender, webview_id_receiver)) = generic_channel::channel() else { warn!("Failed to create channel"); let _ = response_sender.send(None); -@@ -3700,6 +5347,403 @@ +@@ -3700,6 +5352,403 @@ }); } @@ -2401,7 +2408,7 @@ #[servo_tracing::instrument(skip_all)] fn handle_refresh_cursor(&self, pipeline_id: PipelineId) { let Some(pipeline) = self.pipelines.get(&pipeline_id) else { -@@ -4539,7 +6583,7 @@ +@@ -4675,7 +6724,7 @@ }, }; @@ -2410,7 +2417,7 @@ match self.browsing_contexts.get_mut(&browsing_context_id) { Some(browsing_context) => { let old_pipeline_id = browsing_context.pipeline_id; -@@ -4548,6 +6592,7 @@ +@@ -4684,6 +6733,7 @@ old_pipeline_id, browsing_context.parent_pipeline_id, browsing_context.webview_id, @@ -2418,7 +2425,7 @@ ) }, None => { -@@ -4557,6 +6602,15 @@ +@@ -4694,6 +6744,15 @@ self.unload_document(old_pipeline_id); @@ -2434,7 +2441,7 @@ if let Some(new_pipeline) = self.pipelines.get(&new_pipeline_id) { if let Some(ref chan) = self.devtools_sender { let state = NavigationState::Start(new_pipeline.url.clone()); -@@ -5125,7 +7179,7 @@ +@@ -5264,7 +7323,7 @@ } #[servo_tracing::instrument(skip_all)] @@ -2443,7 +2450,7 @@ // Send a flat projection of the history to embedder. // The final vector is a concatenation of the URLs of the past // entries, the current entry and the future entries. -@@ -5237,9 +7291,22 @@ +@@ -5376,9 +7435,22 @@ self.constellation_to_embedder_proxy .send(ConstellationToEmbedderMsg::HistoryChanged( webview_id, @@ -2467,7 +2474,7 @@ } #[servo_tracing::instrument(skip_all)] -@@ -5258,7 +7325,7 @@ +@@ -5397,7 +7469,7 @@ webview.focused_browsing_context_id = change.browsing_context_id; } @@ -2476,7 +2483,7 @@ match self.browsing_contexts.get_mut(&change.browsing_context_id) { Some(browsing_context) => { debug!("Adding pipeline to existing browsing context."); -@@ -5265,11 +7332,15 @@ +@@ -5404,11 +7476,15 @@ let old_pipeline_id = browsing_context.pipeline_id; browsing_context.pipelines.insert(change.new_pipeline_id); browsing_context.update_current_entry(change.new_pipeline_id); @@ -2494,7 +2501,7 @@ }, }; -@@ -5277,6 +7348,18 @@ +@@ -5416,6 +7492,18 @@ self.unload_document(old_pipeline_id); } diff --git a/patches/components/constellation/constellation_webview.rs.patch b/patches/components/constellation/constellation_webview.rs.patch index d9b4261..973f74b 100644 --- a/patches/components/constellation/constellation_webview.rs.patch +++ b/patches/components/constellation/constellation_webview.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -59,6 +59,11 @@ +@@ -72,6 +72,11 @@ /// via [`ScriptThreadMessage::SetAccessibilityActive`] in `set_accessibility_active()` /// and [`crate::Constellation::set_frame_tree_for_webview()`]. pub accessibility_active: bool, @@ -12,7 +12,7 @@ } impl ConstellationWebView { -@@ -67,6 +72,20 @@ +@@ -80,6 +85,20 @@ focused_browsing_context_id: BrowsingContextId, user_content_manager_id: Option, ) -> Self { @@ -33,15 +33,15 @@ Self { webview_id, user_content_manager_id, -@@ -78,6 +97,7 @@ - session_history: JointSessionHistory::new(), +@@ -93,6 +112,7 @@ + ongoing_history_traversal_request: None, theme: Theme::Light, accessibility_active: false, + hide_focus, } } -@@ -97,12 +117,41 @@ +@@ -112,12 +132,41 @@ event: &ConstellationInputEvent, browsing_contexts: &FxHashMap, ) -> Option { @@ -85,7 +85,7 @@ let browsing_context_id = if matches!(event.event.event, InputEvent::MouseLeftViewport(_)) { self.hovered_browsing_context_id .unwrap_or(self.focused_browsing_context_id) -@@ -172,11 +221,9 @@ +@@ -187,11 +236,9 @@ if let InputEvent::MouseMove(_) = &event.event.event { update_hovered_browsing_context(Some(pipeline.browsing_context_id), true); diff --git a/patches/components/script/Cargo.toml.patch b/patches/components/script/Cargo.toml.patch index 73ecb17..a67662d 100644 --- a/patches/components/script/Cargo.toml.patch +++ b/patches/components/script/Cargo.toml.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -59,6 +59,7 @@ +@@ -93,6 +93,7 @@ backtrace = { workspace = true } base64 = { workspace = true } base64ct = { workspace = true } diff --git a/patches/components/script/dom/document/document.rs.patch b/patches/components/script/dom/document/document.rs.patch index 0237dfc..da42925 100644 --- a/patches/components/script/dom/document/document.rs.patch +++ b/patches/components/script/dom/document/document.rs.patch @@ -288,7 +288,7 @@ pub(crate) fn set_navigation_start(&self, navigation_start: CrossProcessInstant) { self.interactive_time .borrow_mut() -@@ -3253,6 +3397,60 @@ +@@ -3269,6 +3413,60 @@ .push(Dom::from_ref(resize_observer)); } @@ -349,7 +349,7 @@ /// /// pub(crate) fn gather_active_resize_observations_at_depth( -@@ -3847,6 +4045,7 @@ +@@ -3863,6 +4061,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), -@@ -3906,6 +4105,8 @@ +@@ -3922,6 +4121,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, -@@ -3928,10 +4129,12 @@ +@@ -3944,10 +4145,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,7 +379,7 @@ state_override: Default::default(), value_override: Default::default(), default_single_line_container_name: Default::default(), -@@ -3949,6 +4152,7 @@ +@@ -3965,6 +4168,7 @@ image_cache, history: Default::default(), theme: Default::default(), @@ -387,7 +387,7 @@ } } -@@ -4700,6 +4904,33 @@ +@@ -4716,6 +4920,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::() -@@ -4759,10 +4990,8 @@ +@@ -4775,10 +5006,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. -@@ -5008,6 +5237,36 @@ +@@ -5024,6 +5253,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())); } } -@@ -5095,6 +5354,30 @@ +@@ -5111,6 +5370,30 @@ self.theme.set(new_theme); self.window.refresh_theme(); } diff --git a/patches/components/script/dom/document/document_event_handler.rs.patch b/patches/components/script/dom/document/document_event_handler.rs.patch index e422458..a1a2b81 100644 --- a/patches/components/script/dom/document/document_event_handler.rs.patch +++ b/patches/components/script/dom/document/document_event_handler.rs.patch @@ -18,7 +18,7 @@ use embedder_traits::{ @@ -42,8 +43,11 @@ use script_bindings::str::DOMString; - use script_traits::ConstellationInputEvent; + use script_traits::{ConstellationInputEvent, MouseButtons}; use servo_base::generic_channel::GenericCallback; +use servo_base::id::WebViewId; use servo_config::pref; @@ -436,11 +436,11 @@ + debug!( "{:?}: at {:?}", - event.action, hit_test_result.point_in_frame -@@ -1025,7 +1368,12 @@ + mouse_button_event.action, hit_test_result.point_in_frame +@@ -1028,7 +1371,12 @@ // Step 9. If mbutton is the secondary mouse button, then // Maybe show context menu with native, target. - if let MouseButton::Right = event.button { + if let MouseButton::Secondary = mouse_button_event.button { - self.maybe_show_context_menu(cx, node.upcast(), &hit_test_result, input_event); + self.maybe_show_context_menu( + cx, @@ -451,7 +451,7 @@ } }, // https://w3c.github.io/pointerevents/#dfn-handle-native-mouse-up -@@ -1179,8 +1527,29 @@ +@@ -1185,8 +1533,29 @@ cx: &mut js::context::JSContext, target: &EventTarget, hit_test_result: &HitTestResult, @@ -461,7 +461,7 @@ + // Get pointer-specific values based on the source + let (button, pressed_buttons, pointer_id, pointer_type, modifiers) = match source { + ContextMenuSource::Mouse(input_event) => ( -+ 2i16, // right mouse button ++ MouseButton::Secondary, + input_event.pressed_mouse_buttons, + PointerId::Mouse as i32, + DOMString::from("mouse"), @@ -470,9 +470,9 @@ + ContextMenuSource::Touch(touch_id) => { + let TouchId(id) = touch_id; + ( -+ 0i16, // no mouse button for touch -+ 0, // no pressed mouse buttons -+ id, // use touch identifier as pointer_id ++ MouseButton::None, ++ MouseButtons::empty(), ++ id, // use touch identifier as pointer_id + DOMString::from("touch"), + Modifiers::empty(), + ) @@ -482,12 +482,12 @@ // let menu_event = PointerEvent::new( cx, -@@ -1195,25 +1564,25 @@ +@@ -1201,25 +1570,25 @@ hit_test_result .point_relative_to_initial_containing_block .to_i32(), - input_event.active_keyboard_modifiers, -- 2i16, // button, right mouse button +- MouseButton::Secondary, - input_event.pressed_mouse_buttons, - None, // related_target - None, // point_in_target @@ -527,7 +527,7 @@ ); menu_event.upcast::().set_composed(true); -@@ -1229,6 +1598,91 @@ +@@ -1235,6 +1604,91 @@ }; } @@ -619,7 +619,7 @@ fn handle_touch_event( &self, cx: &mut JSContext, -@@ -1236,6 +1690,30 @@ +@@ -1242,6 +1696,30 @@ input_event: &ConstellationInputEvent, ) -> InputEventResult { let flags = HitTestFlags::empty(); @@ -650,7 +650,7 @@ // Ignore all incoming events without a hit test. let Some(hit_test_result) = self.window.hit_test_from_input_event(flags, input_event) else { -@@ -1243,6 +1721,19 @@ +@@ -1249,6 +1727,19 @@ return Default::default(); }; @@ -670,7 +670,7 @@ let TouchId(identifier) = event.touch_id; let Some(element) = hit_test_result -@@ -1414,6 +1905,10 @@ +@@ -1420,6 +1911,10 @@ .safe_borrow_mut(cx.no_gc()) .push(Dom::from_ref(&*pointer_touch)); self.set_active_element(&element); @@ -681,7 +681,7 @@ (current_target, pointer_touch) }, _ => { -@@ -1448,15 +1943,47 @@ +@@ -1454,15 +1949,47 @@ ); let mut active_touch_points = self.active_touch_points.safe_borrow_mut(cx.no_gc()); @@ -730,7 +730,7 @@ }, TouchEventType::Down => unreachable!("Should have been handled above"), } -@@ -1504,6 +2031,19 @@ +@@ -1510,6 +2037,19 @@ ); let event = touch_event.upcast::(); event.fire(cx, &touch_dispatch_target); @@ -750,7 +750,7 @@ event.flags().into() } -@@ -1640,6 +2180,16 @@ +@@ -1646,6 +2186,16 @@ return Default::default(); }; @@ -767,7 +767,7 @@ let Some(el) = hit_test_result .node .inclusive_ancestors(ShadowIncluding::Yes) -@@ -2204,6 +2754,26 @@ +@@ -2210,6 +2760,26 @@ return; } diff --git a/patches/components/script/dom/html/documentmetadata/htmlmetaelement.rs.patch b/patches/components/script/dom/html/documentmetadata/htmlmetaelement.rs.patch index 4a34405..84e1293 100644 --- a/patches/components/script/dom/html/documentmetadata/htmlmetaelement.rs.patch +++ b/patches/components/script/dom/html/documentmetadata/htmlmetaelement.rs.patch @@ -1,7 +1,7 @@ --- original +++ modified -@@ -72,6 +72,9 @@ - if name == "viewport" { +@@ -71,6 +71,9 @@ + if name.eq_ignore_ascii_case("viewport") { self.parse_and_send_viewport_if_necessary(cx); } + if name == "theme-color" { @@ -10,7 +10,7 @@ // https://html.spec.whatwg.org/multipage/#attr-meta-http-equiv } else if !self.HttpEquiv().is_empty() { // TODO: Implement additional http-equiv candidates -@@ -95,6 +98,22 @@ +@@ -96,6 +99,22 @@ } } diff --git a/patches/components/script/dom/mod.rs.patch b/patches/components/script/dom/mod.rs.patch index de20119..c9e1af1 100644 --- a/patches/components/script/dom/mod.rs.patch +++ b/patches/components/script/dom/mod.rs.patch @@ -16,18 +16,19 @@ mod canvas; pub(crate) use self::canvas::*; pub(crate) mod characterdata; -@@ -229,8 +231,10 @@ +@@ -229,9 +231,11 @@ pub(crate) mod clipboard; pub(crate) use self::clipboard::*; pub(crate) mod console; +pub(crate) mod contentblocker; pub(crate) mod cookiestore; + pub(crate) mod cookiestoremanager; pub(crate) mod credentialmanagement; +pub(crate) mod dbus; pub(crate) use self::credentialmanagement::*; pub(crate) mod css; pub(crate) use self::css::*; -@@ -253,6 +257,7 @@ +@@ -254,6 +258,7 @@ pub(crate) mod elementinternals; pub(crate) mod encoding; pub(crate) use self::encoding::*; @@ -35,7 +36,7 @@ pub(crate) mod event; pub(crate) use self::event::*; pub(crate) mod eventsource; -@@ -278,10 +283,12 @@ +@@ -279,10 +284,12 @@ pub(crate) use self::globalscope::*; pub(crate) mod html; pub(crate) use self::html::*; @@ -48,7 +49,7 @@ pub(crate) mod media; pub(crate) use self::media::*; pub(crate) mod mimetype; -@@ -292,10 +299,15 @@ +@@ -293,10 +300,15 @@ pub(crate) use self::navigator::*; pub(crate) mod node; pub(crate) use self::node::*; diff --git a/patches/components/script/dom/window/window.rs.patch b/patches/components/script/dom/window/window.rs.patch index 7aaf5af..354b18e 100644 --- a/patches/components/script/dom/window/window.rs.patch +++ b/patches/components/script/dom/window/window.rs.patch @@ -30,7 +30,7 @@ use malloc_size_of::MallocSizeOf; use media::WindowGLContext; use net_traits::image_cache::{ -@@ -163,8 +166,10 @@ +@@ -162,8 +165,10 @@ use crate::dom::history::History; use crate::dom::html::htmlcollection::{CollectionFilter, HTMLCollection}; use crate::dom::html::htmliframeelement::HTMLIFrameElement; @@ -115,7 +115,7 @@ // Step 6: Let userPromptHandler be WebDriver BiDi user prompt opened with this, // "prompt", and message. // TODO: Add support for WebDriver BiDi. -@@ -1805,6 +1838,27 @@ +@@ -1800,6 +1833,27 @@ // https://html.spec.whatwg.org/multipage/#windoweventhandlers window_event_handlers!(); @@ -143,7 +143,7 @@ /// fn Screen(&self, cx: &mut JSContext) -> DomRoot { self.screen.or_init(|| Screen::new(cx, self)) -@@ -2736,6 +2790,10 @@ +@@ -2731,6 +2785,10 @@ accessibility_damage = Some(accessibility_data.drain_pending_accessibility_damage()); } @@ -154,7 +154,7 @@ // Send new document and relevant styles to layout. let reflow = ReflowRequest { document: document.upcast::().to_trusted_node_address(), -@@ -3246,10 +3304,33 @@ +@@ -3241,10 +3299,33 @@ flags: HitTestFlags, input_event: &ConstellationInputEvent, ) -> Option { @@ -192,7 +192,7 @@ } #[expect(unsafe_code)] -@@ -3270,8 +3351,42 @@ +@@ -3265,8 +3346,42 @@ let address = UntrustedNodeAddress(node.0 as *const c_void); unsafe { from_untrusted_node_address(address) } }; @@ -236,7 +236,7 @@ dom_position_for_selection: result .dom_position_for_selection .map(|(node, offset)| (from_opaque_node(node), offset)), -@@ -3651,17 +3766,19 @@ +@@ -3646,17 +3761,19 @@ } pub(crate) fn send_to_embedder(&self, msg: EmbedderMsg) { @@ -262,7 +262,7 @@ } #[cfg(feature = "webxr")] -@@ -3895,6 +4012,8 @@ +@@ -3890,6 +4007,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 { -@@ -3918,6 +4037,8 @@ +@@ -3913,6 +4032,8 @@ gpu_id_hub, inherited_secure_context, unminify_js, @@ -280,7 +280,7 @@ ), caches: Default::default(), ongoing_navigation: Default::default(), -@@ -4188,3 +4309,114 @@ +@@ -4184,3 +4305,114 @@ Window::origin(self) } } diff --git a/patches/components/script/dom/workers/workerglobalscope.rs.patch b/patches/components/script/dom/workers/workerglobalscope.rs.patch index d86b098..3f9aaaa 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 -@@ -420,6 +420,8 @@ +@@ -422,6 +422,8 @@ gpu_id_hub, init.inherited_secure_context, init.unminify_js, diff --git a/patches/components/script/event_loop/script_thread.rs.patch b/patches/components/script/event_loop/script_thread.rs.patch index 606d2f9..78bfc4f 100644 --- a/patches/components/script/event_loop/script_thread.rs.patch +++ b/patches/components/script/event_loop/script_thread.rs.patch @@ -19,25 +19,26 @@ }; use servo_base::threadboost::{BoostAffinity, ThreadPriority}; use servo_base::{Epoch, generic_channel}; -@@ -90,12 +91,13 @@ +@@ -90,12 +91,14 @@ #[cfg(feature = "webgl")] use servo_canvas_traits::webgl::WebGLPipeline; use servo_config::opts::{self, DiagnosticsLoggingOption}; +use servo_config::pref_util::PrefValue; use servo_config::{pref, prefs}; use servo_constellation_traits::{ -- LoadData, LoadOrigin, NavigationHistoryBehavior, RemoteFocusOperation, +- HistoryTraversalSource, LoadData, LoadOrigin, NavigationHistoryBehavior, RemoteFocusOperation, - ScreenshotReadinessResponse, ScriptToConstellationChan, ScriptToConstellationMessage, -- ScrollStateUpdate, StructuredSerializedData, TargetSnapshotParams, TraversalDirection, -- WindowSizeType, -+ EmbeddedWebViewEventType, LoadData, LoadOrigin, NavigationHistoryBehavior, PairingEvent, -+ RemoteFocusOperation, ScreenshotReadinessResponse, ScriptToConstellationChan, -+ ScriptToConstellationMessage, ScrollStateUpdate, StructuredSerializedData, -+ TargetSnapshotParams, TraversalDirection, WindowSizeType, +- ScrollStateUpdate, SessionHistoryTraversalRequest, StructuredSerializedData, +- TargetSnapshotParams, TraversalDirection, WindowSizeType, ++ EmbeddedWebViewEventType, HistoryTraversalSource, LoadData, LoadOrigin, ++ NavigationHistoryBehavior, PairingEvent, RemoteFocusOperation, ScreenshotReadinessResponse, ++ ScriptToConstellationChan, ScriptToConstellationMessage, ScrollStateUpdate, ++ SessionHistoryTraversalRequest, StructuredSerializedData, TargetSnapshotParams, ++ TraversalDirection, WindowSizeType, }; use servo_url::{ImmutableOrigin, MutableOrigin, OriginSnapshot, ServoUrl}; use storage_traits::StorageThreads; -@@ -116,6 +118,8 @@ +@@ -116,6 +119,8 @@ use crate::dom::bindings::codegen::Bindings::DocumentBinding::{ DocumentMethods, DocumentReadyState, }; @@ -46,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 +138,13 @@ +@@ -134,9 +139,13 @@ Document, DocumentSource, HasBrowsingContext, IsHTMLDocument, RenderingUpdateReason, }; use crate::dom::element::Element; @@ -60,7 +61,7 @@ use crate::dom::servoparser::{ParserContext, ServoParser}; use crate::dom::types::DebuggerGlobalScope; #[cfg(feature = "webgpu")] -@@ -1262,18 +1270,22 @@ +@@ -1262,18 +1271,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. @@ -92,7 +93,7 @@ } let should_generate_frame = !painters_generating_frames.is_empty(); -@@ -1801,6 +1813,14 @@ +@@ -1801,6 +1814,14 @@ ScriptThreadMessage::GetDocumentOrigin(pipeline_id, result_sender) => { self.handle_get_document_origin(pipeline_id, result_sender); }, @@ -107,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 +1986,46 @@ +@@ -1966,11 +1987,46 @@ self.handle_refresh_cursor(pipeline_id); }, ScriptThreadMessage::PreferencesUpdated(updates) => { @@ -158,7 +159,7 @@ }, ScriptThreadMessage::ForwardKeyboardScroll(pipeline_id, scroll) => { if let Some(document) = self.documents.borrow().find_document(pipeline_id) { -@@ -2003,6 +2058,52 @@ +@@ -2003,6 +2059,52 @@ ScriptThreadMessage::TriggerGarbageCollection => unsafe { JS_GC(cx, GCReason::API); }, @@ -211,7 +212,7 @@ } } -@@ -3067,16 +3168,32 @@ +@@ -3067,16 +3169,32 @@ reason: UpdatePipelineIdReason, cx: &mut js::context::JSContext, ) { @@ -224,13 +225,15 @@ .borrow() .find_iframe(parent_pipeline_id, browsing_context_id); - let Some(frame_element) = frame_element else { +- return; + let webview = if iframe.is_none() { + self.documents + .borrow() + .find_webview(parent_pipeline_id, browsing_context_id) + } else { + None -+ }; + }; +- if !frame_element.update_pipeline_id(new_pipeline_id, reason, cx) { + let is_embedded_webview = webview.is_some(); + + let updated = if let Some(frame_element) = &iframe { @@ -240,15 +243,13 @@ + } else { return; }; -- if !frame_element.update_pipeline_id(new_pipeline_id, reason, cx) { + if !updated { - return; -- }; ++ return; + } let Some(window) = self.documents.borrow().find_window(new_pipeline_id) else { return; -@@ -3095,6 +3212,7 @@ +@@ -3095,6 +3213,7 @@ // is no need to pass along existing opener information that // will be discarded. None, @@ -256,7 +257,7 @@ ); } -@@ -3386,6 +3504,212 @@ +@@ -3386,6 +3505,212 @@ } } @@ -469,7 +470,7 @@ fn ask_constellation_for_top_level_info( &self, sender_webview_id: WebViewId, -@@ -3495,7 +3819,13 @@ +@@ -3495,7 +3820,13 @@ self.senders.pipeline_to_embedder_sender.clone(), self.senders.constellation_sender.clone(), incomplete.pipeline_id, @@ -484,7 +485,7 @@ incomplete.viewport_details, origin.clone(), final_url.clone(), -@@ -3519,6 +3849,8 @@ +@@ -3519,6 +3850,8 @@ self.gpu_id_hub.clone(), incomplete.load_data.inherited_secure_context, incomplete.embedder_theme, @@ -493,7 +494,7 @@ self.this.clone(), ); if self.senders.devtools_server_sender.is_some() { -@@ -3627,6 +3959,8 @@ +@@ -3627,6 +3960,8 @@ ); } @@ -502,7 +503,7 @@ document.set_ready_state(cx, DocumentReadyState::Loading); self.documents -@@ -3633,8 +3967,6 @@ +@@ -3633,8 +3968,6 @@ .borrow_mut() .insert(incomplete.pipeline_id, &document); @@ -511,7 +512,7 @@ // Initialize the browsing context for the window. let window_proxy = self.window_proxies.local_window_proxy( cx, -@@ -3645,6 +3977,7 @@ +@@ -3645,6 +3978,7 @@ incomplete.webview_id, incomplete.parent_info, incomplete.opener, @@ -519,7 +520,7 @@ ); if let Some(name) = incomplete.frame_name { window_proxy.set_name(DOMString::from(name)); -@@ -3822,11 +4155,11 @@ +@@ -3822,11 +4156,11 @@ target_snapshot_params: TargetSnapshotParams, cx: &mut js::context::JSContext, ) { @@ -534,7 +535,7 @@ iframe.navigate_or_reload_child_browsing_context( load_data, history_handling, -@@ -3834,7 +4167,17 @@ +@@ -3834,7 +4168,17 @@ target_snapshot_params, cx, ); @@ -552,7 +553,7 @@ } /// Turn javascript: URL into JS code to eval, according to the steps in -@@ -4383,10 +4726,88 @@ +@@ -4390,10 +4734,88 @@ document.event_handler().handle_refresh_cursor(); } @@ -641,7 +642,7 @@ fn handle_request_screenshot_readiness( &self, webview_id: WebViewId, -@@ -4427,7 +4848,7 @@ +@@ -4434,7 +4856,7 @@ pinch_zoom_infos: PinchZoomInfos, ) { let Some(window) = self.documents.borrow().find_window(pipeline_id) else { diff --git a/patches/components/script/links.rs.patch b/patches/components/script/links.rs.patch index ef68604..5a18003 100644 --- a/patches/components/script/links.rs.patch +++ b/patches/components/script/links.rs.patch @@ -29,7 +29,7 @@ } else { Self::empty() } -@@ -433,7 +439,7 @@ +@@ -435,7 +441,7 @@ let source = document.browsing_context().unwrap(); let (maybe_chosen, history_handling) = match target_attribute_value { Some(name) => { diff --git a/patches/components/script/tasks/task_manager.rs.patch b/patches/components/script/tasks/task_manager.rs.patch index 1611f3a..38f8951 100644 --- a/patches/components/script/tasks/task_manager.rs.patch +++ b/patches/components/script/tasks/task_manager.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -141,9 +141,11 @@ +@@ -142,9 +142,11 @@ task_source_functions!(self, dom_manipulation_task_source, DOMManipulation); task_source_functions!(self, file_reading_task_source, FileReading); task_source_functions!(self, font_loading_task_source, FontLoading); diff --git a/patches/components/script_bindings/codegen/Bindings.conf.patch b/patches/components/script_bindings/codegen/Bindings.conf.patch index 0276354..6f7b344 100644 --- a/patches/components/script_bindings/codegen/Bindings.conf.patch +++ b/patches/components/script_bindings/codegen/Bindings.conf.patch @@ -47,7 +47,7 @@ 'CookieStore': { 'cx': ['Set', 'Set_', 'Get', 'Get_', 'GetAll', 'GetAll_', 'Delete', 'Delete_'], }, -@@ -427,6 +460,11 @@ +@@ -431,6 +464,11 @@ 'cx': ['CheckValidity', 'GetValidity', 'GetLabels', 'ReportValidity', 'SetValidity', 'States'], }, @@ -59,7 +59,7 @@ 'Event': { 'cx': ['TimeStamp'], }, -@@ -801,6 +839,11 @@ +@@ -805,6 +843,11 @@ 'weakReferenceable': True, }, @@ -71,7 +71,7 @@ 'IDBCursor': { 'cx': ['Key', 'PrimaryKey'] }, -@@ -837,11 +880,19 @@ +@@ -841,11 +884,19 @@ 'cx': ['Abort', 'ObjectStore', 'ObjectStoreNames'], }, @@ -91,7 +91,7 @@ 'KeyframeEffect': { 'cx': ['GetKeyframes', 'SetKeyframes'] }, -@@ -917,7 +968,7 @@ +@@ -921,7 +972,7 @@ }, 'Navigator': { @@ -100,7 +100,7 @@ 'Storage', 'Plugins', 'UserActivation', 'WakeLock', 'Xr', 'MediaDevices', 'MediaSession', 'Permissions', 'GetGamepads'], }, -@@ -971,6 +1022,10 @@ +@@ -975,6 +1026,10 @@ 'cx': ['RegisterPaint'], }, @@ -111,7 +111,7 @@ 'Performance': { 'cx': ['Mark', 'Measure'], }, -@@ -1354,6 +1409,7 @@ +@@ -1358,6 +1413,7 @@ 'additionalTraits': ['crate::interfaces::WindowHelpers', 'crate::interfaces::HasOrigin'], 'realm': ['CreateImageBitmap', 'CreateImageBitmap_', 'WebdriverCallback', 'GetOpener', 'Fetch'], 'cx': [ diff --git a/patches/components/servo/webview.rs.patch b/patches/components/servo/webview.rs.patch index 8d17d2e..142f3f5 100644 --- a/patches/components/servo/webview.rs.patch +++ b/patches/components/servo/webview.rs.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -244,6 +244,18 @@ +@@ -247,6 +247,18 @@ self.delegate().request_create_new(self.clone(), request); } @@ -19,7 +19,7 @@ pub(crate) fn viewport_details(&self) -> ViewportDetails { // The division by 1 represents the page's default zoom of 100%, // and gives us the appropriate CSSPixel type for the viewport. -@@ -259,6 +271,7 @@ +@@ -262,6 +274,7 @@ size: scaled_viewport_size / Scale::new(1.0), hidpi_scale_factor: Scale::new(inner.hidpi_scale_factor.0), device_size, @@ -27,7 +27,7 @@ } } -@@ -877,6 +890,11 @@ +@@ -884,6 +897,11 @@ EmbedderControlRequest::FilePicker { .. } => { unreachable!("This message should be routed through the FileManagerThread") }, diff --git a/patches/components/shared/constellation/Cargo.toml.patch b/patches/components/shared/constellation/Cargo.toml.patch index a8ede51..c4c3130 100644 --- a/patches/components/shared/constellation/Cargo.toml.patch +++ b/patches/components/shared/constellation/Cargo.toml.patch @@ -1,6 +1,6 @@ --- original +++ modified -@@ -20,6 +20,8 @@ +@@ -21,6 +21,8 @@ [dependencies] base64 = { workspace = true } @@ -9,7 +9,7 @@ content-security-policy = { workspace = true } devtools_traits = { workspace = true } embedder_traits = { workspace = true } -@@ -38,6 +40,7 @@ +@@ -39,6 +41,7 @@ profile_traits = { workspace = true } rustc-hash = { workspace = true } serde = { workspace = true } diff --git a/patches/components/shared/constellation/from_script_message.rs.patch b/patches/components/shared/constellation/from_script_message.rs.patch index 6790400..310ecc4 100644 --- a/patches/components/shared/constellation/from_script_message.rs.patch +++ b/patches/components/shared/constellation/from_script_message.rs.patch @@ -21,17 +21,18 @@ use servo_url::{ImmutableOrigin, OriginSnapshot, ServoUrl}; use storage_traits::StorageThreads; use storage_traits::webstorage_thread::WebStorageType; -@@ -47,7 +48,8 @@ +@@ -47,8 +48,8 @@ use crate::structured_data::{BroadcastChannelMsg, StructuredSerializedData}; use crate::{ -- LogEntry, MessagePortMsg, PortMessageTask, PortTransferInfo, TraversalDirection, WindowSizeType, +- LogEntry, MessagePortMsg, PortMessageTask, PortTransferInfo, SessionHistoryTraversalRequest, +- WindowSizeType, + EmbeddedWebViewEventType, LogEntry, MessagePortMsg, PortMessageTask, PortTransferInfo, -+ TraversalDirection, WindowSizeType, ++ SessionHistoryTraversalRequest, TraversalDirection, WindowSizeType, }; pub type ScriptToConstellationSender = -@@ -462,11 +464,14 @@ +@@ -463,11 +464,14 @@ pub opener_webview_id: WebViewId, /// The pipeline opener browsing context. pub opener_pipeline_id: PipelineId, @@ -48,7 +49,7 @@ #[derive(Debug, Deserialize, Serialize)] pub struct AuxiliaryWebViewCreationResponse { /// The new webview ID. -@@ -477,6 +482,38 @@ +@@ -478,6 +482,38 @@ pub user_content_manager_id: Option, } @@ -87,7 +88,7 @@ /// Specifies the information required to load an iframe. #[derive(Debug, Deserialize, Serialize)] pub struct IFrameLoadInfo { -@@ -618,8 +655,143 @@ +@@ -619,6 +655,141 @@ pub enum ConstellationInterest { /// Interest in `storage` events (fired when another same-origin pipeline modifies storage). StorageEvent, @@ -128,8 +129,8 @@ + SearchUrl(String, bool), + /// Run a read-only SQL query over the local store: (sql, text params). + QueryStore(String, Vec), - } - ++} ++ +/// Data returned by com.atproto.server.createSession xrpc calls. +#[derive(Clone, Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] @@ -226,12 +227,10 @@ + /// string (parsed back into a JS value in the DOM layer). + QueryResult(String), + Error, -+} -+ + } + /// Messages from the script to the constellation. - #[derive(Deserialize, IntoStaticStr, Serialize)] - pub enum ScriptToConstellationMessage { -@@ -665,6 +837,10 @@ +@@ -666,6 +837,10 @@ NewBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), /// A global stopped managing broadcast channels for a given channel-name. RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), @@ -242,7 +241,7 @@ /// Broadcast a message to all same-origin broadcast channels, /// excluding the source of the broadcast. ScheduleBroadcast(BroadcastChannelRouterId, BroadcastChannelMsg), -@@ -683,6 +859,9 @@ +@@ -684,6 +859,9 @@ Option, Option, ), @@ -252,7 +251,7 @@ /// Indicates whether this pipeline is currently running animations. ChangeRunningAnimationsState(AnimationState), /// Register a dedicated worker that can receive animation frame ticks. -@@ -776,6 +955,10 @@ +@@ -777,6 +955,10 @@ ScriptNewIFrame(IFrameLoadInfoWithData), /// Script has opened a new auxiliary browsing context. CreateAuxiliaryWebView(AuxiliaryWebViewCreationRequest), @@ -263,7 +262,7 @@ /// Mark a new document as active ActivateDocument, /// Set the document state for a pipeline (used by screenshot / reftests) -@@ -831,6 +1014,209 @@ +@@ -832,6 +1014,209 @@ /// aggregate lock count and notify the provider only when the count transitions from N to 0. /// ReleaseWakeLock(WakeLockType), diff --git a/patches/components/shared/embedder/input_events.rs.patch b/patches/components/shared/embedder/input_events.rs.patch index a715044..72f1e47 100644 --- a/patches/components/shared/embedder/input_events.rs.patch +++ b/patches/components/shared/embedder/input_events.rs.patch @@ -98,7 +98,7 @@ } /// The types of mouse buttons. -@@ -240,7 +301,7 @@ +@@ -246,7 +307,7 @@ } /// The type of input represented by a multi-touch event. diff --git a/patches/components/shared/embedder/lib.rs.patch b/patches/components/shared/embedder/lib.rs.patch index e2bc0fa..830f691 100644 --- a/patches/components/shared/embedder/lib.rs.patch +++ b/patches/components/shared/embedder/lib.rs.patch @@ -64,15 +64,6 @@ } impl ViewportDetails { -@@ -362,7 +395,7 @@ - } - - /// An opaque identifier for a single history traversal operation. --#[derive(Clone, Deserialize, Eq, Hash, PartialEq, Serialize)] -+#[derive(Clone, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)] - pub struct TraversalId(String); - - impl TraversalId { @@ -372,6 +405,12 @@ } } diff --git a/patches/components/shared/net/lib.rs.patch b/patches/components/shared/net/lib.rs.patch index b6c3a37..764b0be 100644 --- a/patches/components/shared/net/lib.rs.patch +++ b/patches/components/shared/net/lib.rs.patch @@ -26,7 +26,7 @@ } /// A loading context, for context-specific sniffing, as defined in -@@ -700,6 +705,58 @@ +@@ -712,6 +717,58 @@ Prefetch, } @@ -85,7 +85,7 @@ #[derive(Debug, Deserialize, Serialize)] pub enum CoreResourceMsg { Fetch(RequestBuilder, FetchChannels), -@@ -788,6 +845,13 @@ +@@ -800,6 +857,13 @@ CollectMemoryReport(ReportsChan), RevokeTokenForFile(BlobTokenRevocationRequest), RefreshTokenForFile(BlobTokenRefreshRequest), @@ -99,7 +99,7 @@ } #[derive(Debug, Deserialize, MallocSizeOf, Serialize)] -@@ -908,7 +972,8 @@ +@@ -920,7 +984,8 @@ ), }; diff --git a/patches/components/shared/script/lib.rs.patch b/patches/components/shared/script/lib.rs.patch index 57bdb19..49e160f 100644 --- a/patches/components/shared/script/lib.rs.patch +++ b/patches/components/shared/script/lib.rs.patch @@ -1,15 +1,16 @@ --- original +++ modified -@@ -17,7 +17,7 @@ +@@ -18,7 +18,8 @@ use embedder_traits::{ EmbedderControlId, EmbedderControlResponse, FocusSequenceNumber, InputEventAndId, - JavaScriptEvaluationId, MediaSessionActionType, PaintHitTestResult, ScriptToEmbedderChan, -- Theme, ViewportDetails, WebDriverScriptCommand, -+ ServoErrorType, SurroundingText, Theme, ViewportDetails, WebDriverScriptCommand, + JavaScriptEvaluationId, MediaSessionActionType, MouseButton, PaintHitTestResult, +- ScriptToEmbedderChan, Theme, ViewportDetails, WebDriverScriptCommand, ++ ScriptToEmbedderChan, ServoErrorType, SurroundingText, Theme, ViewportDetails, ++ WebDriverScriptCommand, }; use euclid::{Scale, Size2D}; use fonts_traits::{SystemFontServiceProxySender, WebFontLoadEvent}; -@@ -44,9 +44,9 @@ +@@ -46,9 +47,9 @@ use servo_canvas_traits::webgl::WebGLPipeline; use servo_config::prefs::PrefValue; use servo_constellation_traits::{ @@ -22,7 +23,7 @@ }; use servo_url::{ImmutableOrigin, ServoUrl}; use storage_traits::StorageThreads; -@@ -85,6 +85,14 @@ +@@ -87,6 +88,14 @@ pub target_snapshot_params: TargetSnapshotParams, /// Name of this iframe, if any pub frame_name: Option, @@ -37,7 +38,7 @@ } /// When a pipeline is closed, should its browsing context be discarded too? -@@ -189,6 +197,14 @@ +@@ -191,6 +200,14 @@ /// Retrieve the origin of a document for a pipeline, in case a child needs to retrieve the /// origin of a parent in a different script thread. GetDocumentOrigin(PipelineId, GenericSender>), @@ -52,7 +53,7 @@ /// Notifies script thread of a change to one of its document's activity SetDocumentActivity(PipelineId, DocumentActivity), /// Set whether to use less resources by running timers at a heavily limited rate. -@@ -304,6 +320,15 @@ +@@ -306,6 +323,15 @@ SendImageKeysBatch(PipelineId, Vec), /// Preferences were updated in the parent process. PreferencesUpdated(Vec<(String, PrefValue)>), @@ -68,7 +69,7 @@ /// Notify the `ScriptThread` that the Servo renderer is no longer waiting on /// asynchronous image uploads for the given `Pipeline`. These are mainly used /// by canvas to perform uploads while the display list is being built. -@@ -338,6 +363,32 @@ +@@ -340,6 +366,32 @@ SetAccessibilityActive(PipelineId, bool, Epoch), /// Force a garbage collection in this script thread. TriggerGarbageCollection,