forked from
me.webbeef.org/browser.html
Rewild Your Web
1--- original
2+++ modified
3@@ -21,8 +21,8 @@
4 use bluetooth_traits::BluetoothRequest;
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@@ -30,7 +30,7 @@
15 use embedder_traits::{
16 EmbedderControlId, EmbedderControlResponse, FocusSequenceNumber, InputEventAndId,
17 JavaScriptEvaluationId, MediaSessionActionType, PaintHitTestResult, ScriptToEmbedderChan,
18- Theme, ViewportDetails, WebDriverScriptCommand,
19+ ServoErrorType, Theme, ViewportDetails, WebDriverScriptCommand,
20 };
21 use euclid::{Scale, Size2D};
22 use fonts_traits::SystemFontServiceProxySender;
23@@ -77,6 +77,14 @@
24 pub user_content_manager_id: Option<UserContentManagerId>,
25 /// The [`Theme`] of the new layout.
26 pub theme: Theme,
27+ /// Whether this pipeline is for an embedded webview (created via `<iframe embed>`).
28+ /// Embedded webviews have `parent_info` set for rendering hierarchy, but their
29+ /// WindowProxy should have no parent (so `window.parent === window.self`).
30+ pub is_embedded_webview: bool,
31+ /// Whether this embedded webview should never receive focus (hidefocus attribute).
32+ /// When true, focus-related events are processed but focus is not transferred to
33+ /// elements in this document.
34+ pub hide_focus: bool,
35 }
36
37 /// When a pipeline is closed, should its browsing context be discarded too?
38@@ -312,6 +320,24 @@
39 SetAccessibilityActive(bool),
40 /// Force a garbage collection in this script thread.
41 TriggerGarbageCollection,
42+ /// Dispatch an event on an embedded webview's iframe element.
43+ /// This is sent from the constellation when it receives an `EmbeddedWebViewNotification`
44+ /// from an embedded webview's script thread.
45+ DispatchEmbeddedWebViewEvent {
46+ /// The browsing context ID of the iframe element containing the embedded webview.
47+ target: BrowsingContextId,
48+ /// The pipeline ID of the parent document containing the iframe.
49+ parent: PipelineId,
50+ /// The event type to dispatch.
51+ event: EmbeddedWebViewEventType,
52+ },
53+ /// Dispatch a `servoerror` event to all `navigator.embedder` instances in this script thread.
54+ DispatchServoError(ServoErrorType, String),
55+ /// Dispatch a pairing event to all `navigator.embedder.pairing` instances in this script thread.
56+ DispatchPairingEvent(constellation_traits::PairingEvent),
57+ /// Dispatch a peer stream event — a remote peer is offering a MessagePort.
58+ /// Contains (peer_id, serialized remote port_id bytes, stream_id, from_peer_id, target_url).
59+ DispatchPeerStream(String, Vec<u8>, String, String, String),
60 }
61
62 impl fmt::Debug for ScriptThreadMessage {