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>
Navigation requests from script awaiting approval from the embedder.
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>where
STF: ScriptThreadFactory,
SWF: ServiceWorkerManagerFactory,
impl<STF, SWF> Constellation<STF, SWF>where
STF: ScriptThreadFactory,
SWF: ServiceWorkerManagerFactory,
sourcepub 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>
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.
sourcefn next_pipeline_namespace_id(&mut self) -> PipelineNamespaceId
fn next_pipeline_namespace_id(&mut self) -> PipelineNamespaceId
Generate a new pipeline id namespace.
fn next_browsing_context_group_id(&mut self) -> BrowsingContextGroupId
fn get_event_loop( &mut self, host: &Host, top_level_browsing_context_id: &TopLevelBrowsingContextId, opener: &Option<BrowsingContextId>, ) -> Result<Weak<EventLoop>, &'static str>
fn set_event_loop( &mut self, event_loop: Weak<EventLoop>, host: Host, top_level_browsing_context_id: TopLevelBrowsingContextId, opener: Option<BrowsingContextId>, )
sourcefn 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,
)
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
sourcefn fully_active_descendant_browsing_contexts_iter(
&self,
browsing_context_id: BrowsingContextId,
) -> FullyActiveBrowsingContextsIterator<'_> ⓘ
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.
sourcefn fully_active_browsing_contexts_iter(
&self,
top_level_browsing_context_id: TopLevelBrowsingContextId,
) -> FullyActiveBrowsingContextsIterator<'_> ⓘ
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.
sourcefn all_descendant_browsing_contexts_iter(
&self,
browsing_context_id: BrowsingContextId,
) -> AllBrowsingContextsIterator<'_> ⓘ
fn all_descendant_browsing_contexts_iter( &self, browsing_context_id: BrowsingContextId, ) -> AllBrowsingContextsIterator<'_> ⓘ
Get an iterator for the browsing contexts in a subtree.
sourcefn 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,
)
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.
fn add_pending_change(&mut self, change: SessionHistoryChange)
sourcefn handle_request(&mut self)
fn handle_request(&mut self)
Handles loading pages, navigation, and granting access to the compositor
fn handle_request_for_pipeline_namespace( &mut self, request: PipelineNamespaceRequest, )
fn handle_request_from_background_hang_monitor(&self, message: HangMonitorAlert)
fn handle_request_from_network_listener( &mut self, message: (PipelineId, FetchResponseMsg), )
fn handle_request_from_swmanager(&mut self, message: SWManagerMsg)
fn handle_request_from_compositor(&mut self, message: FromCompositorMsg)
fn handle_request_from_script(&mut self, message: (PipelineId, FromScriptMsg))
sourcefn check_origin_against_pipeline(
&self,
pipeline_id: &PipelineId,
origin: &ImmutableOrigin,
) -> Result<(), ()>
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
sourcefn handle_schedule_broadcast(
&self,
pipeline_id: PipelineId,
router_id: BroadcastChannelRouterId,
message: BroadcastMsg,
)
fn handle_schedule_broadcast( &self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, message: BroadcastMsg, )
Broadcast a message via routers in various event-loops.
sourcefn handle_remove_broadcast_channel_name_in_router(
&mut self,
pipeline_id: PipelineId,
router_id: BroadcastChannelRouterId,
channel_name: String,
origin: ImmutableOrigin,
)
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.
sourcefn handle_new_broadcast_channel_name_in_router(
&mut self,
pipeline_id: PipelineId,
router_id: BroadcastChannelRouterId,
channel_name: String,
origin: ImmutableOrigin,
)
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.
sourcefn handle_remove_broadcast_channel_router(
&mut self,
pipeline_id: PipelineId,
router_id: BroadcastChannelRouterId,
origin: ImmutableOrigin,
)
fn handle_remove_broadcast_channel_router( &mut self, pipeline_id: PipelineId, router_id: BroadcastChannelRouterId, origin: ImmutableOrigin, )
Remove a broadcast router.
sourcefn handle_new_broadcast_channel_router(
&mut self,
pipeline_id: PipelineId,
router_id: BroadcastChannelRouterId,
broadcast_ipc_sender: IpcSender<BroadcastMsg>,
origin: ImmutableOrigin,
)
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.
fn handle_wgpu_request( &mut self, source_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, request: FromScriptMsg, )
fn handle_request_from_layout(&mut self, message: FromLayoutMsg)
fn handle_message_port_transfer_completed( &mut self, router_id: Option<MessagePortRouterId>, ports: Vec<MessagePortId>, )
fn handle_message_port_transfer_failed( &mut self, ports: HashMap<MessagePortId, VecDeque<PortMessageTask>>, )
fn handle_complete_message_port_transfer( &mut self, router_id: MessagePortRouterId, ports: Vec<MessagePortId>, )
fn handle_reroute_messageport( &mut self, port_id: MessagePortId, task: PortMessageTask, )
fn handle_messageport_shipped(&mut self, port_id: MessagePortId)
fn handle_new_messageport_router( &mut self, router_id: MessagePortRouterId, message_port_ipc_sender: IpcSender<MessagePortMsg>, )
fn handle_remove_messageport_router(&mut self, router_id: MessagePortRouterId)
fn handle_new_messageport( &mut self, router_id: MessagePortRouterId, port_id: MessagePortId, )
fn handle_remove_messageport(&mut self, port_id: MessagePortId)
fn handle_entangle_messageports( &mut self, port1: MessagePortId, port2: MessagePortId, )
sourcefn handle_schedule_serviceworker_job(
&mut self,
pipeline_id: PipelineId,
job: Job,
)
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.
fn handle_broadcast_storage_event( &self, pipeline_id: PipelineId, storage: StorageType, url: ServoUrl, key: Option<String>, old_value: Option<String>, new_value: Option<String>, )
fn handle_exit(&mut self)
fn handle_shutdown(&mut self)
fn handle_pipeline_exited(&mut self, pipeline_id: PipelineId)
fn handle_send_error(&mut self, pipeline_id: PipelineId, err: IpcError)
fn handle_panic( &mut self, top_level_browsing_context_id: Option<TopLevelBrowsingContextId>, reason: String, backtrace: Option<String>, )
fn handle_focus_web_view( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
fn handle_log_entry( &mut self, top_level_browsing_context_id: Option<TopLevelBrowsingContextId>, thread_name: Option<String>, entry: LogEntry, )
fn forward_event( &mut self, destination_pipeline_id: PipelineId, event: CompositorEvent, )
fn handle_new_top_level_browsing_context( &mut self, url: ServoUrl, top_level_browsing_context_id: TopLevelBrowsingContextId, response_sender: Option<IpcSender<LoadStatus>>, )
fn handle_close_top_level_browsing_context( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
fn handle_iframe_size_msg(&mut self, iframe_sizes: Vec<IFrameSizeMsg>)
fn handle_subframe_loaded(&mut self, pipeline_id: PipelineId)
fn handle_script_loaded_url_in_iframe_msg( &mut self, load_info: IFrameLoadInfoWithData, )
fn handle_script_new_iframe(&mut self, load_info: IFrameLoadInfoWithData)
fn handle_script_new_auxiliary( &mut self, load_info: AuxiliaryBrowsingContextLoadInfo, )
fn handle_pending_paint_metric(&self, pipeline_id: PipelineId, epoch: Epoch)
fn handle_set_cursor_msg(&mut self, cursor: Cursor)
fn handle_change_running_animations_state( &mut self, pipeline_id: PipelineId, animation_state: AnimationState, )
fn handle_tick_animation( &mut self, pipeline_id: PipelineId, tick_type: AnimationTickType, )
Schedule a navigation(via load_url). 1: Ask the embedder for permission. 2: Store the details of the navigation, pending approval from the embedder.
fn load_url( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, source_id: PipelineId, load_data: LoadData, history_handling: NavigationHistoryBehavior, ) -> Option<PipelineId>
fn handle_abort_load_url_msg(&mut self, new_pipeline_id: PipelineId)
fn handle_load_complete_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, )
fn handle_traverse_history_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, direction: TraversalDirection, )
fn update_browsing_context( &mut self, browsing_context_id: BrowsingContextId, new_reloader: NeedsToReload, )
fn update_pipeline( &mut self, pipeline_id: PipelineId, history_state_id: Option<HistoryStateId>, url: ServoUrl, )
fn handle_joint_session_history_length( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, response_sender: IpcSender<u32>, )
fn handle_push_history_state_msg( &mut self, pipeline_id: PipelineId, history_state_id: HistoryStateId, url: ServoUrl, )
fn handle_replace_history_state_msg( &mut self, pipeline_id: PipelineId, history_state_id: HistoryStateId, url: ServoUrl, )
fn handle_ime_dismissed(&mut self)
fn handle_ime_msg(&mut self, event: CompositionEvent)
fn handle_key_msg(&mut self, event: KeyboardEvent)
fn handle_reload_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
fn handle_post_message_msg( &mut self, browsing_context_id: BrowsingContextId, source_pipeline: PipelineId, origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, data: StructuredSerializedData, )
fn handle_get_pipeline( &mut self, browsing_context_id: BrowsingContextId, response_sender: IpcSender<Option<PipelineId>>, )
fn handle_get_browsing_context( &mut self, pipeline_id: PipelineId, response_sender: IpcSender<Option<BrowsingContextId>>, )
fn handle_focus_msg(&mut self, pipeline_id: PipelineId)
fn focus_parent_pipeline(&mut self, browsing_context_id: BrowsingContextId)
fn handle_remove_iframe_msg( &mut self, browsing_context_id: BrowsingContextId, ) -> Vec<PipelineId>
fn handle_set_throttled_complete( &mut self, pipeline_id: PipelineId, throttled: bool, )
fn handle_create_canvas_paint_thread_msg( &mut self, size: UntypedSize2D<u64>, response_sender: IpcSender<(IpcSender<CanvasMsg>, CanvasId)>, )
fn handle_webdriver_msg(&mut self, msg: WebDriverCommandMsg)
fn set_webview_throttled(&mut self, webview_id: WebViewId, throttled: bool)
fn notify_history_changed( &self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
fn load_url_for_webdriver( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, load_data: LoadData, response_sender: IpcSender<LoadStatus>, history_handling: NavigationHistoryBehavior, )
fn change_session_history(&mut self, change: SessionHistoryChange)
fn focused_browsing_context_is_descendant_of( &self, browsing_context_id: BrowsingContextId, ) -> bool
fn trim_history( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
fn handle_activate_document_msg(&mut self, pipeline_id: PipelineId)
sourcefn handle_window_size_msg(
&mut self,
top_level_browsing_context_id: TopLevelBrowsingContextId,
new_size: WindowSizeData,
size_type: WindowSizeType,
)
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.
sourcefn handle_exit_fullscreen_msg(
&mut self,
top_level_browsing_context_id: TopLevelBrowsingContextId,
)
fn handle_exit_fullscreen_msg( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, )
Called when the window exits from fullscreen mode
sourcefn handle_is_ready_to_save_image(
&mut self,
pipeline_states: HashMap<PipelineId, Epoch>,
) -> ReadyToSave
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.
sourcefn get_activity(&self, pipeline_id: PipelineId) -> DocumentActivity
fn get_activity(&self, pipeline_id: PipelineId) -> DocumentActivity
Get the current activity of a pipeline.
sourcefn set_activity(&self, pipeline_id: PipelineId, activity: DocumentActivity)
fn set_activity(&self, pipeline_id: PipelineId, activity: DocumentActivity)
Set the current activity of a pipeline.
sourcefn update_activity(&self, pipeline_id: PipelineId)
fn update_activity(&self, pipeline_id: PipelineId)
Update the current activity of a pipeline.
sourcefn resize_browsing_context(
&mut self,
new_size: WindowSizeData,
size_type: WindowSizeType,
browsing_context_id: BrowsingContextId,
)
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.
sourcefn handle_theme_change(&mut self, theme: Theme)
fn handle_theme_change(&mut self, theme: Theme)
Handle theme change events from the embedder and forward them to the script thread
fn switch_fullscreen_mode(&mut self, browsing_context_id: BrowsingContextId)
fn close_browsing_context( &mut self, browsing_context_id: BrowsingContextId, exit_mode: ExitPipelineMode, ) -> Option<BrowsingContext>
fn close_browsing_context_children( &mut self, browsing_context_id: BrowsingContextId, dbc: DiscardBrowsingContext, exit_mode: ExitPipelineMode, )
fn handle_discard_document( &mut self, top_level_browsing_context_id: TopLevelBrowsingContextId, pipeline_id: PipelineId, )
fn unload_document(&self, pipeline_id: PipelineId)
fn close_pipeline( &mut self, pipeline_id: PipelineId, dbc: DiscardBrowsingContext, exit_mode: ExitPipelineMode, )
fn maybe_close_random_pipeline(&mut self)
fn get_joint_session_history( &mut self, top_level_id: TopLevelBrowsingContextId, ) -> &mut JointSessionHistory
fn browsing_context_to_sendable( &self, browsing_context_id: BrowsingContextId, ) -> Option<SendableFrameTree>
sourcefn update_webview_in_compositor(&mut self, webview_id: WebViewId)
fn update_webview_in_compositor(&mut self, webview_id: WebViewId)
Send the frame tree for the given webview to the compositor.
fn handle_media_session_action_msg(&mut self, action: MediaSessionActionType)
sourcefn handle_gamepad_msg(&mut self, event: GamepadEvent)
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>
impl<STF, SWF> !UnwindSafe for Constellation<STF, SWF>
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