pub enum ConstellationControlMsg {
Show 32 variants
StopDelayingLoadEventsMode(PipelineId),
NavigationResponse(PipelineId, FetchResponseMsg),
AttachLayout(NewLayoutInfo),
Resize(PipelineId, WindowSizeData, WindowSizeType),
ResizeInactive(PipelineId, WindowSizeData),
ExitFullScreen(PipelineId),
UnloadDocument(PipelineId),
ExitPipeline(PipelineId, DiscardBrowsingContext),
ExitScriptThread,
SendEvent(PipelineId, CompositorEvent),
Viewport(PipelineId, Rect<f32, UnknownUnit>),
SetScrollState(PipelineId, Vec<(UntrustedNodeAddress, Vector2D<f32, LayoutPixel>)>),
GetTitle(PipelineId),
SetDocumentActivity(PipelineId, DocumentActivity),
ChangeFrameVisibilityStatus(PipelineId, bool),
NotifyVisibilityChange(PipelineId, BrowsingContextId, bool),
NavigateIframe(PipelineId, BrowsingContextId, LoadData, HistoryEntryReplacement),
PostMessage {
target: PipelineId,
source: PipelineId,
source_browsing_context: TopLevelBrowsingContextId,
target_origin: Option<ImmutableOrigin>,
source_origin: ImmutableOrigin,
data: StructuredSerializedData,
},
UpdatePipelineId(PipelineId, BrowsingContextId, TopLevelBrowsingContextId, PipelineId, UpdatePipelineIdReason),
UpdateHistoryState(PipelineId, Option<HistoryStateId>, ServoUrl),
RemoveHistoryStates(PipelineId, Vec<HistoryStateId>),
FocusIFrame(PipelineId, BrowsingContextId),
WebDriverScriptCommand(PipelineId, WebDriverScriptCommand),
TickAllAnimations(PipelineId, AnimationTickType),
WebFontLoaded(PipelineId),
DispatchIFrameLoadEvent {
target: BrowsingContextId,
parent: PipelineId,
child: PipelineId,
},
DispatchStorageEvent(PipelineId, StorageType, ServoUrl, Option<String>, Option<String>, Option<String>),
ReportCSSError(PipelineId, String, u32, u32, String),
Reload(PipelineId),
PaintMetric(PipelineId, ProgressiveWebMetricType, u64),
MediaSessionAction(PipelineId, MediaSessionActionType),
SetWebGPUPort(IpcReceiver<WebGPUMsg>),
}
Expand description
Messages sent from the constellation or layout to the script thread.
Variants§
StopDelayingLoadEventsMode(PipelineId)
Takes the associated window proxy out of “delaying-load-events-mode”, used if a scheduled navigated was refused by the embedder. https://html.spec.whatwg.org/multipage/#delaying-load-events-mode
Sends the final response to script thread for fetching after all redirections have been resolved
AttachLayout(NewLayoutInfo)
Gives a channel and ID to a layout thread, as well as the ID of that layout’s parent
Resize(PipelineId, WindowSizeData, WindowSizeType)
Window resized. Sends a DOM event eventually, but first we combine events.
ResizeInactive(PipelineId, WindowSizeData)
Notifies script that window has been resized but to not take immediate action.
ExitFullScreen(PipelineId)
Window switched from fullscreen mode.
UnloadDocument(PipelineId)
Notifies the script that the document associated with this pipeline should ‘unload’.
ExitPipeline(PipelineId, DiscardBrowsingContext)
Notifies the script that a pipeline should be closed.
ExitScriptThread
Notifies the script that the whole thread should be closed.
SendEvent(PipelineId, CompositorEvent)
Sends a DOM event.
Viewport(PipelineId, Rect<f32, UnknownUnit>)
Notifies script of the viewport.
SetScrollState(PipelineId, Vec<(UntrustedNodeAddress, Vector2D<f32, LayoutPixel>)>)
Notifies script of a new set of scroll offsets.
GetTitle(PipelineId)
Requests that the script thread immediately send the constellation the title of a pipeline.
SetDocumentActivity(PipelineId, DocumentActivity)
Notifies script thread of a change to one of its document’s activity
ChangeFrameVisibilityStatus(PipelineId, bool)
Notifies script thread whether frame is visible
NotifyVisibilityChange(PipelineId, BrowsingContextId, bool)
Notifies script thread that frame visibility change is complete PipelineId is for the parent, BrowsingContextId is for the nested browsing context
Notifies script thread that a url should be loaded in this iframe. PipelineId is for the parent, BrowsingContextId is for the nested browsing context
PostMessage
Fields
target: PipelineId
The target of the message.
source: PipelineId
The source of the message.
source_browsing_context: TopLevelBrowsingContextId
The top level browsing context associated with the source pipeline.
target_origin: Option<ImmutableOrigin>
The expected origin of the target.
source_origin: ImmutableOrigin
The source origin of the message. https://html.spec.whatwg.org/multipage/#dom-messageevent-origin
data: StructuredSerializedData
The data to be posted.
Post a message to a given window.
UpdatePipelineId(PipelineId, BrowsingContextId, TopLevelBrowsingContextId, PipelineId, UpdatePipelineIdReason)
Updates the current pipeline ID of a given iframe. First PipelineId is for the parent, second is the new PipelineId for the frame.
UpdateHistoryState(PipelineId, Option<HistoryStateId>, ServoUrl)
Updates the history state and url of a given pipeline.
RemoveHistoryStates(PipelineId, Vec<HistoryStateId>)
Removes inaccesible history states.
FocusIFrame(PipelineId, BrowsingContextId)
Set an iframe to be focused. Used when an element in an iframe gains focus. PipelineId is for the parent, BrowsingContextId is for the nested browsing context
WebDriverScriptCommand(PipelineId, WebDriverScriptCommand)
Passes a webdriver command to the script thread for execution
TickAllAnimations(PipelineId, AnimationTickType)
Notifies script thread that all animations are done
WebFontLoaded(PipelineId)
Notifies the script thread that a new Web font has been loaded, and thus the page should be reflowed.
DispatchIFrameLoadEvent
Fields
target: BrowsingContextId
The frame that has been marked as loaded.
parent: PipelineId
The pipeline that contains a frame loading the target pipeline.
child: PipelineId
The pipeline that has completed loading.
Cause a load
event to be dispatched at the appropriate iframe element.
DispatchStorageEvent(PipelineId, StorageType, ServoUrl, Option<String>, Option<String>, Option<String>)
Cause a storage
event to be dispatched at the appropriate window.
The strings are key, old value and new value.
ReportCSSError(PipelineId, String, u32, u32, String)
Report an error from a CSS parser for the given pipeline
Reload(PipelineId)
Reload the given page.
PaintMetric(PipelineId, ProgressiveWebMetricType, u64)
Notifies the script thread about a new recorded paint metric.
MediaSessionAction(PipelineId, MediaSessionActionType)
Notifies the media session about a user requested media session action.
SetWebGPUPort(IpcReceiver<WebGPUMsg>)
Notifies script thread that WebGPU server has started