Struct constellation::Constellation

source ·
pub struct Constellation<STF, SWF> {
Show 61 fields namespace_receiver: Receiver<Result<PipelineNamespaceRequest, Error>>, namespace_ipc_sender: IpcSender<PipelineNamespaceRequest>, script_sender: IpcSender<(PipelineId, ScriptMsg)>, script_receiver: Receiver<Result<(PipelineId, ScriptMsg), Error>>, background_monitor_register: Option<Box<dyn BackgroundHangMonitorRegister>>, background_monitor_control_senders: Vec<IpcSender<BackgroundHangMonitorControlMsg>>, background_hang_monitor_sender: IpcSender<HangMonitorAlert>, background_hang_monitor_receiver: Receiver<Result<HangMonitorAlert, Error>>, layout_factory: Arc<dyn LayoutFactory>, layout_sender: IpcSender<LayoutMsg>, layout_receiver: Receiver<Result<LayoutMsg, Error>>, network_listener_sender: Sender<(PipelineId, FetchResponseMsg)>, network_listener_receiver: Receiver<(PipelineId, FetchResponseMsg)>, compositor_receiver: Receiver<ConstellationMsg>, embedder_proxy: EmbedderProxy, compositor_proxy: CompositorProxy, webviews: WebViewManager<WebView>, public_resource_threads: ResourceThreads, private_resource_threads: ResourceThreads, system_font_service: Arc<SystemFontServiceProxy>, devtools_sender: Option<Sender<DevtoolsControlMsg>>, bluetooth_ipc_sender: IpcSender<BluetoothRequest>, sw_managers: HashMap<ImmutableOrigin, IpcSender<ServiceWorkerMsg>>, swmanager_ipc_sender: IpcSender<SWManagerMsg>, swmanager_receiver: Receiver<Result<SWManagerMsg, Error>>, time_profiler_chan: ProfilerChan, mem_profiler_chan: ProfilerChan, scheduler_ipc_sender: IpcSender<TimerSchedulerMsg>, scheduler_receiver: Receiver<Result<TimerSchedulerMsg, Error>>, timer_scheduler: TimerScheduler, webrender_document: DocumentId, webrender_wgpu: WebrenderWGPU, message_ports: HashMap<MessagePortId, MessagePortInfo>, message_port_routers: HashMap<MessagePortRouterId, IpcSender<MessagePortMsg>>, broadcast_routers: HashMap<BroadcastChannelRouterId, IpcSender<BroadcastMsg>>, broadcast_channels: HashMap<ImmutableOrigin, HashMap<String, Vec<BroadcastChannelRouterId>>>, pipelines: HashMap<PipelineId, Pipeline>, browsing_contexts: HashMap<BrowsingContextId, BrowsingContext>, browsing_context_group_set: HashMap<BrowsingContextGroupId, BrowsingContextGroup>, browsing_context_group_next_id: u32, pending_changes: Vec<SessionHistoryChange>, next_pipeline_namespace_id: PipelineNamespaceId, window_size: WindowSizeData, webdriver: WebDriverData, document_states: HashMap<PipelineId, DocumentState>, shutting_down: bool, handled_warnings: VecDeque<(Option<String>, String)>, random_pipeline_closure: Option<(ServoRng, f32)>, phantom: PhantomData<(STF, SWF)>, webgl_threads: Option<WebGLThreads>, webxr_registry: Option<Registry>, canvas_sender: Sender<ConstellationCanvasMsg>, canvas_ipc_sender: IpcSender<CanvasMsg>, pending_approval_navigations: HashMap<PipelineId, (LoadData, NavigationHistoryBehavior)>, pressed_mouse_buttons: u16, hard_fail: bool, enable_canvas_antialiasing: bool, glplayer_threads: Option<GLPlayerThreads>, player_context: WindowGLContext, active_media_session: Option<PipelineId>, user_agent: Cow<'static, str>,
}
Expand description

The Constellation itself. In the servo browser, there is one constellation, which maintains all of the browser global data. In embedded applications, there may be more than one constellation, which are independent of each other.

The constellation may be in a different process from the pipelines, and communicates using IPC.

It is parameterized over a LayoutThreadFactory and a ScriptThreadFactory (which in practice are implemented by LayoutThread in the layout crate, and ScriptThread in the script crate). Script and layout communicate using a Message type.

Fields§

§namespace_receiver: Receiver<Result<PipelineNamespaceRequest, Error>>

An ipc-sender/threaded-receiver pair to facilitate installing pipeline namespaces in threads via a per-process installer.

§namespace_ipc_sender: IpcSender<PipelineNamespaceRequest>§script_sender: IpcSender<(PipelineId, ScriptMsg)>

An IPC channel for script threads to send messages to the constellation. This is the script threads’ view of script_receiver.

§script_receiver: Receiver<Result<(PipelineId, ScriptMsg), Error>>

A channel for the constellation to receive messages from script threads. This is the constellation’s view of script_sender.

§background_monitor_register: Option<Box<dyn BackgroundHangMonitorRegister>>

A handle to register components for hang monitoring. None when in multiprocess mode.

§background_monitor_control_senders: Vec<IpcSender<BackgroundHangMonitorControlMsg>>

Channels to control all background-hang monitors. TODO: store them on the relevant BrowsingContextGroup, so that they could be controlled on a “per-tab/event-loop” basis.

§background_hang_monitor_sender: IpcSender<HangMonitorAlert>

A channel for the background hang monitor to send messages to the constellation.

§background_hang_monitor_receiver: Receiver<Result<HangMonitorAlert, Error>>

A channel for the constellation to receiver messages from the background hang monitor.

§layout_factory: Arc<dyn LayoutFactory>

A factory for creating layouts. This allows customizing the kind of layout created for a Constellation and prevents a circular crate dependency between script and layout.

§layout_sender: IpcSender<LayoutMsg>

An IPC channel for layout to send messages to the constellation. This is the layout’s view of layout_receiver.

§layout_receiver: Receiver<Result<LayoutMsg, Error>>

A channel for the constellation to receive messages from layout. This is the constellation’s view of layout_sender.

§network_listener_sender: Sender<(PipelineId, FetchResponseMsg)>

A channel for network listener to send messages to the constellation.

§network_listener_receiver: Receiver<(PipelineId, FetchResponseMsg)>

A channel for the constellation to receive messages from network listener.

§compositor_receiver: Receiver<ConstellationMsg>

A channel for the constellation to receive messages from the compositor thread.

§embedder_proxy: EmbedderProxy

A channel through which messages can be sent to the embedder.

§compositor_proxy: CompositorProxy

A channel (the implementation of which is port-specific) for the constellation to send messages to the compositor thread.

§webviews: WebViewManager<WebView>

Bookkeeping data for all webviews in the constellation.

§public_resource_threads: ResourceThreads

Channels for the constellation to send messages to the public resource-related threads. There are two groups of resource threads: one for public browsing, and one for private browsing.

§private_resource_threads: ResourceThreads

Channels for the constellation to send messages to the private resource-related threads. There are two groups of resource threads: one for public browsing, and one for private browsing.

§system_font_service: Arc<SystemFontServiceProxy>

A channel for the constellation to send messages to the font cache thread.

§devtools_sender: Option<Sender<DevtoolsControlMsg>>

A channel for the constellation to send messages to the devtools thread.

§bluetooth_ipc_sender: IpcSender<BluetoothRequest>

An IPC channel for the constellation to send messages to the bluetooth thread.

§sw_managers: HashMap<ImmutableOrigin, IpcSender<ServiceWorkerMsg>>

A map of origin to sender to a Service worker manager.

§swmanager_ipc_sender: IpcSender<SWManagerMsg>

An IPC channel for Service Worker Manager threads to send messages to the constellation. This is the SW Manager thread’s view of swmanager_receiver.

§swmanager_receiver: Receiver<Result<SWManagerMsg, Error>>

A channel for the constellation to receive messages from the Service Worker Manager thread. This is the constellation’s view of swmanager_sender.

§time_profiler_chan: ProfilerChan

A channel for the constellation to send messages to the time profiler thread.

§mem_profiler_chan: ProfilerChan

A channel for the constellation to send messages to the memory profiler thread.

§scheduler_ipc_sender: IpcSender<TimerSchedulerMsg>

A channel for a pipeline to schedule timer events.

§scheduler_receiver: Receiver<Result<TimerSchedulerMsg, Error>>

The receiver to which the IPC requests from scheduler_chan will be forwarded.

§timer_scheduler: TimerScheduler

The logic and data behing scheduling timer events.

§webrender_document: DocumentId

A single WebRender document the constellation operates on.

§webrender_wgpu: WebrenderWGPU

Webrender related objects required by WebGPU threads

§message_ports: HashMap<MessagePortId, MessagePortInfo>

A map of message-port Id to info.

§message_port_routers: HashMap<MessagePortRouterId, IpcSender<MessagePortMsg>>

A map of router-id to ipc-sender, to route messages to ports.

§broadcast_routers: HashMap<BroadcastChannelRouterId, IpcSender<BroadcastMsg>>

A map of broadcast routers to their IPC sender.

§broadcast_channels: HashMap<ImmutableOrigin, HashMap<String, Vec<BroadcastChannelRouterId>>>

A map of origin to a map of channel-name to a list of relevant routers.

§pipelines: HashMap<PipelineId, Pipeline>

The set of all the pipelines in the browser. (See the pipeline module for more details.)

§browsing_contexts: HashMap<BrowsingContextId, BrowsingContext>

The set of all the browsing contexts in the browser.

§browsing_context_group_set: HashMap<BrowsingContextGroupId, BrowsingContextGroup>

A user agent holds a a set of browsing context groups.

https://html.spec.whatwg.org/multipage/#browsing-context-group-set

§browsing_context_group_next_id: u32

The Id counter for BrowsingContextGroup.

§pending_changes: Vec<SessionHistoryChange>

When a navigation is performed, we do not immediately update the session history, instead we ask the event loop to begin loading the new document, and do not update the browsing context until the document is active. Between starting the load and it activating, we store a SessionHistoryChange object for the navigation in progress.

§next_pipeline_namespace_id: PipelineNamespaceId

Pipeline IDs are namespaced in order to avoid name collisions, and the namespaces are allocated by the constellation.

§window_size: WindowSizeData

The size of the top-level window.

§webdriver: WebDriverData

Bits of state used to interact with the webdriver implementation

§document_states: HashMap<PipelineId, DocumentState>

Document states for loaded pipelines (used only when writing screenshots).

§shutting_down: bool

Are we shutting down?

§handled_warnings: VecDeque<(Option<String>, String)>

Have we seen any warnings? Hopefully always empty! The buffer contains (thread_name, reason) entries.

§random_pipeline_closure: Option<(ServoRng, f32)>

The random number generator and probability for closing pipelines. This is for testing the hardening of the constellation.

§phantom: PhantomData<(STF, SWF)>

Phantom data that keeps the Rust type system happy.

§webgl_threads: Option<WebGLThreads>

Entry point to create and get channels to a WebGLThread.

§webxr_registry: Option<Registry>

The XR device registry

§canvas_sender: Sender<ConstellationCanvasMsg>

A channel through which messages can be sent to the canvas paint thread.

§canvas_ipc_sender: IpcSender<CanvasMsg>§pending_approval_navigations: HashMap<PipelineId, (LoadData, NavigationHistoryBehavior)>

Navigation requests from script awaiting approval from the embedder.

§pressed_mouse_buttons: u16

Bitmask which indicates which combination of mouse buttons are currently being pressed.

§hard_fail: bool

If True, exits on thread failure instead of displaying about:failure

§enable_canvas_antialiasing: bool

If set with –disable-canvas-aa, disable antialiasing on the HTML canvas element. Like –disable-text-aa, this is useful for reftests where pixel perfect results are required.

§glplayer_threads: Option<GLPlayerThreads>

Entry point to create and get channels to a GLPlayerThread.

§player_context: WindowGLContext

Application window’s GL Context for Media player

§active_media_session: Option<PipelineId>

Pipeline ID of the active media session.

§user_agent: Cow<'static, str>

User agent string to report in network requests.

Implementations§

source§

impl<STF, SWF> Constellation<STF, SWF>

source

pub fn start( state: InitialConstellationState, layout_factory: Arc<dyn LayoutFactory>, initial_window_size: WindowSizeData, random_pipeline_closure_probability: Option<f32>, random_pipeline_closure_seed: Option<usize>, hard_fail: bool, enable_canvas_antialiasing: bool, canvas_create_sender: Sender<ConstellationCanvasMsg>, canvas_ipc_sender: IpcSender<CanvasMsg>, ) -> Sender<FromCompositorMsg>

Create a new constellation thread.

source

fn run(&mut self)

The main event loop for the constellation.

source

fn next_pipeline_namespace_id(&mut self) -> PipelineNamespaceId

Generate a new pipeline id namespace.

source

fn next_browsing_context_group_id(&mut self) -> BrowsingContextGroupId

source

fn get_event_loop( &mut self, host: &Host, top_level_browsing_context_id: &TopLevelBrowsingContextId, opener: &Option<BrowsingContextId>, ) -> Result<Weak<EventLoop>, &'static str>

source

fn set_event_loop( &mut self, event_loop: Weak<EventLoop>, host: Host, top_level_browsing_context_id: TopLevelBrowsingContextId, opener: Option<BrowsingContextId>, )

source

fn new_pipeline( &mut self, pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, top_level_browsing_context_id: TopLevelBrowsingContextId, parent_pipeline_id: Option<PipelineId>, opener: Option<BrowsingContextId>, initial_window_size: Size2D<f32, CSSPixel>, load_data: LoadData, sandbox: IFrameSandboxState, is_private: bool, throttled: bool, )

Helper function for creating a pipeline

source

fn fully_active_descendant_browsing_contexts_iter( &self, browsing_context_id: BrowsingContextId, ) -> FullyActiveBrowsingContextsIterator<'_>

Get an iterator for the fully active browsing contexts in a subtree.

source

fn fully_active_browsing_contexts_iter( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, ) -> FullyActiveBrowsingContextsIterator<'_>

Get an iterator for the fully active browsing contexts in a tree.

source

fn all_descendant_browsing_contexts_iter( &self, browsing_context_id: BrowsingContextId, ) -> AllBrowsingContextsIterator<'_>

Get an iterator for the browsing contexts in a subtree.

source

fn new_browsing_context( &mut self, browsing_context_id: BrowsingContextId, top_level_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, parent_pipeline_id: Option<PipelineId>, size: Size2D<f32, CSSPixel>, is_private: bool, inherited_secure_context: Option<bool>, throttled: bool, )

Create a new browsing context and update the internal bookkeeping.

source

fn add_pending_change(&mut self, change: SessionHistoryChange)

source

fn handle_request(&mut self)

Handles loading pages, navigation, and granting access to the compositor

source

fn handle_request_for_pipeline_namespace( &mut self, request: PipelineNamespaceRequest, )

source

fn handle_request_from_background_hang_monitor(&self, message: HangMonitorAlert)

source

fn handle_request_from_network_listener( &mut self, message: (PipelineId, FetchResponseMsg), )

source

fn handle_request_from_swmanager(&mut self, message: SWManagerMsg)

source

fn handle_request_from_compositor(&mut self, message: FromCompositorMsg)

source

fn handle_request_from_script(&mut self, message: (PipelineId, FromScriptMsg))

source

fn check_origin_against_pipeline( &self, pipeline_id: &PipelineId, origin: &ImmutableOrigin, ) -> Result<(), ()>

Check the origin of a message against that of the pipeline it came from. Note: this is still limited as a security check, see https://github.com/servo/servo/issues/11722

source

fn handle_schedule_broadcast( &self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, message: BroadcastMsg, )

Broadcast a message via routers in various event-loops.

source

fn handle_remove_broadcast_channel_name_in_router( &mut self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, channel_name: String, origin: ImmutableOrigin, )

Remove a channel-name for a given broadcast router.

source

fn handle_new_broadcast_channel_name_in_router( &mut self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, channel_name: String, origin: ImmutableOrigin, )

Note a new channel-name relevant to a given broadcast router.

source

fn handle_remove_broadcast_channel_router( &mut self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, origin: ImmutableOrigin, )

Remove a broadcast router.

source

fn handle_new_broadcast_channel_router( &mut self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, broadcast_ipc_sender: IpcSender<BroadcastMsg>, origin: ImmutableOrigin, )

Add a new broadcast router.

source

fn handle_wgpu_request( &mut self, source_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, request: FromScriptMsg, )

source

fn handle_request_from_layout(&mut self, message: FromLayoutMsg)

source

fn handle_message_port_transfer_completed( &mut self, router_id: Option<MessagePortRouterId>, ports: Vec<MessagePortId>, )

source

fn handle_message_port_transfer_failed( &mut self, ports: HashMap<MessagePortId, VecDeque<PortMessageTask>>, )

source

fn handle_complete_message_port_transfer( &mut self, router_id: MessagePortRouterId, ports: Vec<MessagePortId>, )

source

fn handle_reroute_messageport( &mut self, port_id: MessagePortId, task: PortMessageTask, )

source

fn handle_messageport_shipped(&mut self, port_id: MessagePortId)

source

fn handle_new_messageport_router( &mut self, router_id: MessagePortRouterId, message_port_ipc_sender: IpcSender<MessagePortMsg>, )

source

fn handle_remove_messageport_router(&mut self, router_id: MessagePortRouterId)

source

fn handle_new_messageport( &mut self, router_id: MessagePortRouterId, port_id: MessagePortId, )

source

fn handle_remove_messageport(&mut self, port_id: MessagePortId)

source

fn handle_entangle_messageports( &mut self, port1: MessagePortId, port2: MessagePortId, )

source

fn handle_schedule_serviceworker_job( &mut self, pipeline_id: PipelineId, job: Job, )

https://w3c.github.io/ServiceWorker/#schedule-job-algorithm and https://w3c.github.io/ServiceWorker/#dfn-job-queue

The Job Queue is essentially the channel to a SW manager, which are scoped per origin.

source

fn handle_broadcast_storage_event( &self, pipeline_id: PipelineId, storage: StorageType, url: ServoUrl, key: Option<String>, old_value: Option<String>, new_value: Option<String>, )

source

fn handle_exit(&mut self)

source

fn handle_shutdown(&mut self)

source

fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId)

source

fn handle_send_error(&mut self, pipeline_id: PipelineId, err: IpcError)

source

fn handle_panic( &mut self, top_level_browsing_context_id: Option<TopLevelBrowsingContextId>, reason: String, backtrace: Option<String>, )

source

fn handle_focus_web_view( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

source

fn handle_log_entry( &mut self, top_level_browsing_context_id: Option<TopLevelBrowsingContextId>, thread_name: Option<String>, entry: LogEntry, )

source

fn forward_event( &mut self, destination_pipeline_id: PipelineId, event: CompositorEvent, )

source

fn handle_new_top_level_browsing_context( &mut self, url: ServoUrl, top_level_browsing_context_id: TopLevelBrowsingContextId, response_sender: Option<IpcSender<LoadStatus>>, )

source

fn handle_close_top_level_browsing_context( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

source

fn handle_iframe_size_msg(&mut self, iframe_sizes: Vec<IFrameSizeMsg>)

source

fn handle_subframe_loaded(&mut self, pipeline_id: PipelineId)

source

fn handle_navigate_request( &self, id: PipelineId, request_builder: RequestBuilder, cancel_chan: IpcReceiver<()>, )

source

fn handle_script_loaded_url_in_iframe_msg( &mut self, load_info: IFrameLoadInfoWithData, )

source

fn handle_script_new_iframe(&mut self, load_info: IFrameLoadInfoWithData)

source

fn handle_script_new_auxiliary( &mut self, load_info: AuxiliaryBrowsingContextLoadInfo, )

source

fn handle_pending_paint_metric(&self, pipeline_id: PipelineId, epoch: Epoch)

source

fn handle_set_cursor_msg(&mut self, cursor: Cursor)

source

fn handle_change_running_animations_state( &mut self, pipeline_id: PipelineId, animation_state: AnimationState, )

source

fn handle_tick_animation( &mut self, pipeline_id: PipelineId, tick_type: AnimationTickType, )

source

fn schedule_navigation( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, source_id: PipelineId, load_data: LoadData, history_handling: NavigationHistoryBehavior, )

Schedule a navigation(via load_url). 1: Ask the embedder for permission. 2: Store the details of the navigation, pending approval from the embedder.

source

fn load_url( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, source_id: PipelineId, load_data: LoadData, history_handling: NavigationHistoryBehavior, ) -> Option<PipelineId>

source

fn handle_abort_load_url_msg(&mut self, new_pipeline_id: PipelineId)

source

fn handle_load_complete_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, )

source

fn handle_navigated_to_fragment( &mut self, pipeline_id: PipelineId, new_url: ServoUrl, history_handling: NavigationHistoryBehavior, )

source

fn handle_traverse_history_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, direction: TraversalDirection, )

source

fn update_browsing_context( &mut self, browsing_context_id: BrowsingContextId, new_reloader: NeedsToReload, )

source

fn update_pipeline( &mut self, pipeline_id: PipelineId, history_state_id: Option<HistoryStateId>, url: ServoUrl, )

source

fn handle_joint_session_history_length( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, response_sender: IpcSender<u32>, )

source

fn handle_push_history_state_msg( &mut self, pipeline_id: PipelineId, history_state_id: HistoryStateId, url: ServoUrl, )

source

fn handle_replace_history_state_msg( &mut self, pipeline_id: PipelineId, history_state_id: HistoryStateId, url: ServoUrl, )

source

fn handle_ime_dismissed(&mut self)

source

fn handle_ime_msg(&mut self, event: CompositionEvent)

source

fn handle_key_msg(&mut self, event: KeyboardEvent)

source

fn handle_reload_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

source

fn handle_post_message_msg( &mut self, browsing_context_id: BrowsingContextId, source_pipeline: PipelineId, origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, data: StructuredSerializedData, )

source

fn handle_get_pipeline( &mut self, browsing_context_id: BrowsingContextId, response_sender: IpcSender<Option<PipelineId>>, )

source

fn handle_get_browsing_context( &mut self, pipeline_id: PipelineId, response_sender: IpcSender<Option<BrowsingContextId>>, )

source

fn handle_focus_msg(&mut self, pipeline_id: PipelineId)

source

fn focus_parent_pipeline(&mut self, browsing_context_id: BrowsingContextId)

source

fn handle_remove_iframe_msg( &mut self, browsing_context_id: BrowsingContextId, ) -> Vec<PipelineId>

source

fn handle_set_throttled_complete( &mut self, pipeline_id: PipelineId, throttled: bool, )

source

fn handle_create_canvas_paint_thread_msg( &mut self, size: UntypedSize2D<u64>, response_sender: IpcSender<(IpcSender<CanvasMsg>, CanvasId)>, )

source

fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg)

source

fn set_webview_throttled(&mut self, webview_id: WebViewId, throttled: bool)

source

fn notify_history_changed( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

source

fn load_url_for_webdriver( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, load_data: LoadData, response_sender: IpcSender<LoadStatus>, history_handling: NavigationHistoryBehavior, )

source

fn change_session_history(&mut self, change: SessionHistoryChange)

source

fn focused_browsing_context_is_descendant_of( &self, browsing_context_id: BrowsingContextId, ) -> bool

source

fn trim_history( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

source

fn handle_activate_document_msg(&mut self, pipeline_id: PipelineId)

source

fn handle_window_size_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, new_size: WindowSizeData, size_type: WindowSizeType, )

Called when the window is resized.

source

fn handle_exit_fullscreen_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )

Called when the window exits from fullscreen mode

source

fn handle_is_ready_to_save_image( &mut self, pipeline_states: HashMap<PipelineId, Epoch>, ) -> ReadyToSave

Checks the state of all script and layout pipelines to see if they are idle and compares the current layout state to what the compositor has. This is used to check if the output image is “stable” and can be written as a screenshot for reftests. Since this function is only used in reftests, we do not harden it against panic.

source

fn get_activity(&self, pipeline_id: PipelineId) -> DocumentActivity

Get the current activity of a pipeline.

source

fn set_activity(&self, pipeline_id: PipelineId, activity: DocumentActivity)

Set the current activity of a pipeline.

source

fn update_activity(&self, pipeline_id: PipelineId)

Update the current activity of a pipeline.

source

fn resize_browsing_context( &mut self, new_size: WindowSizeData, size_type: WindowSizeType, browsing_context_id: BrowsingContextId, )

Handle updating the size of a browsing context. This notifies every pipeline in the context of the new size.

source

fn handle_theme_change(&mut self, theme: Theme)

Handle theme change events from the embedder and forward them to the script thread

source

fn switch_fullscreen_mode(&mut self, browsing_context_id: BrowsingContextId)

source

fn close_browsing_context( &mut self, browsing_context_id: BrowsingContextId, exit_mode: ExitPipelineMode, ) -> Option<BrowsingContext>

source

fn close_browsing_context_children( &mut self, browsing_context_id: BrowsingContextId, dbc: DiscardBrowsingContext, exit_mode: ExitPipelineMode, )

source

fn handle_discard_document( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, )

source

fn unload_document(&self, pipeline_id: PipelineId)

source

fn close_pipeline( &mut self, pipeline_id: PipelineId, dbc: DiscardBrowsingContext, exit_mode: ExitPipelineMode, )

source

fn maybe_close_random_pipeline(&mut self)

source

fn get_joint_session_history( &mut self, top_level_id: TopLevelBrowsingContextId, ) -> &mut JointSessionHistory

source

fn browsing_context_to_sendable( &self, browsing_context_id: BrowsingContextId, ) -> Option<SendableFrameTree>

source

fn update_webview_in_compositor(&mut self, webview_id: WebViewId)

Send the frame tree for the given webview to the compositor.

source

fn handle_media_session_action_msg(&mut self, action: MediaSessionActionType)

source

fn handle_gamepad_msg(&mut self, event: GamepadEvent)

Handle GamepadEvents from the embedder and forward them to the script thread

Auto Trait Implementations§

§

impl<STF, SWF> !Freeze for Constellation<STF, SWF>

§

impl<STF, SWF> !RefUnwindSafe for Constellation<STF, SWF>

§

impl<STF, SWF> !Send for Constellation<STF, SWF>

§

impl<STF, SWF> !Sync for Constellation<STF, SWF>

§

impl<STF, SWF> Unpin for Constellation<STF, SWF>
where STF: Unpin, SWF: Unpin,

§

impl<STF, SWF> !UnwindSafe for Constellation<STF, SWF>

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> ErasedDestructor for T
where T: 'static,

source§

impl<T> MaybeSendSync for T