Rewild Your Web
18
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: update to Servo db3daa43241106a78351ead49752bb0b8601c31a

Signed-off-by: webbeef <me@webbeef.org>

webbeef 50c7c190 c4ccd7b2

+275 -272
+8 -8
Cargo.lock
··· 6747 6747 6748 6748 [[package]] 6749 6749 name = "num-conv" 6750 - version = "0.2.0" 6750 + version = "0.2.1" 6751 6751 source = "registry+https://github.com/rust-lang/crates.io-index" 6752 - checksum = "cf97ec579c3c42f953ef76dbf8d55ac91fb219dde70e49aa4a6b7d74e9919050" 6752 + checksum = "c6673768db2d862beb9b39a78fdcb1a69439615d5794a1be50caa9bc92c81967" 6753 6753 6754 6754 [[package]] 6755 6755 name = "num-derive" ··· 7696 7696 7697 7697 [[package]] 7698 7698 name = "pkarr" 7699 - version = "5.0.3" 7699 + version = "5.0.4" 7700 7700 source = "registry+https://github.com/rust-lang/crates.io-index" 7701 - checksum = "2f950360d31be432c0c9467fba5024a94f55128e7f32bc9d32db140369f24c77" 7701 + checksum = "d7bfb9143bbba379f246211eb68074d78db9cc048e4c5701f3b0e6cb1ec67ca2" 7702 7702 dependencies = [ 7703 7703 "async-compat", 7704 7704 "base32", ··· 10821 10821 10822 10822 [[package]] 10823 10823 name = "simple-dns" 10824 - version = "0.9.3" 10824 + version = "0.11.2" 10825 10825 source = "registry+https://github.com/rust-lang/crates.io-index" 10826 - checksum = "dee851d0e5e7af3721faea1843e8015e820a234f81fda3dea9247e15bac9a86a" 10826 + checksum = "df350943049174c4ae8ced56c604e28270258faec12a6a48637a7655287c9ce0" 10827 10827 dependencies = [ 10828 10828 "bitflags 2.11.0", 10829 10829 ] ··· 12301 12301 12302 12302 [[package]] 12303 12303 name = "unicode-segmentation" 12304 - version = "1.13.0" 12304 + version = "1.13.1" 12305 12305 source = "registry+https://github.com/rust-lang/crates.io-index" 12306 - checksum = "a559e63b5d8004e12f9bce88af5c6d939c58de839b7532cfe9653846cedd2a9e" 12306 + checksum = "da36089a805484bcccfffe0739803392c8298778a2d2f09febf76fac5ad9025b" 12307 12307 12308 12308 [[package]] 12309 12309 name = "unicode-vo"
+1 -1
forkme.lock
··· 1 - e095bc4cef5ed58917a9a7f257cfe354418e8ccd 1 + db3daa43241106a78351ead49752bb0b8601c31a
+1 -1
patches/components/constellation/atproto.rs.patch
··· 5 5 + 6 6 +use std::sync::Arc; 7 7 + 8 - +use constellation_traits::{AtProtoRequest, AtProtoResult}; 9 8 +use ipc_channel::ipc::channel; 10 9 +use log::{debug, error}; 11 10 +use net::async_runtime::spawn_task; ··· 13 12 +use net_traits::{AtProtoSessionState, CoreResourceMsg, CoreResourceThread}; 14 13 +use parking_lot::Mutex; 15 14 +use servo_base::generic_channel::GenericCallback; 15 + +use servo_constellation_traits::{AtProtoRequest, AtProtoResult}; 16 16 +use servo_url::ServoUrl; 17 17 +use sync_wrapper::SyncWrapper; 18 18 +
+3 -3
patches/components/constellation/broadcastchannel.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -6,7 +6,7 @@ 3 + @@ -5,7 +5,7 @@ 4 + use std::collections::HashMap; 4 5 5 - use constellation_traits::BroadcastChannelMsg; 6 6 use ipc_channel::ipc::IpcSender; 7 7 -use log::warn; 8 8 +use log::{debug, warn}; 9 9 use rustc_hash::FxHashMap; 10 10 use servo_base::id::BroadcastChannelRouterId; 11 - use servo_url::ImmutableOrigin; 11 + use servo_constellation_traits::BroadcastChannelMsg; 12 12 @@ -127,4 +127,53 @@ 13 13 ); 14 14 }
+69 -56
patches/components/constellation/constellation.rs.patch
··· 8 8 use std::rc::{Rc, Weak}; 9 9 use std::sync::Arc; 10 10 use std::thread::JoinHandle; 11 - @@ -104,6 +105,7 @@ 12 - use canvas_traits::webgl::WebGLThreads; 13 - use constellation_traits::{ 14 - AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, DocumentState, 15 - + EmbeddedWebViewCreationRequest, EmbeddedWebViewCreationResponse, EmbeddedWebViewEventType, 16 - EmbedderToConstellationMessage, IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, Job, 17 - LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, 18 - PortMessageTask, PortTransferInfo, SWManagerMsg, SWManagerSenders, ScreenshotReadinessResponse, 19 - @@ -119,12 +121,12 @@ 11 + @@ -107,12 +108,12 @@ 20 12 use embedder_traits::resources::{self, Resource}; 21 13 use embedder_traits::user_contents::{UserContentManagerId, UserContents}; 22 14 use embedder_traits::{ ··· 35 27 }; 36 28 use euclid::Size2D; 37 29 use euclid::default::Size2D as UntypedSize2D; 38 - @@ -176,6 +178,7 @@ 30 + @@ -158,12 +159,14 @@ 31 + use servo_canvas_traits::webgl::WebGLThreads; 32 + use servo_config::{opts, pref}; 33 + use servo_constellation_traits::{ 34 + - AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, DocumentState, 35 + - EmbedderToConstellationMessage, IFrameLoadInfo, IFrameLoadInfoWithData, IFrameSizeMsg, Job, 36 + - LoadData, LogEntry, MessagePortMsg, NavigationHistoryBehavior, PaintMetricEvent, 37 + - PortMessageTask, PortTransferInfo, SWManagerMsg, SWManagerSenders, ScreenshotReadinessResponse, 38 + - ScriptToConstellationMessage, ScrollStateUpdate, ServiceWorkerManagerFactory, ServiceWorkerMsg, 39 + - StructuredSerializedData, TraversalDirection, UserContentManagerAction, WindowSizeType, 40 + + AuxiliaryWebViewCreationRequest, AuxiliaryWebViewCreationResponse, BroadcastChannelMsg, 41 + + DocumentState, EmbeddedWebViewCreationRequest, EmbeddedWebViewCreationResponse, 42 + + EmbeddedWebViewEventType, EmbedderToConstellationMessage, IFrameLoadInfo, 43 + + IFrameLoadInfoWithData, IFrameSizeMsg, Job, LoadData, LogEntry, MessagePortMsg, 44 + + NavigationHistoryBehavior, PaintMetricEvent, PairingEvent, PortMessageTask, PortTransferInfo, 45 + + SWManagerMsg, SWManagerSenders, ScreenshotReadinessResponse, ScriptToConstellationMessage, 46 + + ScrollStateUpdate, ServiceWorkerManagerFactory, ServiceWorkerMsg, StructuredSerializedData, 47 + + TraversalDirection, UserContentManagerAction, WindowSizeType, 48 + }; 49 + use servo_url::{Host, ImmutableOrigin, ServoUrl}; 50 + use storage_traits::StorageThreads; 51 + @@ -176,6 +179,7 @@ 39 52 #[cfg(feature = "webgpu")] 40 53 use webgpu_traits::{WebGPU, WebGPURequest}; 41 54 ··· 43 56 use crate::broadcastchannel::BroadcastChannels; 44 57 use crate::browsingcontext::{ 45 58 AllBrowsingContextsIterator, BrowsingContext, FullyActiveBrowsingContextsIterator, 46 - @@ -183,6 +186,7 @@ 59 + @@ -183,6 +187,7 @@ 47 60 }; 48 61 use crate::constellation_webview::ConstellationWebView; 49 62 use crate::event_loop::EventLoop; ··· 51 64 use crate::pipeline::Pipeline; 52 65 use crate::process_manager::ProcessManager; 53 66 use crate::serviceworker::ServiceWorkerUnprivilegedContent; 54 - @@ -211,6 +215,9 @@ 67 + @@ -211,6 +216,9 @@ 55 68 /// While a completion failed, another global requested to complete the transfer. 56 69 /// We are still buffering messages, and awaiting the return of the buffer from the global who failed. 57 70 CompletionRequested(MessagePortRouterId, VecDeque<PortMessageTask>), ··· 61 74 } 62 75 63 76 #[derive(Debug)] 64 - @@ -507,6 +514,25 @@ 77 + @@ -507,6 +515,25 @@ 65 78 /// to the `UserContents` need to be forwared to all the `ScriptThread`s that host 66 79 /// the relevant `WebView`. 67 80 pub(crate) user_contents_for_manager_id: FxHashMap<UserContentManagerId, UserContents>, ··· 87 100 } 88 101 89 102 /// State needed to construct a constellation. 90 - @@ -562,6 +588,9 @@ 103 + @@ -562,6 +589,9 @@ 91 104 92 105 /// The async runtime. 93 106 pub async_runtime: Box<dyn AsyncRuntime>, ··· 97 110 } 98 111 99 112 /// When we are exiting a pipeline, we can either force exiting or not. A normal exit 100 - @@ -671,7 +700,7 @@ 113 + @@ -671,7 +701,7 @@ 101 114 script_to_devtools_callback: Default::default(), 102 115 #[cfg(feature = "bluetooth")] 103 116 bluetooth_ipc_sender: state.bluetooth_thread, ··· 106 119 private_resource_threads: state.private_resource_threads, 107 120 public_storage_threads: state.public_storage_threads, 108 121 private_storage_threads: state.private_storage_threads, 109 - @@ -725,6 +754,13 @@ 122 + @@ -725,6 +755,13 @@ 110 123 pending_viewport_changes: Default::default(), 111 124 screenshot_readiness_requests: Vec::new(), 112 125 user_contents_for_manager_id: Default::default(), ··· 120 133 }; 121 134 122 135 constellation.run(); 123 - @@ -750,6 +786,18 @@ 136 + @@ -750,6 +787,18 @@ 124 137 fn clean_up_finished_script_event_loops(&mut self) { 125 138 self.event_loop_join_handles 126 139 .retain(|join_handle| !join_handle.is_finished()); ··· 139 152 self.event_loops 140 153 .retain(|event_loop| event_loop.upgrade().is_some()); 141 154 } 142 - @@ -1041,6 +1089,11 @@ 155 + @@ -1041,6 +1090,11 @@ 143 156 .get(&webview_id) 144 157 .and_then(|webview| webview.user_content_manager_id); 145 158 ··· 151 164 let new_pipeline_info = NewPipelineInfo { 152 165 parent_info: parent_pipeline_id, 153 166 new_pipeline_id, 154 - @@ -1051,6 +1104,13 @@ 167 + @@ -1051,6 +1105,13 @@ 155 168 viewport_details: initial_viewport_details, 156 169 user_content_manager_id, 157 170 theme, ··· 165 178 }; 166 179 let pipeline = match Pipeline::spawn(new_pipeline_info, event_loop, self, throttled) { 167 180 Ok(pipeline) => pipeline, 168 - @@ -1217,6 +1277,7 @@ 181 + @@ -1217,6 +1278,7 @@ 169 182 BackgroundHangMonitor(HangMonitorAlert), 170 183 Embedder(EmbedderToConstellationMessage), 171 184 FromSWManager(SWManagerMsg), 172 - + PairingEvent(constellation_traits::PairingEvent), 185 + + PairingEvent(PairingEvent), 173 186 RemoveProcess(usize), 174 187 } 175 188 // Get one incoming request. 176 - @@ -1237,6 +1298,15 @@ 189 + @@ -1237,6 +1299,15 @@ 177 190 sel.recv(&self.embedder_to_constellation_receiver); 178 191 sel.recv(&self.swmanager_receiver); 179 192 ··· 189 202 self.process_manager.register(&mut sel); 190 203 191 204 let request = { 192 - @@ -1265,9 +1335,13 @@ 205 + @@ -1265,9 +1336,13 @@ 193 206 .recv(&self.swmanager_receiver) 194 207 .expect("Unexpected SW channel panic in constellation") 195 208 .map(Request::FromSWManager), ··· 204 217 let _ = oper.recv(self.process_manager.receiver_at(process_index)); 205 218 Ok(Request::RemoveProcess(process_index)) 206 219 }, 207 - @@ -1293,6 +1367,9 @@ 220 + @@ -1293,6 +1368,9 @@ 208 221 Request::FromSWManager(message) => { 209 222 self.handle_request_from_swmanager(message); 210 223 }, ··· 214 227 Request::RemoveProcess(index) => self.process_manager.remove(index), 215 228 } 216 229 } 217 - @@ -1522,11 +1599,7 @@ 230 + @@ -1522,11 +1600,7 @@ 218 231 } 219 232 }, 220 233 EmbedderToConstellationMessage::PreferencesUpdated(updates) => { ··· 227 240 let _ = event_loop.send(ScriptThreadMessage::PreferencesUpdated( 228 241 updates 229 242 .iter() 230 - @@ -1553,6 +1626,18 @@ 243 + @@ -1553,6 +1627,18 @@ 231 244 EmbedderToConstellationMessage::SetAccessibilityActive(webview_id, active) => { 232 245 self.set_accessibility_active(webview_id, active); 233 246 }, ··· 246 259 } 247 260 } 248 261 249 - @@ -1750,7 +1835,13 @@ 262 + @@ -1750,7 +1836,13 @@ 250 263 return warn!("Attempt to add channel name from an unexpected origin."); 251 264 } 252 265 self.broadcast_channels ··· 261 274 }, 262 275 ScriptToConstellationMessage::RemoveBroadcastChannelNameInRouter( 263 276 router_id, 264 - @@ -1764,7 +1855,13 @@ 277 + @@ -1764,7 +1856,13 @@ 265 278 return warn!("Attempt to remove channel name from an unexpected origin."); 266 279 } 267 280 self.broadcast_channels ··· 276 289 }, 277 290 ScriptToConstellationMessage::RemoveBroadcastChannelRouter(router_id, origin) => { 278 291 if self 279 - @@ -1776,6 +1873,12 @@ 292 + @@ -1776,6 +1874,12 @@ 280 293 self.broadcast_channels 281 294 .remove_broadcast_channel_router(router_id); 282 295 }, ··· 289 302 ScriptToConstellationMessage::ScheduleBroadcast(router_id, message) => { 290 303 if self 291 304 .check_origin_against_pipeline(&source_pipeline_id, &message.origin) 292 - @@ -1785,8 +1888,15 @@ 305 + @@ -1785,8 +1889,15 @@ 293 306 "Attempt to schedule broadcast from an origin not matching the origin of the msg." 294 307 ); 295 308 } ··· 306 319 }, 307 320 ScriptToConstellationMessage::PipelineExited => { 308 321 self.handle_pipeline_exited(source_pipeline_id); 309 - @@ -1806,6 +1916,12 @@ 322 + @@ -1806,6 +1917,12 @@ 310 323 ScriptToConstellationMessage::CreateAuxiliaryWebView(load_info) => { 311 324 self.handle_script_new_auxiliary(load_info); 312 325 }, ··· 319 332 ScriptToConstellationMessage::ChangeRunningAnimationsState(animation_state) => { 320 333 self.handle_change_running_animations_state(source_pipeline_id, animation_state) 321 334 }, 322 - @@ -1972,6 +2088,29 @@ 335 + @@ -1972,6 +2089,29 @@ 323 336 new_value, 324 337 ); 325 338 }, ··· 349 362 ScriptToConstellationMessage::MediaSessionEvent(pipeline_id, event) => { 350 363 // Unlikely at this point, but we may receive events coming from 351 364 // different media sessions, so we set the active media session based 352 - @@ -1991,7 +2130,12 @@ 365 + @@ -1991,7 +2131,12 @@ 353 366 } 354 367 self.active_media_session = Some(pipeline_id); 355 368 self.embedder_proxy ··· 363 376 }, 364 377 #[cfg(feature = "webgpu")] 365 378 ScriptToConstellationMessage::RequestAdapter(response_sender, options, ids) => self 366 - @@ -2045,7 +2189,412 @@ 379 + @@ -2045,9 +2190,412 @@ 367 380 let _ = event_loop.send(ScriptThreadMessage::TriggerGarbageCollection); 368 381 } 369 382 }, ··· 598 611 + ScriptToConstellationMessage::AtProto(request, response) => { 599 612 + self.at_proto.process_request(request, response); 600 613 + }, 601 - + } 602 - + } 603 - + 604 - + fn handle_pairing_event(&mut self, event: constellation_traits::PairingEvent) { 605 - + if let constellation_traits::PairingEvent::MessageReceived { ref from, ref data } = event { 614 + } 615 + } 616 + 617 + + fn handle_pairing_event(&mut self, event: PairingEvent) { 618 + + if let PairingEvent::MessageReceived { ref from, ref data } = event { 606 619 + debug!("P2P message received from {from}, {} bytes", data.len()); 607 620 + 608 621 + // On first message from a peer, sync our channels to them. ··· 638 651 + warn!("Failed to parse origin: {origin}"); 639 652 + return; 640 653 + }; 641 - + let msg = constellation_traits::BroadcastChannelMsg { 654 + + let msg = BroadcastChannelMsg { 642 655 + origin, 643 656 + channel_name: name.clone(), 644 - + data: constellation_traits::StructuredSerializedData { 657 + + data: StructuredSerializedData { 645 658 + serialized: serialized.clone(), 646 659 + ..Default::default() 647 660 + }, ··· 722 735 + .get(&remote_port_id) 723 736 + .and_then(|info| info.entangled_with) 724 737 + .unwrap_or(remote_port_id); 725 - + match postcard::from_bytes::<constellation_traits::PortMessageTask>( 726 - + task_data, 727 - + ) { 738 + + match postcard::from_bytes::<PortMessageTask>(task_data) { 728 739 + Ok(task) => { 729 740 + self.handle_reroute_messageport(target_port_id, task); 730 741 + }, ··· 742 753 + } 743 754 + } 744 755 + return; 745 - } 756 + + } 746 757 + 747 758 + // Handle peer disconnect: clean up remote channel state. 748 - + if let constellation_traits::PairingEvent::PeerExpired { ref id } = event { 759 + + if let PairingEvent::PeerExpired { ref id } = event { 749 760 + self.pairing.clear_remote_peer(id); 750 761 + } 751 762 + 752 763 + // When a peer connects or reconnects, sync our open broadcast channels to it. 753 - + if let constellation_traits::PairingEvent::PeerDiscovered { ref id, .. } | 754 - + constellation_traits::PairingEvent::PairingAccepted { ref id } = event 764 + + if let PairingEvent::PeerDiscovered { ref id, .. } | 765 + + PairingEvent::PairingAccepted { ref id } = event 755 766 + { 756 767 + let channels: Vec<_> = self 757 768 + .broadcast_channels ··· 773 784 + let _ = event_loop.send(ScriptThreadMessage::DispatchPairingEvent(event.clone())); 774 785 + } 775 786 + } 776 - } 777 - 787 + + } 788 + + 778 789 /// Check the origin of a message against that of the pipeline it came from. 779 - @@ -2364,6 +2913,29 @@ 790 + /// Note: this is still limited as a security check, 791 + /// see <https://github.com/servo/servo/issues/11722> 792 + @@ -2364,6 +2912,29 @@ 780 793 TransferState::TransferInProgress(queue) => queue.push_back(task), 781 794 TransferState::CompletionFailed(queue) => queue.push_back(task), 782 795 TransferState::CompletionRequested(_, queue) => queue.push_back(task), ··· 806 819 } 807 820 } 808 821 809 - @@ -3243,6 +3815,13 @@ 822 + @@ -3243,6 +3814,13 @@ 810 823 /// <https://html.spec.whatwg.org/multipage/#destroy-a-top-level-traversable> 811 824 fn handle_close_top_level_browsing_context(&mut self, webview_id: WebViewId) { 812 825 debug!("{webview_id}: Closing"); ··· 820 833 let browsing_context_id = BrowsingContextId::from(webview_id); 821 834 // Step 5. Remove traversable from the user agent's top-level traversable set. 822 835 let browsing_context = 823 - @@ -3519,8 +4098,27 @@ 836 + @@ -3519,8 +4097,27 @@ 824 837 opener_webview_id, 825 838 opener_pipeline_id, 826 839 response_sender, ··· 848 861 let Some((webview_id_sender, webview_id_receiver)) = generic_channel::channel() else { 849 862 warn!("Failed to create channel"); 850 863 let _ = response_sender.send(None); 851 - @@ -3619,6 +4217,396 @@ 864 + @@ -3619,6 +4216,396 @@ 852 865 }); 853 866 } 854 867 ··· 1245 1258 #[servo_tracing::instrument(skip_all)] 1246 1259 fn handle_refresh_cursor(&self, pipeline_id: PipelineId) { 1247 1260 let Some(pipeline) = self.pipelines.get(&pipeline_id) else { 1248 - @@ -4744,7 +5732,7 @@ 1261 + @@ -4744,7 +5731,7 @@ 1249 1262 } 1250 1263 1251 1264 #[servo_tracing::instrument(skip_all)] ··· 1254 1267 // Send a flat projection of the history to embedder. 1255 1268 // The final vector is a concatenation of the URLs of the past 1256 1269 // entries, the current entry and the future entries. 1257 - @@ -4847,9 +5835,23 @@ 1270 + @@ -4847,9 +5834,23 @@ 1258 1271 ); 1259 1272 self.embedder_proxy.send(EmbedderMsg::HistoryChanged( 1260 1273 webview_id,
+1 -1
patches/components/constellation/pairing.rs.patch
··· 14 14 +use std::sync::Arc; 15 15 + 16 16 +use beaver_p2p::{EndpointStatus, PairingManager, PeerEvent}; 17 - +use constellation_traits::{LocalPeerInfo, PairingEvent, PeerInfo, PeerStatus}; 18 17 +use iroh::EndpointId; 19 18 +use iroh::address_lookup::DiscoveryEvent; 20 19 +use log::{debug, error, info, warn}; 21 20 +use serde::{Deserialize, Serialize}; 22 21 +use servo_base::generic_channel::GenericCallback; 22 + +use servo_constellation_traits::{LocalPeerInfo, PairingEvent, PeerInfo, PeerStatus}; 23 23 +use tokio::sync::Mutex; 24 24 + 25 25 +/// Typed messages exchanged between paired P2P endpoints.
+4 -4
patches/components/net/atproto/session.rs.patch
··· 3 3 @@ -0,0 +1,156 @@ 4 4 +// SPDX-License-Identifier: AGPL-3.0-or-later 5 5 + 6 - +use constellation_traits::{ 7 - + AtProtoCurrentSession, AtProtoError, AtProtoErrorKind, AtProtoNewSession, 8 - + AtProtoRefreshSession, AtProtoResult, 9 - +}; 10 6 +use headers::{Authorization, HeaderMap, HeaderMapExt}; 11 7 +use http::Method; 12 8 +use log::error; 13 9 +use net_traits::CoreResourceThread; 14 10 +use net_traits::fetch::utils::{FetchJsonError, fetch_json}; 15 11 +use serde::Deserialize; 12 + +use servo_constellation_traits::{ 13 + + AtProtoCurrentSession, AtProtoError, AtProtoErrorKind, AtProtoNewSession, 14 + + AtProtoRefreshSession, AtProtoResult, 15 + +}; 16 16 +use servo_url::ServoUrl; 17 17 +use sync_wrapper::SyncWrapper; 18 18 +
+1 -1
patches/components/net/atproto/xrpc.rs.patch
··· 4 4 +// SPDX-License-Identifier: AGPL-3.0-or-later 5 5 + 6 6 +use async_recursion::async_recursion; 7 - +use constellation_traits::{AtProtoError, AtProtoErrorKind, AtProtoRefreshSession}; 8 7 +use headers::{Authorization, HeaderMapExt}; 9 8 +use http::header::CONTENT_TYPE; 10 9 +use http::{HeaderMap, Method}; ··· 16 15 +}; 17 16 +use net_traits::response::{Response, ResponseType}; 18 17 +use serde_json::json; 18 + +use servo_constellation_traits::{AtProtoError, AtProtoErrorKind, AtProtoRefreshSession}; 19 19 +use servo_url::ServoUrl; 20 20 + 21 21 +use crate::fetch::methods::{FetchContext, fetch};
+3 -3
patches/components/paint/paint.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -15,7 +15,8 @@ 3 + @@ -13,7 +13,8 @@ 4 4 use crossbeam_channel::Sender; 5 5 use dpi::PhysicalSize; 6 6 use embedder_traits::{ ··· 10 10 Scroll, ShutdownState, ViewportDetails, WebViewPoint, WebViewRect, 11 11 }; 12 12 use euclid::{Scale, Size2D}; 13 - @@ -32,7 +33,7 @@ 13 + @@ -30,7 +31,7 @@ 14 14 }; 15 15 use profile_traits::path; 16 16 use profile_traits::time::{self as profile_time}; 17 17 -use servo_base::generic_channel::{self, GenericSender, RoutedReceiver}; 18 18 +use servo_base::generic_channel::{self, GenericCallback, GenericSender, RoutedReceiver}; 19 19 use servo_base::id::{PainterId, PipelineId, WebViewId}; 20 + use servo_canvas_traits::webgl::{WebGLContextId, WebGLThreads}; 20 21 use servo_config::pref; 21 - use servo_geometry::DeviceIndependentPixel; 22 22 @@ -44,7 +45,7 @@ 23 23 #[cfg(feature = "webgpu")] 24 24 use webgpu::canvas_context::WebGpuExternalImageMap;
+11 -11
patches/components/paint/painter.rs.patch
··· 24 24 25 25 /// Tracks whether or not the view needs to be repainted. 26 26 pub(crate) needs_repaint: Cell<RepaintReason>, 27 - @@ -265,6 +273,7 @@ 27 + @@ -266,6 +274,7 @@ 28 28 painter_id, 29 29 embedder_to_constellation_sender, 30 30 webview_renderers: Default::default(), ··· 32 32 rendering_context, 33 33 needs_repaint: Cell::default(), 34 34 pending_frames: Default::default(), 35 - @@ -289,7 +298,12 @@ 35 + @@ -290,7 +299,12 @@ 36 36 painter 37 37 } 38 38 ··· 46 46 // The WebXR thread may make a different context current 47 47 if let Err(err) = self.rendering_context.make_current() { 48 48 warn!("Failed to make the rendering context current: {:?}", err); 49 - @@ -296,18 +310,20 @@ 49 + @@ -297,18 +311,20 @@ 50 50 } 51 51 52 52 let mut need_zoom = false; ··· 78 78 79 79 if let Some(colors) = self.web_content_animator.update(&self.webview_renderers) { 80 80 let mut transaction = Transaction::new(); 81 - @@ -320,6 +336,9 @@ 81 + @@ -321,6 +337,9 @@ 82 82 self.generate_frame(&mut transaction, RenderReasons::ANIMATED_PROPERTY); 83 83 self.send_transaction(transaction); 84 84 } ··· 88 88 } 89 89 90 90 #[track_caller] 91 - @@ -613,7 +632,16 @@ 91 + @@ -614,7 +633,16 @@ 92 92 93 93 let root_clip_id = builder.define_clip_rect(root_reference_frame, viewport_rect); 94 94 let clip_chain_id = builder.define_clip_chain(None, [root_clip_id]); ··· 105 105 if webview_renderer.hidden() { 106 106 continue; 107 107 } 108 - @@ -674,7 +702,7 @@ 108 + @@ -675,7 +703,7 @@ 109 109 /// Set the root pipeline for our WebRender scene to a display list that consists of an iframe 110 110 /// for each visible top-level browsing context, applying a transformation on the root for 111 111 /// pinch zoom, page zoom, and HiDPI scaling. ··· 114 114 let mut transaction = Transaction::new(); 115 115 self.send_root_pipeline_display_list_in_transaction(&mut transaction); 116 116 self.generate_frame(&mut transaction, RenderReasons::SCENE); 117 - @@ -740,6 +768,21 @@ 117 + @@ -741,6 +769,21 @@ 118 118 self.send_transaction(transaction); 119 119 } 120 120 ··· 136 136 pub(crate) fn toggle_webrender_debug(&mut self, option: WebRenderDebugOption) { 137 137 let Some(renderer) = self.webrender_renderer.as_mut() else { 138 138 return; 139 - @@ -810,6 +853,26 @@ 139 + @@ -811,6 +854,26 @@ 140 140 self.send_root_pipeline_display_list(); 141 141 } 142 142 ··· 163 163 pub(crate) fn set_throttled( 164 164 &mut self, 165 165 webview_id: WebViewId, 166 - @@ -1211,15 +1274,23 @@ 166 + @@ -1212,15 +1275,23 @@ 167 167 webview: Box<dyn WebViewTrait>, 168 168 viewport_details: ViewportDetails, 169 169 ) { ··· 191 191 } 192 192 193 193 pub(crate) fn remove_webview(&mut self, webview_id: WebViewId) { 194 - @@ -1357,6 +1428,38 @@ 194 + @@ -1358,6 +1429,38 @@ 195 195 self.lcp_calculator.enabled_for_webview(webview_id) 196 196 } 197 197 ··· 230 230 pub(crate) fn adjust_pinch_zoom( 231 231 &mut self, 232 232 webview_id: WebViewId, 233 - @@ -1410,7 +1513,6 @@ 233 + @@ -1411,7 +1514,6 @@ 234 234 result: InputEventResult, 235 235 ) { 236 236 let Some(webview_renderer) = self.webview_renderers.get_mut(&webview_id) else {
+16 -16
patches/components/paint/webview_renderer.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -38,7 +38,7 @@ 3 + @@ -40,7 +40,7 @@ 4 4 PendingTouchInputEvent, TouchHandler, TouchIdMoveTracking, TouchMoveAllowed, TouchSequenceState, 5 5 }; 6 6 ··· 9 9 pub(crate) struct ScrollEvent { 10 10 /// Scroll by this offset, or to Start or End 11 11 pub scroll: Scroll, 12 - @@ -73,6 +73,18 @@ 12 + @@ -75,6 +75,18 @@ 13 13 DidNotPinchZoom, 14 14 } 15 15 ··· 28 28 /// A renderer for a libservo `WebView`. This is essentially the [`ServoRenderer`]'s interface to a 29 29 /// libservo `WebView`, but the code here cannot depend on libservo in order to prevent circular 30 30 /// dependencies, which is why we store a `dyn WebViewTrait` here instead of the `WebView` itself. 31 - @@ -114,6 +126,10 @@ 31 + @@ -116,6 +128,10 @@ 32 32 /// and initial values for zoom derived from the `viewport` meta tag in web content. 33 33 viewport_description: Option<ViewportDescription>, 34 34 ··· 39 39 // 40 40 // Data that is shared with the parent renderer. 41 41 // 42 - @@ -152,6 +168,7 @@ 42 + @@ -154,6 +170,7 @@ 43 43 hidden: false, 44 44 animating: false, 45 45 viewport_description: None, ··· 47 47 embedder_to_constellation_sender, 48 48 refresh_driver, 49 49 webrender_document, 50 - @@ -187,6 +204,16 @@ 50 + @@ -189,6 +206,16 @@ 51 51 new_value != old_value 52 52 } 53 53 ··· 64 64 /// Returns the [`PipelineDetails`] for the given [`PipelineId`], creating it if needed. 65 65 pub(crate) fn ensure_pipeline_details( 66 66 &mut self, 67 - @@ -382,16 +409,14 @@ 67 + @@ -384,16 +411,14 @@ 68 68 .map(|point| point.as_device_point(self.device_pixels_per_page_pixel())); 69 69 let hit_test_result = match event_point { 70 70 Some(point) => { ··· 86 86 }, 87 87 None => None, 88 88 }; 89 - @@ -740,6 +765,88 @@ 89 + @@ -742,6 +767,88 @@ 90 90 self.on_scroll_window_event(scroll, point); 91 91 } 92 92 ··· 175 175 fn on_scroll_window_event(&mut self, scroll: Scroll, cursor: DevicePoint) { 176 176 self.pending_scroll_zoom_events 177 177 .push(ScrollZoomEvent::Scroll(ScrollEvent { 178 - @@ -748,18 +855,25 @@ 178 + @@ -750,18 +857,25 @@ 179 179 })); 180 180 } 181 181 ··· 206 206 } 207 207 208 208 // Batch up all scroll events and changes to pinch zoom into a single change, or 209 - @@ -805,15 +919,24 @@ 209 + @@ -807,15 +921,24 @@ 210 210 } 211 211 } 212 212 ··· 237 237 238 238 let scroll_result = combined_scroll_event.and_then(|combined_event| { 239 239 self.scroll_node_at_device_point( 240 - @@ -822,6 +945,21 @@ 240 + @@ -824,6 +947,21 @@ 241 241 combined_event.scroll, 242 242 ) 243 243 }); ··· 259 259 if let Some(ref scroll_result) = scroll_result { 260 260 self.send_scroll_positions_to_layout_for_pipeline( 261 261 scroll_result.hit_test_result.pipeline_id, 262 - @@ -837,7 +975,11 @@ 262 + @@ -839,7 +977,11 @@ 263 263 self.send_pinch_zoom_infos_to_script(); 264 264 } 265 265 ··· 272 272 } 273 273 274 274 /// Perform a hit test at the given [`DevicePoint`] and apply the [`Scroll`] 275 - @@ -844,7 +986,7 @@ 275 + @@ -846,7 +988,7 @@ 276 276 /// scrolling to the applicable scroll node under that point. If a scroll was 277 277 /// performed, returns the hit test result contains [`PipelineId`] of the node 278 278 /// scrolled, the id, and the final scroll delta. ··· 281 281 &mut self, 282 282 render_api: &RenderApi, 283 283 cursor: DevicePoint, 284 - @@ -872,7 +1014,10 @@ 284 + @@ -874,7 +1016,10 @@ 285 285 // its ancestor pipelines. 286 286 let mut previous_pipeline_id = None; 287 287 for hit_test_result in hit_test_results { ··· 293 293 if previous_pipeline_id.replace(hit_test_result.pipeline_id) != 294 294 Some(hit_test_result.pipeline_id) 295 295 { 296 - @@ -899,7 +1044,11 @@ 296 + @@ -901,7 +1046,11 @@ 297 297 } 298 298 } 299 299 } ··· 306 306 } 307 307 308 308 /// Scroll the viewport (root pipeline, root scroll node) of this WebView, but first 309 - @@ -1038,20 +1187,45 @@ 309 + @@ -1040,20 +1189,45 @@ 310 310 } 311 311 312 312 fn send_window_size_message(&self) { ··· 364 364 } 365 365 366 366 /// Set the `hidpi_scale_factor` for this renderer, returning `true` if the value actually changed. 367 - @@ -1115,8 +1289,21 @@ 367 + @@ -1117,8 +1291,21 @@ 368 368 if let Some(wheel_event) = self.pending_wheel_events.remove(&id) { 369 369 if !result.contains(InputEventResult::DefaultPrevented) { 370 370 // A scroll delta for a wheel event is the inverse of the wheel delta.
+1 -1
patches/components/script/dom/atproto.rs.patch
··· 5 5 + 6 6 +use std::rc::Rc; 7 7 + 8 - +use constellation_traits::{AtProtoRequest, AtProtoResult, ScriptToConstellationMessage}; 9 8 +use dom_struct::dom_struct; 10 9 +use js::jsval::UndefinedValue; 11 10 +use script_bindings::error::Error; 12 11 +use script_bindings::str::{DOMString, USVString}; 12 + +use servo_constellation_traits::{AtProtoRequest, AtProtoResult, ScriptToConstellationMessage}; 13 13 + 14 14 +use crate::dom::bindings::codegen::Bindings::AtProtoBinding::{AtProtoMethods, AtProtoSession}; 15 15 +use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
+9 -13
patches/components/script/dom/document/document.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -15,7 +15,9 @@ 4 - 5 - use bitflags::bitflags; 6 - use chrono::Local; 7 - -use constellation_traits::{NavigationHistoryBehavior, ScriptToConstellationMessage}; 8 - +use constellation_traits::{ 9 - + EmbeddedWebViewEventType, NavigationHistoryBehavior, ScriptToConstellationMessage, 10 - +}; 11 - use content_security_policy::sandboxing_directive::SandboxingFlagSet; 12 - use content_security_policy::{CspList, Policy as CspPolicy, PolicyDisposition}; 13 - use cookie::Cookie; 14 - @@ -27,6 +29,7 @@ 3 + @@ -26,6 +26,7 @@ 15 4 Image, LoadStatus, 16 5 }; 17 6 use encoding_rs::{Encoding, UTF_8}; ··· 19 8 use fonts::WebFontDocumentContext; 20 9 use html5ever::{LocalName, Namespace, QualName, local_name, ns}; 21 10 use hyper_serde::Serde; 22 - @@ -55,7 +58,7 @@ 11 + @@ -54,11 +55,13 @@ 23 12 use script_traits::{DocumentActivity, ProgressiveWebMetricType}; 24 13 use servo_arc::Arc; 25 14 use servo_base::cross_process_instant::CrossProcessInstant; ··· 28 17 use servo_base::id::WebViewId; 29 18 use servo_base::{Epoch, generic_channel}; 30 19 use servo_config::pref; 20 + -use servo_constellation_traits::{NavigationHistoryBehavior, ScriptToConstellationMessage}; 21 + +use servo_constellation_traits::{ 22 + + EmbeddedWebViewEventType, NavigationHistoryBehavior, ScriptToConstellationMessage, 23 + +}; 24 + use servo_media::{ClientContextId, ServoMedia}; 25 + use servo_url::{ImmutableOrigin, MutableOrigin, ServoUrl}; 26 + use style::attr::AttrValue; 31 27 @@ -635,6 +638,9 @@ 32 28 #[no_trace] 33 29 favicon: RefCell<Option<Image>>,
+6 -7
patches/components/script/dom/document/document_embedder_controls.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -4,11 +4,14 @@ 4 - 3 + @@ -5,9 +5,10 @@ 5 4 use std::cell::Cell; 6 5 7 - -use constellation_traits::{LoadData, NavigationHistoryBehavior}; 8 - +use constellation_traits::{ 9 - + EmbeddedWebViewEventType, LoadData, NavigationHistoryBehavior, ScriptToConstellationMessage, 10 - +}; 11 6 use embedder_traits::{ 12 7 - ContextMenuAction, ContextMenuElementInformation, ContextMenuElementInformationFlags, 13 8 - ContextMenuItem, ContextMenuRequest, EditingActionEvent, EmbedderControlId, ··· 19 14 }; 20 15 use euclid::{Point2D, Rect, Size2D}; 21 16 use js::context::JSContext; 22 - @@ -23,7 +26,7 @@ 17 + @@ -22,8 +23,10 @@ 23 18 use script_bindings::root::{Dom, DomRoot}; 24 19 use script_bindings::script_runtime::CanGc; 25 20 use servo_base::Epoch; 26 21 -use servo_base::generic_channel::GenericSend; 22 + -use servo_constellation_traits::{LoadData, NavigationHistoryBehavior}; 27 23 +use servo_base::generic_channel::{GenericSend, GenericSender}; 24 + +use servo_constellation_traits::{ 25 + + EmbeddedWebViewEventType, LoadData, NavigationHistoryBehavior, ScriptToConstellationMessage, 26 + +}; 28 27 use servo_url::ServoUrl; 29 28 use webrender_api::units::{DeviceIntRect, DevicePoint}; 30 29
+8 -8
patches/components/script/dom/document/document_event_handler.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -11,12 +11,14 @@ 4 - use std::str::FromStr; 3 + @@ -12,10 +12,10 @@ 5 4 use std::time::{Duration, Instant}; 6 5 7 - -use constellation_traits::{KeyboardScroll, ScriptToConstellationMessage}; 8 - +use constellation_traits::{ 9 - + EmbeddedWebViewEventType, KeyboardScroll, ScriptToConstellationMessage, 10 - +}; 11 6 use embedder_traits::{ 12 7 - Cursor, EditingActionEvent, EmbedderMsg, ImeEvent, InputEvent, InputEventId, InputEventOutcome, 13 8 - InputEventResult, KeyboardEvent as EmbedderKeyboardEvent, MouseButton, MouseButtonAction, ··· 20 15 }; 21 16 #[cfg(feature = "gamepad")] 22 17 use embedder_traits::{ 23 - @@ -33,7 +35,9 @@ 18 + @@ -32,7 +32,9 @@ 24 19 use script_bindings::codegen::GenericBindings::HTMLElementBinding::HTMLElementMethods; 25 20 use script_bindings::codegen::GenericBindings::HTMLLabelElementBinding::HTMLLabelElementMethods; 26 21 use script_bindings::codegen::GenericBindings::KeyboardEventBinding::KeyboardEventMethods; ··· 30 25 use script_bindings::codegen::GenericBindings::PerformanceBinding::PerformanceMethods; 31 26 use script_bindings::codegen::GenericBindings::TouchBinding::TouchMethods; 32 27 use script_bindings::codegen::GenericBindings::WindowBinding::{ScrollBehavior, WindowMethods}; 33 - @@ -46,6 +50,7 @@ 28 + @@ -45,8 +47,11 @@ 34 29 use script_bindings::str::DOMString; 35 30 use script_traits::ConstellationInputEvent; 36 31 use servo_base::generic_channel::GenericCallback; 37 32 +use servo_base::id::WebViewId; 38 33 use servo_config::pref; 34 + -use servo_constellation_traits::{KeyboardScroll, ScriptToConstellationMessage}; 35 + +use servo_constellation_traits::{ 36 + + EmbeddedWebViewEventType, KeyboardScroll, ScriptToConstellationMessage, 37 + +}; 39 38 use style::Atom; 40 39 use style_traits::CSSPixel; 40 + use webrender_api::ExternalScrollId; 41 41 @@ -57,12 +62,13 @@ 42 42 use crate::dom::bindings::root::MutNullableDom; 43 43 use crate::dom::bindings::trace::NoTrace;
+1 -1
patches/components/script/dom/embedder.rs.patch
··· 8 8 + 9 9 +use std::ptr; 10 10 + 11 - +use constellation_traits::ScriptToConstellationMessage; 12 11 +use dom_struct::dom_struct; 13 12 +use embedder_traits::{EmbedderMsg, NewOSWindowParams, ServoErrorType}; 14 13 +use js::jsapi::{JS_NewObject, JSPROP_ENUMERATE}; ··· 21 20 +use script_bindings::str::USVString; 22 21 +use servo_base::id::ScriptEventLoopId; 23 22 +use servo_config::pref_util::PrefValue; 23 + +use servo_constellation_traits::ScriptToConstellationMessage; 24 24 +use servo_url::ServoUrl; 25 25 + 26 26 +use crate::dom::bindings::codegen::Bindings::CustomEventBinding::CustomEventMethods;
+7 -7
patches/components/script/dom/html/htmlbodyelement.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -2,6 +2,7 @@ 4 - * License, v. 2.0. If a copy of the MPL was not distributed with this 5 - * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ 6 - 7 - +use constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage}; 8 - use dom_struct::dom_struct; 9 - use embedder_traits::{EmbedderMsg, LoadStatus}; 3 + @@ -7,6 +7,7 @@ 10 4 use html5ever::{LocalName, Prefix, local_name, ns}; 5 + use js::context::JSContext; 6 + use js::rust::HandleObject; 7 + +use servo_constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage}; 8 + use style::attr::AttrValue; 9 + use style::color::AbsoluteColor; 10 + 11 11 @@ -136,6 +137,12 @@ 12 12 window.webview_id(), 13 13 LoadStatus::HeadParsed,
+3 -3
patches/components/script/dom/html/htmlembeddedwebview.rs.patch
··· 9 9 + 10 10 +use std::rc::Rc; 11 11 + 12 - +use constellation_traits::{ 13 - + BlobImpl, EmbeddedWebViewEventType, ScriptToConstellationMessage, TraversalDirection, 14 - +}; 15 12 +use embedder_traits::{ 16 13 + AlertResponse, AllowOrDeny, ConfirmResponse, ContextMenuAction, 17 14 + ContextMenuElementInformationFlags, ContextMenuItem, EmbeddedWebViewScreenshotError, ··· 26 23 +use servo_base::Epoch; 27 24 +use servo_base::generic_channel::GenericSender; 28 25 +use servo_base::id::{Index, PipelineId, PipelineNamespaceId}; 26 + +use servo_constellation_traits::{ 27 + + BlobImpl, EmbeddedWebViewEventType, ScriptToConstellationMessage, TraversalDirection, 28 + +}; 29 29 +use stylo_atoms::Atom; 30 30 +use url::Url; 31 31 +
+19 -23
patches/components/script/dom/html/htmliframeelement.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -6,8 +6,8 @@ 4 - use std::rc::Rc; 5 - 6 - use constellation_traits::{ 7 - - IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, LoadOrigin, 8 - - NavigationHistoryBehavior, ScriptToConstellationMessage, 9 - + EmbeddedWebViewCreationRequest, IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, 10 - + LoadOrigin, NavigationHistoryBehavior, ScriptToConstellationMessage, 11 - }; 12 - use content_security_policy::sandboxing_directive::{ 13 - SandboxingFlagSet, parse_a_sandboxing_directive, 14 - @@ -15,6 +15,7 @@ 3 + @@ -11,6 +11,7 @@ 15 4 use dom_struct::dom_struct; 16 5 use embedder_traits::ViewportDetails; 17 6 use html5ever::{LocalName, Prefix, local_name, ns}; ··· 19 8 use js::context::JSContext; 20 9 use js::rust::HandleObject; 21 10 use net_traits::ReferrerPolicy; 22 - @@ -22,32 +23,38 @@ 11 + @@ -18,37 +19,43 @@ 23 12 use profile_traits::ipc as ProfiledIpc; 24 13 use script_bindings::script_runtime::temp_cx; 25 14 use script_traits::{NewPipelineInfo, UpdatePipelineIdReason}; 26 15 +use servo_base::generic_channel; 27 16 use servo_base::id::{BrowsingContextId, PipelineId, WebViewId}; 17 + use servo_constellation_traits::{ 18 + - IFrameLoadInfo, IFrameLoadInfoWithData, LoadData, LoadOrigin, NavigationHistoryBehavior, 19 + - ScriptToConstellationMessage, 20 + + EmbeddedWebViewCreationRequest, IFrameLoadInfo, IFrameLoadInfoWithData, LoadData, LoadOrigin, 21 + + NavigationHistoryBehavior, ScriptToConstellationMessage, 22 + }; 28 23 use servo_url::ServoUrl; 29 24 +use style::Atom; 30 25 use style::attr::{AttrValue, LengthOrPercentageOrAuto}; ··· 40 35 use crate::dom::bindings::error::Fallible; 41 36 use crate::dom::bindings::inheritance::Castable; 42 37 +use crate::dom::bindings::num::Finite; 38 + use crate::dom::bindings::refcounted::Trusted; 43 39 use crate::dom::bindings::reflector::DomGlobal; 44 40 use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom}; 45 41 use crate::dom::bindings::str::{DOMString, USVString}; ··· 59 55 use crate::dom::trustedtypes::trustedhtml::TrustedHTML; 60 56 use crate::dom::virtualmethods::VirtualMethods; 61 57 use crate::dom::windowproxy::WindowProxy; 62 - @@ -76,6 +83,12 @@ 58 + @@ -77,6 +84,12 @@ 63 59 SrcDoc, 64 60 } 65 61 ··· 72 68 #[dom_struct] 73 69 pub(crate) struct HTMLIFrameElement { 74 70 htmlelement: HTMLElement, 75 - @@ -112,6 +125,30 @@ 71 + @@ -113,6 +126,30 @@ 76 72 /// an empty iframe is attached. In that case, we shouldn't fire a 77 73 /// subsequent asynchronous load event. 78 74 already_fired_synchronous_load_event: Cell<bool>, ··· 103 99 } 104 100 105 101 impl HTMLIFrameElement { 106 - @@ -265,6 +302,8 @@ 102 + @@ -298,6 +335,8 @@ 107 103 viewport_details, 108 104 user_content_manager_id: None, 109 105 theme: window.theme(), ··· 112 108 }; 113 109 114 110 self.pipeline_id.set(Some(new_pipeline_id)); 115 - @@ -560,6 +599,147 @@ 111 + @@ -597,6 +636,147 @@ 116 112 ); 117 113 } 118 114 ··· 260 256 fn destroy_nested_browsing_context(&self) { 261 257 self.pipeline_id.set(None); 262 258 self.pending_pipeline_id.set(None); 263 - @@ -622,6 +802,13 @@ 259 + @@ -659,6 +839,13 @@ 264 260 lazy_load_resumption_steps: Default::default(), 265 261 pending_navigation: Default::default(), 266 262 already_fired_synchronous_load_event: Default::default(), ··· 274 270 } 275 271 } 276 272 277 - @@ -657,7 +844,158 @@ 273 + @@ -694,7 +881,158 @@ 278 274 self.webview_id.get() 279 275 } 280 276 ··· 433 429 pub(crate) fn sandboxing_flag_set(&self) -> SandboxingFlagSet { 434 430 self.sandboxing_flag_set 435 431 .get() 436 - @@ -1024,6 +1362,89 @@ 432 + @@ -1078,6 +1416,89 @@ 437 433 438 434 // https://html.spec.whatwg.org/multipage/#dom-iframe-longdesc 439 435 make_url_setter!(SetLongDesc, "longdesc"); ··· 523 519 } 524 520 525 521 impl VirtualMethods for HTMLIFrameElement { 526 - @@ -1080,8 +1501,36 @@ 522 + @@ -1134,8 +1555,36 @@ 527 523 // is in a document tree and has a browsing context, which is what causes 528 524 // the child browsing context to be created. 529 525 if self.upcast::<Node>().is_connected_with_browsing_context() { ··· 562 558 } 563 559 }, 564 560 local_name!("loading") => { 565 - @@ -1146,6 +1595,23 @@ 561 + @@ -1200,6 +1649,23 @@ 566 562 567 563 debug!("<iframe> running post connection steps"); 568 564 ··· 586 582 // Step 1. Create a new child navigable for insertedNode. 587 583 self.create_nested_browsing_context(cx); 588 584 589 - @@ -1169,11 +1635,25 @@ 585 + @@ -1223,11 +1689,25 @@ 590 586 fn unbind_from_tree(&self, context: &UnbindContext, can_gc: CanGc) { 591 587 self.super_type().unwrap().unbind_from_tree(context, can_gc); 592 588
+1 -1
patches/components/script/dom/keyboard.rs.patch
··· 6 6 +//! The `Keyboard` interface provides virtual keyboard input injection. 7 7 +//! This is a Servo-specific, non-standard API for privileged pages. 8 8 + 9 - +use constellation_traits::ScriptToConstellationMessage; 10 9 +use dom_struct::dom_struct; 11 10 +use embedder_traits::{ 12 11 + ImeEvent, InputEvent, InputEventAndId, KeyboardEvent as EmbedderKeyboardEvent, ··· 15 14 + Code, CompositionEvent, CompositionState, Key, KeyState, Location, Modifiers, 16 15 +}; 17 16 +use script_bindings::cformat; 17 + +use servo_constellation_traits::ScriptToConstellationMessage; 18 18 + 19 19 +use crate::dom::bindings::codegen::Bindings::KeyboardBinding::{ 20 20 + KeyboardMethods, ServoCompositionEventInit, ServoKeyboardEventInit,
+10 -10
patches/components/script/dom/mod.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -215,6 +215,7 @@ 3 + @@ -214,6 +214,7 @@ 4 + #[expect(dead_code)] 4 5 pub(crate) mod abstractrange; 5 6 pub(crate) mod activation; 6 - pub(crate) mod animationevent; 7 7 +pub(crate) mod atproto; 8 8 pub(crate) mod attr; 9 9 pub(crate) mod audio; 10 10 pub(crate) use self::audio::*; 11 - @@ -278,6 +279,7 @@ 11 + @@ -272,6 +273,7 @@ 12 12 pub(crate) mod elementinternals; 13 13 pub(crate) mod encoding; 14 14 pub(crate) use self::encoding::*; 15 15 +pub(crate) mod embedder; 16 - pub(crate) mod errorevent; 17 16 pub(crate) mod event; 18 - pub(crate) mod eventsource; 19 - @@ -309,6 +311,7 @@ 20 - pub(crate) mod inputevent; 17 + pub(crate) use self::event::*; 18 + pub(crate) mod execcommand; 19 + @@ -295,6 +297,7 @@ 20 + pub(crate) use self::indexeddb::*; 21 21 pub(crate) mod intersectionobserver; 22 22 pub(crate) mod intersectionobserverentry; 23 23 +pub(crate) mod keyboard; 24 - pub(crate) mod keyboardevent; 25 24 pub(crate) mod location; 26 25 pub(crate) mod media; 27 - @@ -336,6 +339,10 @@ 28 - pub(crate) mod pagetransitionevent; 26 + pub(crate) use self::media::*; 27 + @@ -316,6 +319,10 @@ 28 + pub(crate) mod origin; 29 29 pub(crate) mod paintsize; 30 30 pub(crate) mod paintworkletglobalscope; 31 31 +pub(crate) mod pairing;
+3 -5
patches/components/script/dom/navigator.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -6,8 +6,10 @@ 3 + @@ -6,6 +6,7 @@ 4 4 use std::cell::Cell; 5 5 use std::convert::TryInto; 6 6 use std::ops::Deref; 7 7 +use std::rc::Rc; 8 8 use std::sync::LazyLock; 9 9 10 - +use constellation_traits::ScriptToConstellationMessage; 11 10 use dom_struct::dom_struct; 12 - use embedder_traits::{EmbedderMsg, ProtocolHandlerUpdateRegistration, RegisterOrUnregister}; 13 - use headers::HeaderMap; 14 - @@ -20,10 +22,12 @@ 11 + @@ -20,10 +21,13 @@ 15 12 use net_traits::{FetchMetadata, NetworkError, ResourceFetchTiming}; 16 13 use regex::Regex; 17 14 use servo_base::generic_channel; 18 15 +use servo_base::id::MessagePortId; 19 16 use servo_config::pref; 17 + +use servo_constellation_traits::ScriptToConstellationMessage; 20 18 use servo_url::ServoUrl; 21 19 22 20 use crate::body::Extractable;
+7 -7
patches/components/script/dom/notification.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -6,6 +6,7 @@ 4 - use std::sync::Arc; 5 - use std::time::{SystemTime, UNIX_EPOCH}; 3 + @@ -24,6 +24,7 @@ 4 + use net_traits::{FetchMetadata, FetchResponseMsg, NetworkError, ResourceFetchTiming}; 5 + use pixels::RasterImage; 6 + use rustc_hash::FxHashSet; 7 + +use servo_constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage}; 8 + use servo_url::{ImmutableOrigin, ServoUrl}; 9 + use uuid::Uuid; 6 10 7 - +use constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage}; 8 - use dom_struct::dom_struct; 9 - use embedder_traits::{ 10 - EmbedderMsg, Notification as EmbedderNotification, 11 11 @@ -269,11 +270,22 @@ 12 12 if !shown { 13 13 // TODO: step 6.1: Append notification to the list of notifications.
+3 -3
patches/components/script/dom/pairing.rs.patch
··· 5 5 + 6 6 +use std::rc::Rc; 7 7 + 8 - +use constellation_traits::{ 9 - + LocalPeerInfo, PairingEvent, PeerInfo, PeerStatus, ScriptToConstellationMessage, 10 - +}; 11 8 +use dom_struct::dom_struct; 12 9 +use script_bindings::error::Error; 10 + +use servo_constellation_traits::{ 11 + + LocalPeerInfo, PairingEvent, PeerInfo, PeerStatus, ScriptToConstellationMessage, 12 + +}; 13 13 +use stylo_atoms::Atom; 14 14 + 15 15 +use crate::dom::bindings::codegen::Bindings::PairingBinding::PairingMethods;
+2 -2
patches/components/script/dom/servointernals.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -13,9 +13,10 @@ 3 + @@ -12,9 +12,10 @@ 4 4 use profile_traits::mem::MemoryReportResult; 5 5 use script_bindings::conversions::SafeToJSValConvertible; 6 6 use script_bindings::error::{Error, Fallible}; ··· 10 10 use script_bindings::str::USVString; 11 11 +use servo_config::embedder_prefs; 12 12 use servo_config::prefs::{self, PrefValue, Preferences}; 13 + use servo_constellation_traits::ScriptToConstellationMessage; 13 14 14 - use crate::dom::bindings::codegen::Bindings::ServoInternalsBinding::ServoInternalsMethods; 15 15 @@ -22,6 +23,7 @@ 16 16 use crate::dom::bindings::import::base::SafeJSContext; 17 17 use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
+3 -3
patches/components/script/dom/window.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -32,7 +32,7 @@ 3 + @@ -26,7 +26,7 @@ 4 4 use embedder_traits::{ 5 5 AlertResponse, ConfirmResponse, EmbedderMsg, JavaScriptEvaluationError, PromptResponse, 6 6 ScriptToEmbedderChan, SimpleDialogRequest, Theme, UntrustedNodeAddress, ViewportDetails, ··· 157 157 cursor: result.cursor, 158 158 point_in_node: result.point_in_target, 159 159 point_in_frame, 160 - @@ -3749,6 +3821,8 @@ 160 + @@ -3755,6 +3827,8 @@ 161 161 player_context: WindowGLContext, 162 162 #[cfg(feature = "webgpu")] gpu_id_hub: Arc<IdentityHub>, 163 163 inherited_secure_context: Option<bool>, ··· 166 166 theme: Theme, 167 167 weak_script_thread: Weak<ScriptThread>, 168 168 ) -> DomRoot<Self> { 169 - @@ -3775,6 +3849,8 @@ 169 + @@ -3781,6 +3855,8 @@ 170 170 gpu_id_hub, 171 171 inherited_secure_context, 172 172 unminify_js,
+31 -30
patches/components/script/script_thread.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -35,9 +35,9 @@ 4 - use canvas_traits::webgl::WebGLPipeline; 5 - use chrono::{DateTime, Local}; 6 - use constellation_traits::{ 7 - - JsEvalResult, LoadData, LoadOrigin, NavigationHistoryBehavior, ScreenshotReadinessResponse, 8 - - ScriptToConstellationChan, ScriptToConstellationMessage, ScrollStateUpdate, 9 - - StructuredSerializedData, TraversalDirection, WindowSizeType, 10 - + EmbeddedWebViewEventType, JsEvalResult, LoadData, LoadOrigin, NavigationHistoryBehavior, 11 - + ScreenshotReadinessResponse, ScriptToConstellationChan, ScriptToConstellationMessage, 12 - + ScrollStateUpdate, StructuredSerializedData, TraversalDirection, WindowSizeType, 13 - }; 14 - use crossbeam_channel::unbounded; 15 - use data_url::mime::Mime; 16 - @@ -49,7 +49,7 @@ 3 + @@ -43,7 +43,7 @@ 17 4 use embedder_traits::{ 18 5 EmbedderControlId, EmbedderControlResponse, EmbedderMsg, FocusSequenceNumber, 19 6 InputEventOutcome, JavaScriptEvaluationError, JavaScriptEvaluationId, MediaSessionActionType, ··· 22 9 }; 23 10 use encoding_rs::Encoding; 24 11 use fonts::{FontContext, SystemFontServiceProxy}; 25 - @@ -88,9 +88,10 @@ 12 + @@ -82,15 +82,16 @@ 26 13 use servo_base::cross_process_instant::CrossProcessInstant; 27 14 use servo_base::generic_channel; 28 15 use servo_base::id::{ ··· 31 18 + BrowsingContextId, HistoryStateId, MessagePortId, PipelineId, PipelineNamespace, 32 19 + ScriptEventLoopId, TEST_WEBVIEW_ID, WebViewId, 33 20 }; 21 + use servo_canvas_traits::webgl::WebGLPipeline; 34 22 +use servo_config::pref_util::PrefValue; 35 23 use servo_config::{opts, pref, prefs}; 24 + use servo_constellation_traits::{ 25 + - LoadData, LoadOrigin, NavigationHistoryBehavior, ScreenshotReadinessResponse, 26 + - ScriptToConstellationChan, ScriptToConstellationMessage, ScrollStateUpdate, 27 + - StructuredSerializedData, TraversalDirection, WindowSizeType, 28 + + EmbeddedWebViewEventType, LoadData, LoadOrigin, NavigationHistoryBehavior, PairingEvent, 29 + + ScreenshotReadinessResponse, ScriptToConstellationChan, ScriptToConstellationMessage, 30 + + ScrollStateUpdate, StructuredSerializedData, TraversalDirection, WindowSizeType, 31 + }; 36 32 use servo_url::{ImmutableOrigin, MutableOrigin, OriginSnapshot, ServoUrl}; 37 33 use storage_traits::StorageThreads; 38 34 @@ -114,6 +115,8 @@ ··· 51 47 +use crate::dom::event::Event; 52 48 +use crate::dom::eventtarget::EventTarget; 53 49 use crate::dom::globalscope::GlobalScope; 54 - use crate::dom::html::htmliframeelement::{HTMLIFrameElement, IframeContext}; 50 + use crate::dom::html::htmliframeelement::{HTMLIFrameElement, IframeContext, ProcessingMode}; 55 51 +use crate::dom::messageport::MessagePort; 56 52 use crate::dom::node::{Node, NodeTraits}; 57 53 +use crate::dom::peerstreamevent::PeerStreamEvent; 58 54 use crate::dom::servoparser::{ParserContext, ServoParser}; 59 55 use crate::dom::types::DebuggerGlobalScope; 60 56 #[cfg(feature = "webgpu")] 61 - @@ -1941,11 +1948,22 @@ 57 + @@ -1977,11 +1984,22 @@ 62 58 self.handle_refresh_cursor(pipeline_id); 63 59 }, 64 60 ScriptThreadMessage::PreferencesUpdated(updates) => { ··· 85 81 }, 86 82 ScriptThreadMessage::ForwardKeyboardScroll(pipeline_id, scroll) => { 87 83 if let Some(document) = self.documents.borrow().find_document(pipeline_id) { 88 - @@ -1986,6 +2004,35 @@ 84 + @@ -2022,6 +2040,35 @@ 89 85 ScriptThreadMessage::TriggerGarbageCollection => unsafe { 90 86 JS_GC(*GlobalScope::get_cx(), GCReason::API); 91 87 }, ··· 121 117 } 122 118 } 123 119 124 - @@ -3026,6 +3073,9 @@ 120 + @@ -3062,6 +3109,9 @@ 125 121 .documents 126 122 .borrow() 127 123 .find_iframe(parent_pipeline_id, browsing_context_id); ··· 131 127 if let Some(frame_element) = frame_element { 132 128 frame_element.update_pipeline_id(new_pipeline_id, reason, cx); 133 129 } 134 - @@ -3045,6 +3095,7 @@ 130 + @@ -3081,6 +3131,7 @@ 135 131 // is no need to pass along existing opener information that 136 132 // will be discarded. 137 133 None, ··· 139 135 ); 140 136 } 141 137 } 142 - @@ -3323,6 +3374,159 @@ 138 + @@ -3359,6 +3410,155 @@ 143 139 } 144 140 } 145 141 ··· 182 178 + } 183 179 + 184 180 + /// Handle a pairing event by dispatching to all navigator.embedder.pairing instances. 185 - + fn handle_dispatch_pairing_event( 186 - + &self, 187 - + event: constellation_traits::PairingEvent, 188 - + can_gc: CanGc, 189 - + ) { 181 + + fn handle_dispatch_pairing_event(&self, event: PairingEvent, can_gc: CanGc) { 190 182 + for (_, document) in self.documents.borrow().iter() { 191 183 + if let Some(embedder) = document.window().Navigator().get_embedder() { 192 184 + if let Some(pairing) = embedder.get_pairing() { ··· 299 291 fn ask_constellation_for_top_level_info( 300 292 &self, 301 293 sender_webview_id: WebViewId, 302 - @@ -3436,7 +3640,13 @@ 294 + @@ -3472,7 +3672,13 @@ 303 295 self.senders.pipeline_to_embedder_sender.clone(), 304 296 self.senders.constellation_sender.clone(), 305 297 incomplete.pipeline_id, ··· 314 306 incomplete.viewport_details, 315 307 origin.clone(), 316 308 final_url.clone(), 317 - @@ -3458,6 +3668,8 @@ 309 + @@ -3494,6 +3700,8 @@ 318 310 #[cfg(feature = "webgpu")] 319 311 self.gpu_id_hub.clone(), 320 312 incomplete.load_data.inherited_secure_context, ··· 323 315 incomplete.theme, 324 316 self.this.clone(), 325 317 ); 326 - @@ -3481,6 +3693,7 @@ 318 + @@ -3517,6 +3725,7 @@ 327 319 incomplete.webview_id, 328 320 incomplete.parent_info, 329 321 incomplete.opener, ··· 331 323 ); 332 324 if window_proxy.parent().is_some() { 333 325 // https://html.spec.whatwg.org/multipage/#navigating-across-documents:delaying-load-events-mode-2 334 - @@ -4261,6 +4474,24 @@ 326 + @@ -4324,6 +4533,24 @@ 335 327 document.event_handler().handle_refresh_cursor(); 336 328 } 337 329 ··· 356 348 pub(crate) fn is_servo_privileged(url: ServoUrl) -> bool { 357 349 with_script_thread(|script_thread| script_thread.privileged_urls.contains(&url)) 358 350 } 351 + @@ -4368,7 +4595,7 @@ 352 + can_gc: CanGc, 353 + ) { 354 + let Some(window) = self.documents.borrow().find_window(pipeline_id) else { 355 + - warn!("Visual viewport update for closed pipeline {pipeline_id}."); 356 + + debug!("Visual viewport update for closed pipeline {pipeline_id}."); 357 + return; 358 + }; 359 +
+10 -10
patches/components/servo/servo.rs.patch
··· 8 8 use std::rc::{Rc, Weak}; 9 9 use std::sync::Arc; 10 10 use std::time::Duration; 11 - @@ -63,7 +64,7 @@ 11 + @@ -49,7 +50,7 @@ 12 12 use servo_bluetooth_traits::BluetoothRequest; 13 13 use servo_config::opts::Opts; 14 14 use servo_config::prefs::{PrefValue, Preferences}; 15 15 -use servo_config::{opts, pref, prefs}; 16 16 +use servo_config::{embedder_prefs, opts, pref, prefs}; 17 - use servo_geometry::{ 18 - DeviceIndependentIntRect, convert_rect_to_css_pixel, convert_size_to_css_pixel, 19 - }; 17 + #[cfg(all( 18 + not(target_os = "windows"), 19 + not(target_os = "ios"), 20 20 @@ -229,9 +230,7 @@ 21 21 } 22 22 ··· 81 81 EmbedderMsg::WebViewClosed(webview_id) => { 82 82 if let Some(webview) = self.get_webview_handle(webview_id) { 83 83 webview.delegate().notify_closed(webview); 84 - @@ -597,10 +630,7 @@ 84 + @@ -596,10 +629,7 @@ 85 85 .delegate 86 86 .borrow() 87 87 .notify_devtools_server_started(port, token), ··· 93 93 }, 94 94 EmbedderMsg::RequestDevtoolsConnection(response_sender) => { 95 95 self.delegate 96 - @@ -725,6 +755,47 @@ 96 + @@ -724,6 +754,47 @@ 97 97 .notify_accessibility_tree_update(webview, tree_update); 98 98 } 99 99 }, ··· 141 141 } 142 142 } 143 143 } 144 - @@ -863,6 +934,7 @@ 144 + @@ -862,6 +933,7 @@ 145 145 async_runtime, 146 146 public_storage_threads.clone(), 147 147 private_storage_threads.clone(), ··· 149 149 ); 150 150 151 151 if opts::get().multiprocess { 152 - @@ -959,6 +1031,14 @@ 152 + @@ -958,6 +1030,14 @@ 153 153 self.0.site_data_manager.borrow() 154 154 } 155 155 ··· 164 164 pub(crate) fn paint<'a>(&'a self) -> Ref<'a, Paint> { 165 165 self.0.paint.borrow() 166 166 } 167 - @@ -1060,6 +1140,7 @@ 167 + @@ -1059,6 +1139,7 @@ 168 168 async_runtime: Box<dyn net_traits::AsyncRuntime>, 169 169 public_storage_threads: StorageThreads, 170 170 private_storage_threads: StorageThreads, ··· 172 172 ) { 173 173 // Global configuration options, parsed from the command line. 174 174 let opts = opts::get(); 175 - @@ -1101,6 +1182,7 @@ 175 + @@ -1100,6 +1181,7 @@ 176 176 wgpu_image_map: paint.webgpu_image_map(), 177 177 async_runtime, 178 178 privileged_urls,
+5 -5
patches/components/servo/webview_delegate.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -19,7 +19,7 @@ 3 + @@ -18,7 +18,7 @@ 4 4 }; 5 5 use paint_api::rendering_context::RenderingContext; 6 - use servo_base::generic_channel::GenericSender; 6 + use servo_base::generic_channel::{GenericSender, SendError}; 7 7 -use servo_base::id::PipelineId; 8 8 +use servo_base::id::{BrowsingContextId, PipelineId, WebViewId}; 9 + use servo_constellation_traits::EmbedderToConstellationMessage; 9 10 use tokio::sync::mpsc::UnboundedSender as TokioSender; 10 11 use tokio::sync::oneshot::Sender; 11 - use url::Url; 12 - @@ -930,6 +930,14 @@ 12 + @@ -963,6 +963,14 @@ 13 13 /// 14 14 /// [`window.open`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/open 15 15 fn request_create_new(&self, _parent_webview: WebView, _: CreateNewWebViewRequest) {} ··· 24 24 /// Content in a [`WebView`] is requesting permission to access a feature requiring 25 25 /// permission from the user. The embedder should allow or deny the request, either by 26 26 /// reading a cached value or querying the user for permission via the user interface. 27 - @@ -1009,6 +1017,25 @@ 27 + @@ -1034,6 +1042,25 @@ 28 28 _tree_update: accesskit::TreeUpdate, 29 29 ) { 30 30 }
+9 -9
patches/components/shared/constellation/from_script_message.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -11,8 +11,9 @@ 3 + @@ -10,8 +10,9 @@ 4 4 use devtools_traits::{DevtoolScriptControlMsg, ScriptToDevtoolsControlMsg, WorkerId}; 5 5 use embedder_traits::user_contents::UserContentManagerId; 6 6 use embedder_traits::{ ··· 13 13 use encoding_rs::Encoding; 14 14 use euclid::default::Size2D as UntypedSize2D; 15 15 @@ -35,6 +36,7 @@ 16 - MessagePortRouterId, PipelineId, ScriptEventLoopId, ServiceWorkerId, 17 16 ServiceWorkerRegistrationId, WebViewId, 18 17 }; 18 + use servo_canvas_traits::canvas::{CanvasId, CanvasMsg}; 19 19 +use servo_config::pref_util::PrefValue; 20 20 use servo_url::{ImmutableOrigin, OriginSnapshot, ServoUrl}; 21 21 use storage_traits::StorageThreads; ··· 30 30 }; 31 31 32 32 pub type ScriptToConstellationSender = 33 - @@ -407,11 +410,14 @@ 33 + @@ -397,11 +400,14 @@ 34 34 pub opener_webview_id: WebViewId, 35 35 /// The pipeline opener browsing context. 36 36 pub opener_pipeline_id: PipelineId, ··· 47 47 #[derive(Debug, Deserialize, Serialize)] 48 48 pub struct AuxiliaryWebViewCreationResponse { 49 49 /// The new webview ID. 50 - @@ -422,6 +428,38 @@ 50 + @@ -412,6 +418,38 @@ 51 51 pub user_content_manager_id: Option<UserContentManagerId>, 52 52 } 53 53 ··· 86 86 /// Specifies the information required to load an iframe. 87 87 #[derive(Debug, Deserialize, Serialize)] 88 88 pub struct IFrameLoadInfo { 89 - @@ -541,6 +579,90 @@ 89 + @@ -531,6 +569,90 @@ 90 90 NoLongerActive, 91 91 } 92 92 ··· 177 177 /// Messages from the script to the constellation. 178 178 #[derive(Deserialize, IntoStaticStr, Serialize)] 179 179 pub enum ScriptToConstellationMessage { 180 - @@ -585,6 +707,10 @@ 180 + @@ -575,6 +697,10 @@ 181 181 NewBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), 182 182 /// A global stopped managing broadcast channels for a given channel-name. 183 183 RemoveBroadcastChannelNameInRouter(BroadcastChannelRouterId, String, ImmutableOrigin), ··· 188 188 /// Broadcast a message to all same-origin broadcast channels, 189 189 /// excluding the source of the broadcast. 190 190 ScheduleBroadcast(BroadcastChannelRouterId, BroadcastChannelMsg), 191 - @@ -597,6 +723,9 @@ 191 + @@ -587,6 +713,9 @@ 192 192 Option<String>, 193 193 Option<String>, 194 194 ), ··· 198 198 /// Indicates whether this pipeline is currently running animations. 199 199 ChangeRunningAnimationsState(AnimationState), 200 200 /// Requests that a new 2D canvas thread be created. (This is done in the constellation because 201 - @@ -677,6 +806,10 @@ 201 + @@ -667,6 +796,10 @@ 202 202 ScriptNewIFrame(IFrameLoadInfoWithData), 203 203 /// Script has opened a new auxiliary browsing context. 204 204 CreateAuxiliaryWebView(AuxiliaryWebViewCreationRequest), ··· 209 209 /// Mark a new document as active 210 210 ActivateDocument, 211 211 /// Set the document state for a pipeline (used by screenshot / reftests) 212 - @@ -726,6 +859,79 @@ 212 + @@ -716,6 +849,79 @@ 213 213 RespondToScreenshotReadinessRequest(ScreenshotReadinessResponse), 214 214 /// Request the constellation to force garbage collection in all `ScriptThread`'s. 215 215 TriggerGarbageCollection,
+6 -6
patches/components/shared/embedder/lib.rs.patch
··· 83 83 #[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize, MallocSizeOf)] 84 84 pub enum PixelFormat { 85 85 /// Luminance channel only 86 - @@ -424,6 +463,12 @@ 87 - } 86 + @@ -430,6 +469,12 @@ 87 + pub name: String, 88 88 } 89 89 90 90 +#[derive(Deserialize, Serialize)] ··· 96 96 /// Messages towards the embedder. 97 97 #[derive(Deserialize, IntoStaticStr, Serialize)] 98 98 pub enum EmbedderMsg { 99 - @@ -449,6 +494,21 @@ 99 + @@ -455,6 +500,21 @@ 100 100 ), 101 101 /// Whether or not to allow script to open a new tab/browser 102 102 AllowOpeningWebView(WebViewId, GenericSender<Option<NewWebViewDetails>>), ··· 118 118 /// A webview was destroyed. 119 119 WebViewClosed(WebViewId), 120 120 /// A webview potentially gained focus for keyboard events. 121 - @@ -530,6 +590,24 @@ 121 + @@ -540,6 +600,24 @@ 122 122 InputEventsHandled(WebViewId, Vec<InputEventOutcome>), 123 123 /// Send the embedder an accessibility tree update. 124 124 AccessibilityTreeUpdate(WebViewId, accesskit::TreeUpdate), ··· 143 143 } 144 144 145 145 impl Debug for EmbedderMsg { 146 - @@ -1086,6 +1164,54 @@ 146 + @@ -1096,6 +1174,54 @@ 147 147 WebViewDoesNotExist, 148 148 } 149 149 ··· 198 198 #[derive(Clone, Copy, Debug, Deserialize, Serialize)] 199 199 pub struct RgbColor { 200 200 pub red: u8, 201 - @@ -1132,3 +1258,26 @@ 201 + @@ -1142,3 +1268,26 @@ 202 202 pub viewport_details: ViewportDetails, 203 203 pub user_content_manager_id: Option<UserContentManagerId>, 204 204 }
+13 -13
patches/components/shared/script/lib.rs.patch
··· 1 1 --- original 2 2 +++ modified 3 - @@ -13,8 +13,8 @@ 4 - 5 - use canvas_traits::webgl::WebGLPipeline; 6 - use constellation_traits::{ 7 - - KeyboardScroll, LoadData, NavigationHistoryBehavior, ScriptToConstellationSender, 8 - - ScrollStateUpdate, StructuredSerializedData, WindowSizeType, 9 - + EmbeddedWebViewEventType, KeyboardScroll, LoadData, NavigationHistoryBehavior, 10 - + ScriptToConstellationSender, ScrollStateUpdate, StructuredSerializedData, WindowSizeType, 11 - }; 12 - use crossbeam_channel::RecvTimeoutError; 13 - use devtools_traits::ScriptToDevtoolsControlMsg; 14 - @@ -22,7 +22,7 @@ 3 + @@ -17,7 +17,7 @@ 15 4 use embedder_traits::{ 16 5 EmbedderControlId, EmbedderControlResponse, FocusSequenceNumber, InputEventAndId, 17 6 JavaScriptEvaluationId, MediaSessionActionType, PaintHitTestResult, ScriptToEmbedderChan, ··· 20 9 }; 21 10 use euclid::{Scale, Size2D}; 22 11 use fonts_traits::SystemFontServiceProxySender; 12 + @@ -41,8 +41,8 @@ 13 + use servo_canvas_traits::webgl::WebGLPipeline; 14 + use servo_config::prefs::PrefValue; 15 + use servo_constellation_traits::{ 16 + - KeyboardScroll, LoadData, NavigationHistoryBehavior, ScriptToConstellationSender, 17 + - ScrollStateUpdate, StructuredSerializedData, WindowSizeType, 18 + + EmbeddedWebViewEventType, KeyboardScroll, LoadData, NavigationHistoryBehavior, PairingEvent, 19 + + ScriptToConstellationSender, ScrollStateUpdate, StructuredSerializedData, WindowSizeType, 20 + }; 21 + use servo_url::{ImmutableOrigin, ServoUrl}; 22 + use storage_traits::StorageThreads; 23 23 @@ -77,6 +77,14 @@ 24 24 pub user_content_manager_id: Option<UserContentManagerId>, 25 25 /// The [`Theme`] of the new layout. ··· 53 53 + /// Dispatch a `servoerror` event to all `navigator.embedder` instances in this script thread. 54 54 + DispatchServoError(ServoErrorType, String), 55 55 + /// Dispatch a pairing event to all `navigator.embedder.pairing` instances in this script thread. 56 - + DispatchPairingEvent(constellation_traits::PairingEvent), 56 + + DispatchPairingEvent(PairingEvent), 57 57 + /// Dispatch a peer stream event — a remote peer is offering a MessagePort. 58 58 + /// Contains (peer_id, serialized remote port_id bytes, stream_id, from_peer_id, target_url). 59 59 + DispatchPeerStream(String, Vec<u8>, String, String, String),