Rewild Your Web
web
browser
dweb
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- StructuredSerializedData, WindowSizeType,
9+ EmbeddedWebViewEventType, KeyboardScroll, LoadData, NavigationHistoryBehavior,
10+ ScriptToConstellationSender, 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@@ -78,6 +78,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@@ -309,6 +317,19 @@
39 /// Update the pinch zoom details of a pipeline. Each `Window` stores a `VisualViewport` DOM
40 /// instance that gets updated according to the changes from the `Compositor``.
41 UpdatePinchZoomInfos(PipelineId, PinchZoomInfos),
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 }
56
57 impl fmt::Debug for ScriptThreadMessage {