···11--- original
22+++ modified
33-@@ -38,7 +38,7 @@
33+@@ -40,7 +40,7 @@
44 PendingTouchInputEvent, TouchHandler, TouchIdMoveTracking, TouchMoveAllowed, TouchSequenceState,
55 };
66···99 pub(crate) struct ScrollEvent {
1010 /// Scroll by this offset, or to Start or End
1111 pub scroll: Scroll,
1212-@@ -73,6 +73,18 @@
1212+@@ -75,6 +75,18 @@
1313 DidNotPinchZoom,
1414 }
1515···2828 /// A renderer for a libservo `WebView`. This is essentially the [`ServoRenderer`]'s interface to a
2929 /// libservo `WebView`, but the code here cannot depend on libservo in order to prevent circular
3030 /// dependencies, which is why we store a `dyn WebViewTrait` here instead of the `WebView` itself.
3131-@@ -114,6 +126,10 @@
3131+@@ -116,6 +128,10 @@
3232 /// and initial values for zoom derived from the `viewport` meta tag in web content.
3333 viewport_description: Option<ViewportDescription>,
3434···3939 //
4040 // Data that is shared with the parent renderer.
4141 //
4242-@@ -152,6 +168,7 @@
4242+@@ -154,6 +170,7 @@
4343 hidden: false,
4444 animating: false,
4545 viewport_description: None,
···4747 embedder_to_constellation_sender,
4848 refresh_driver,
4949 webrender_document,
5050-@@ -187,6 +204,16 @@
5050+@@ -189,6 +206,16 @@
5151 new_value != old_value
5252 }
5353···6464 /// Returns the [`PipelineDetails`] for the given [`PipelineId`], creating it if needed.
6565 pub(crate) fn ensure_pipeline_details(
6666 &mut self,
6767-@@ -382,16 +409,14 @@
6767+@@ -384,16 +411,14 @@
6868 .map(|point| point.as_device_point(self.device_pixels_per_page_pixel()));
6969 let hit_test_result = match event_point {
7070 Some(point) => {
···8686 },
8787 None => None,
8888 };
8989-@@ -740,6 +765,88 @@
8989+@@ -742,6 +767,88 @@
9090 self.on_scroll_window_event(scroll, point);
9191 }
9292···175175 fn on_scroll_window_event(&mut self, scroll: Scroll, cursor: DevicePoint) {
176176 self.pending_scroll_zoom_events
177177 .push(ScrollZoomEvent::Scroll(ScrollEvent {
178178-@@ -748,18 +855,25 @@
178178+@@ -750,18 +857,25 @@
179179 }));
180180 }
181181···206206 }
207207208208 // Batch up all scroll events and changes to pinch zoom into a single change, or
209209-@@ -805,15 +919,24 @@
209209+@@ -807,15 +921,24 @@
210210 }
211211 }
212212···237237238238 let scroll_result = combined_scroll_event.and_then(|combined_event| {
239239 self.scroll_node_at_device_point(
240240-@@ -822,6 +945,21 @@
240240+@@ -824,6 +947,21 @@
241241 combined_event.scroll,
242242 )
243243 });
···259259 if let Some(ref scroll_result) = scroll_result {
260260 self.send_scroll_positions_to_layout_for_pipeline(
261261 scroll_result.hit_test_result.pipeline_id,
262262-@@ -837,7 +975,11 @@
262262+@@ -839,7 +977,11 @@
263263 self.send_pinch_zoom_infos_to_script();
264264 }
265265···272272 }
273273274274 /// Perform a hit test at the given [`DevicePoint`] and apply the [`Scroll`]
275275-@@ -844,7 +986,7 @@
275275+@@ -846,7 +988,7 @@
276276 /// scrolling to the applicable scroll node under that point. If a scroll was
277277 /// performed, returns the hit test result contains [`PipelineId`] of the node
278278 /// scrolled, the id, and the final scroll delta.
···281281 &mut self,
282282 render_api: &RenderApi,
283283 cursor: DevicePoint,
284284-@@ -872,7 +1014,10 @@
284284+@@ -874,7 +1016,10 @@
285285 // its ancestor pipelines.
286286 let mut previous_pipeline_id = None;
287287 for hit_test_result in hit_test_results {
···293293 if previous_pipeline_id.replace(hit_test_result.pipeline_id) !=
294294 Some(hit_test_result.pipeline_id)
295295 {
296296-@@ -899,7 +1044,11 @@
296296+@@ -901,7 +1046,11 @@
297297 }
298298 }
299299 }
···306306 }
307307308308 /// Scroll the viewport (root pipeline, root scroll node) of this WebView, but first
309309-@@ -1038,20 +1187,45 @@
309309+@@ -1040,20 +1189,45 @@
310310 }
311311312312 fn send_window_size_message(&self) {
···364364 }
365365366366 /// Set the `hidpi_scale_factor` for this renderer, returning `true` if the value actually changed.
367367-@@ -1115,8 +1289,21 @@
367367+@@ -1117,8 +1291,21 @@
368368 if let Some(wheel_event) = self.pending_wheel_events.remove(&id) {
369369 if !result.contains(InputEventResult::DefaultPrevented) {
370370 // A scroll delta for a wheel event is the inverse of the wheel delta.
···11--- original
22+++ modified
33-@@ -2,6 +2,7 @@
44- * License, v. 2.0. If a copy of the MPL was not distributed with this
55- * file, You can obtain one at https://mozilla.org/MPL/2.0/. */
66-77-+use constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage};
88- use dom_struct::dom_struct;
99- use embedder_traits::{EmbedderMsg, LoadStatus};
33+@@ -7,6 +7,7 @@
104 use html5ever::{LocalName, Prefix, local_name, ns};
55+ use js::context::JSContext;
66+ use js::rust::HandleObject;
77++use servo_constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage};
88+ use style::attr::AttrValue;
99+ use style::color::AbsoluteColor;
1010+1111@@ -136,6 +137,12 @@
1212 window.webview_id(),
1313 LoadStatus::HeadParsed,
···11--- original
22+++ modified
33-@@ -6,8 +6,8 @@
44- use std::rc::Rc;
55-66- use constellation_traits::{
77-- IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData, LoadOrigin,
88-- NavigationHistoryBehavior, ScriptToConstellationMessage,
99-+ EmbeddedWebViewCreationRequest, IFrameLoadInfo, IFrameLoadInfoWithData, JsEvalResult, LoadData,
1010-+ LoadOrigin, NavigationHistoryBehavior, ScriptToConstellationMessage,
1111- };
1212- use content_security_policy::sandboxing_directive::{
1313- SandboxingFlagSet, parse_a_sandboxing_directive,
1414-@@ -15,6 +15,7 @@
33+@@ -11,6 +11,7 @@
154 use dom_struct::dom_struct;
165 use embedder_traits::ViewportDetails;
176 use html5ever::{LocalName, Prefix, local_name, ns};
···198 use js::context::JSContext;
209 use js::rust::HandleObject;
2110 use net_traits::ReferrerPolicy;
2222-@@ -22,32 +23,38 @@
1111+@@ -18,37 +19,43 @@
2312 use profile_traits::ipc as ProfiledIpc;
2413 use script_bindings::script_runtime::temp_cx;
2514 use script_traits::{NewPipelineInfo, UpdatePipelineIdReason};
2615+use servo_base::generic_channel;
2716 use servo_base::id::{BrowsingContextId, PipelineId, WebViewId};
1717+ use servo_constellation_traits::{
1818+- IFrameLoadInfo, IFrameLoadInfoWithData, LoadData, LoadOrigin, NavigationHistoryBehavior,
1919+- ScriptToConstellationMessage,
2020++ EmbeddedWebViewCreationRequest, IFrameLoadInfo, IFrameLoadInfoWithData, LoadData, LoadOrigin,
2121++ NavigationHistoryBehavior, ScriptToConstellationMessage,
2222+ };
2823 use servo_url::ServoUrl;
2924+use style::Atom;
3025 use style::attr::{AttrValue, LengthOrPercentageOrAuto};
···4035 use crate::dom::bindings::error::Fallible;
4136 use crate::dom::bindings::inheritance::Castable;
4237+use crate::dom::bindings::num::Finite;
3838+ use crate::dom::bindings::refcounted::Trusted;
4339 use crate::dom::bindings::reflector::DomGlobal;
4440 use crate::dom::bindings::root::{DomRoot, LayoutDom, MutNullableDom};
4541 use crate::dom::bindings::str::{DOMString, USVString};
···5955 use crate::dom::trustedtypes::trustedhtml::TrustedHTML;
6056 use crate::dom::virtualmethods::VirtualMethods;
6157 use crate::dom::windowproxy::WindowProxy;
6262-@@ -76,6 +83,12 @@
5858+@@ -77,6 +84,12 @@
6359 SrcDoc,
6460 }
6561···7268 #[dom_struct]
7369 pub(crate) struct HTMLIFrameElement {
7470 htmlelement: HTMLElement,
7575-@@ -112,6 +125,30 @@
7171+@@ -113,6 +126,30 @@
7672 /// an empty iframe is attached. In that case, we shouldn't fire a
7773 /// subsequent asynchronous load event.
7874 already_fired_synchronous_load_event: Cell<bool>,
···10399 }
104100105101 impl HTMLIFrameElement {
106106-@@ -265,6 +302,8 @@
102102+@@ -298,6 +335,8 @@
107103 viewport_details,
108104 user_content_manager_id: None,
109105 theme: window.theme(),
···112108 };
113109114110 self.pipeline_id.set(Some(new_pipeline_id));
115115-@@ -560,6 +599,147 @@
111111+@@ -597,6 +636,147 @@
116112 );
117113 }
118114···260256 fn destroy_nested_browsing_context(&self) {
261257 self.pipeline_id.set(None);
262258 self.pending_pipeline_id.set(None);
263263-@@ -622,6 +802,13 @@
259259+@@ -659,6 +839,13 @@
264260 lazy_load_resumption_steps: Default::default(),
265261 pending_navigation: Default::default(),
266262 already_fired_synchronous_load_event: Default::default(),
···274270 }
275271 }
276272277277-@@ -657,7 +844,158 @@
273273+@@ -694,7 +881,158 @@
278274 self.webview_id.get()
279275 }
280276···433429 pub(crate) fn sandboxing_flag_set(&self) -> SandboxingFlagSet {
434430 self.sandboxing_flag_set
435431 .get()
436436-@@ -1024,6 +1362,89 @@
432432+@@ -1078,6 +1416,89 @@
437433438434 // https://html.spec.whatwg.org/multipage/#dom-iframe-longdesc
439435 make_url_setter!(SetLongDesc, "longdesc");
···523519 }
524520525521 impl VirtualMethods for HTMLIFrameElement {
526526-@@ -1080,8 +1501,36 @@
522522+@@ -1134,8 +1555,36 @@
527523 // is in a document tree and has a browsing context, which is what causes
528524 // the child browsing context to be created.
529525 if self.upcast::<Node>().is_connected_with_browsing_context() {
···562558 }
563559 },
564560 local_name!("loading") => {
565565-@@ -1146,6 +1595,23 @@
561561+@@ -1200,6 +1649,23 @@
566562567563 debug!("<iframe> running post connection steps");
568564···586582 // Step 1. Create a new child navigable for insertedNode.
587583 self.create_nested_browsing_context(cx);
588584589589-@@ -1169,11 +1635,25 @@
585585+@@ -1223,11 +1689,25 @@
590586 fn unbind_from_tree(&self, context: &UnbindContext, can_gc: CanGc) {
591587 self.super_type().unwrap().unbind_from_tree(context, can_gc);
592588
+1-1
patches/components/script/dom/keyboard.rs.patch
···66+//! The `Keyboard` interface provides virtual keyboard input injection.
77+//! This is a Servo-specific, non-standard API for privileged pages.
88+
99-+use constellation_traits::ScriptToConstellationMessage;
109+use dom_struct::dom_struct;
1110+use embedder_traits::{
1211+ ImeEvent, InputEvent, InputEventAndId, KeyboardEvent as EmbedderKeyboardEvent,
···1514+ Code, CompositionEvent, CompositionState, Key, KeyState, Location, Modifiers,
1615+};
1716+use script_bindings::cformat;
1717++use servo_constellation_traits::ScriptToConstellationMessage;
1818+
1919+use crate::dom::bindings::codegen::Bindings::KeyboardBinding::{
2020+ KeyboardMethods, ServoCompositionEventInit, ServoKeyboardEventInit,
+10-10
patches/components/script/dom/mod.rs.patch
···11--- original
22+++ modified
33-@@ -215,6 +215,7 @@
33+@@ -214,6 +214,7 @@
44+ #[expect(dead_code)]
45 pub(crate) mod abstractrange;
56 pub(crate) mod activation;
66- pub(crate) mod animationevent;
77+pub(crate) mod atproto;
88 pub(crate) mod attr;
99 pub(crate) mod audio;
1010 pub(crate) use self::audio::*;
1111-@@ -278,6 +279,7 @@
1111+@@ -272,6 +273,7 @@
1212 pub(crate) mod elementinternals;
1313 pub(crate) mod encoding;
1414 pub(crate) use self::encoding::*;
1515+pub(crate) mod embedder;
1616- pub(crate) mod errorevent;
1716 pub(crate) mod event;
1818- pub(crate) mod eventsource;
1919-@@ -309,6 +311,7 @@
2020- pub(crate) mod inputevent;
1717+ pub(crate) use self::event::*;
1818+ pub(crate) mod execcommand;
1919+@@ -295,6 +297,7 @@
2020+ pub(crate) use self::indexeddb::*;
2121 pub(crate) mod intersectionobserver;
2222 pub(crate) mod intersectionobserverentry;
2323+pub(crate) mod keyboard;
2424- pub(crate) mod keyboardevent;
2524 pub(crate) mod location;
2625 pub(crate) mod media;
2727-@@ -336,6 +339,10 @@
2828- pub(crate) mod pagetransitionevent;
2626+ pub(crate) use self::media::*;
2727+@@ -316,6 +319,10 @@
2828+ pub(crate) mod origin;
2929 pub(crate) mod paintsize;
3030 pub(crate) mod paintworkletglobalscope;
3131+pub(crate) mod pairing;
+3-5
patches/components/script/dom/navigator.rs.patch
···11--- original
22+++ modified
33-@@ -6,8 +6,10 @@
33+@@ -6,6 +6,7 @@
44 use std::cell::Cell;
55 use std::convert::TryInto;
66 use std::ops::Deref;
77+use std::rc::Rc;
88 use std::sync::LazyLock;
991010-+use constellation_traits::ScriptToConstellationMessage;
1110 use dom_struct::dom_struct;
1212- use embedder_traits::{EmbedderMsg, ProtocolHandlerUpdateRegistration, RegisterOrUnregister};
1313- use headers::HeaderMap;
1414-@@ -20,10 +22,12 @@
1111+@@ -20,10 +21,13 @@
1512 use net_traits::{FetchMetadata, NetworkError, ResourceFetchTiming};
1613 use regex::Regex;
1714 use servo_base::generic_channel;
1815+use servo_base::id::MessagePortId;
1916 use servo_config::pref;
1717++use servo_constellation_traits::ScriptToConstellationMessage;
2018 use servo_url::ServoUrl;
21192220 use crate::body::Extractable;
···11--- original
22+++ modified
33-@@ -6,6 +6,7 @@
44- use std::sync::Arc;
55- use std::time::{SystemTime, UNIX_EPOCH};
33+@@ -24,6 +24,7 @@
44+ use net_traits::{FetchMetadata, FetchResponseMsg, NetworkError, ResourceFetchTiming};
55+ use pixels::RasterImage;
66+ use rustc_hash::FxHashSet;
77++use servo_constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage};
88+ use servo_url::{ImmutableOrigin, ServoUrl};
99+ use uuid::Uuid;
61077-+use constellation_traits::{EmbeddedWebViewEventType, ScriptToConstellationMessage};
88- use dom_struct::dom_struct;
99- use embedder_traits::{
1010- EmbedderMsg, Notification as EmbedderNotification,
1111@@ -269,11 +270,22 @@
1212 if !shown {
1313 // TODO: step 6.1: Append notification to the list of notifications.
···11--- original
22+++ modified
33-@@ -13,9 +13,10 @@
33+@@ -12,9 +12,10 @@
44 use profile_traits::mem::MemoryReportResult;
55 use script_bindings::conversions::SafeToJSValConvertible;
66 use script_bindings::error::{Error, Fallible};
···1010 use script_bindings::str::USVString;
1111+use servo_config::embedder_prefs;
1212 use servo_config::prefs::{self, PrefValue, Preferences};
1313+ use servo_constellation_traits::ScriptToConstellationMessage;
13141414- use crate::dom::bindings::codegen::Bindings::ServoInternalsBinding::ServoInternalsMethods;
1515@@ -22,6 +23,7 @@
1616 use crate::dom::bindings::import::base::SafeJSContext;
1717 use crate::dom::bindings::reflector::{DomGlobal, Reflector, reflect_dom_object};
···11--- original
22+++ modified
33-@@ -19,7 +19,7 @@
33+@@ -18,7 +18,7 @@
44 };
55 use paint_api::rendering_context::RenderingContext;
66- use servo_base::generic_channel::GenericSender;
66+ use servo_base::generic_channel::{GenericSender, SendError};
77-use servo_base::id::PipelineId;
88+use servo_base::id::{BrowsingContextId, PipelineId, WebViewId};
99+ use servo_constellation_traits::EmbedderToConstellationMessage;
910 use tokio::sync::mpsc::UnboundedSender as TokioSender;
1011 use tokio::sync::oneshot::Sender;
1111- use url::Url;
1212-@@ -930,6 +930,14 @@
1212+@@ -963,6 +963,14 @@
1313 ///
1414 /// [`window.open`]: https://developer.mozilla.org/en-US/docs/Web/API/Window/open
1515 fn request_create_new(&self, _parent_webview: WebView, _: CreateNewWebViewRequest) {}
···2424 /// Content in a [`WebView`] is requesting permission to access a feature requiring
2525 /// permission from the user. The embedder should allow or deny the request, either by
2626 /// reading a cached value or querying the user for permission via the user interface.
2727-@@ -1009,6 +1017,25 @@
2727+@@ -1034,6 +1042,25 @@
2828 _tree_update: accesskit::TreeUpdate,
2929 ) {
3030 }