Enum script_traits::ConstellationControlMsg

source ·
pub enum ConstellationControlMsg {
Show 34 variants StopDelayingLoadEventsMode(PipelineId), NavigationResponse(PipelineId, FetchResponseMsg), AttachLayout(NewLayoutInfo), Resize(PipelineId, WindowSizeData, WindowSizeType), ThemeChange(PipelineId, Theme), 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, NavigationHistoryBehavior), 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

§

NavigationResponse(PipelineId, FetchResponseMsg)

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.

§

ThemeChange(PipelineId, Theme)

Theme changed.

§

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.

§

NavigateIframe(PipelineId, BrowsingContextId, LoadData, NavigationHistoryBehavior)

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.

§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

source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<'de> Deserialize<'de> for ConstellationControlMsg

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for ConstellationControlMsg

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> Downcast<T> for T

source§

fn downcast(&self) -> &T

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
source§

impl<T> MaybeBoxed<Box<T>> for T

source§

fn maybe_boxed(self) -> Box<T>

Convert
source§

impl<T> MaybeBoxed<T> for T

source§

fn maybe_boxed(self) -> T

Convert
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> Same for T

source§

type Output = T

Should always be Self
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

source§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Upcast<T> for T

source§

fn upcast(&self) -> Option<&T>

source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T

source§

impl<T> WasmNotSend for T
where T: Send,