pub enum ConstellationControlMsg {
Show 33 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>),
GetTitle(PipelineId),
SetDocumentActivity(PipelineId, DocumentActivity),
SetThrottled(PipelineId, bool),
SetThrottledInContainingIframe(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, bool),
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, CrossProcessInstant),
MediaSessionAction(PipelineId, MediaSessionActionType),
SetWebGPUPort(IpcReceiver<WebGPUMsg>),
SetScrollStates(PipelineId, Vec<ScrollState>),
SetEpochPaintTime(PipelineId, Epoch, CrossProcessInstant),
}
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, 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.
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
SetThrottled(PipelineId, bool)
Set whether to use less resources by running timers at a heavily limited rate.
SetThrottledInContainingIframe(PipelineId, BrowsingContextId, bool)
Notify the containing iframe (in PipelineId) that the nested browsing context (BrowsingContextId) is throttled.
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
Post a message to a given window.
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.
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, bool)
Notifies the script thread that a new Web font has been loaded, and thus the page should be reflowed.
DispatchIFrameLoadEvent
Cause a load
event to be dispatched at the appropriate iframe element.
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.
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, CrossProcessInstant)
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
SetScrollStates(PipelineId, Vec<ScrollState>)
The compositor scrolled and is updating the scroll states of the nodes in the given pipeline via the Constellation.
SetEpochPaintTime(PipelineId, Epoch, CrossProcessInstant)
Send the paint time for a specific epoch.
Trait Implementations§
source§impl Debug for ConstellationControlMsg
impl Debug for ConstellationControlMsg
source§impl<'de> Deserialize<'de> for ConstellationControlMsg
impl<'de> Deserialize<'de> for ConstellationControlMsg
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl !Freeze for ConstellationControlMsg
impl !RefUnwindSafe for ConstellationControlMsg
impl Send for ConstellationControlMsg
impl !Sync for ConstellationControlMsg
impl Unpin for ConstellationControlMsg
impl UnwindSafe for ConstellationControlMsg
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more