pub struct Constellation<STF, SWF> {Show 59 fields
namespace_receiver: RoutedReceiver<PipelineNamespaceRequest>,
namespace_ipc_sender: GenericSender<PipelineNamespaceRequest>,
script_sender: GenericSender<(WebViewId, PipelineId, ScriptToConstellationMessage)>,
script_receiver: Receiver<Result<(WebViewId, PipelineId, ScriptToConstellationMessage), Error>>,
background_monitor_register: Option<Box<dyn BackgroundHangMonitorRegister>>,
background_monitor_register_join_handle: Option<JoinHandle<()>>,
background_monitor_control_senders: Vec<GenericSender<BackgroundHangMonitorControlMsg>>,
background_hang_monitor_sender: GenericSender<HangMonitorAlert>,
background_hang_monitor_receiver: RoutedReceiver<HangMonitorAlert>,
layout_factory: Arc<dyn LayoutFactory>,
embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>,
embedder_proxy: EmbedderProxy,
compositor_proxy: CompositorProxy,
webviews: WebViewManager<ConstellationWebView>,
public_resource_threads: ResourceThreads,
private_resource_threads: ResourceThreads,
public_storage_threads: StorageThreads,
private_storage_threads: StorageThreads,
system_font_service: Arc<SystemFontServiceProxy>,
devtools_sender: Option<Sender<DevtoolsControlMsg>>,
bluetooth_ipc_sender: IpcSender<BluetoothRequest>,
sw_managers: HashMap<ImmutableOrigin, GenericSender<ServiceWorkerMsg>>,
swmanager_ipc_sender: GenericSender<SWManagerMsg>,
swmanager_receiver: RoutedReceiver<SWManagerMsg>,
time_profiler_chan: ProfilerChan,
mem_profiler_chan: ProfilerChan,
webrender_wgpu: WebRenderWGPU,
message_ports: FxHashMap<MessagePortId, MessagePortInfo>,
message_port_routers: FxHashMap<MessagePortRouterId, IpcSender<MessagePortMsg>>,
broadcast_channels: BroadcastChannels,
pipelines: FxHashMap<PipelineId, Pipeline>,
browsing_contexts: FxHashMap<BrowsingContextId, BrowsingContext>,
browsing_context_group_set: FxHashMap<BrowsingContextGroupId, BrowsingContextGroup>,
browsing_context_group_next_id: u32,
pending_changes: Vec<SessionHistoryChange>,
next_pipeline_namespace_id: PipelineNamespaceId,
webdriver_load_status_sender: Option<(GenericSender<WebDriverLoadStatus>, PipelineId)>,
document_states: FxHashMap<PipelineId, DocumentState>,
shutting_down: bool,
handled_warnings: VecDeque<(Option<String>, String)>,
random_pipeline_closure: Option<(SmallRng, f32)>,
phantom: PhantomData<(STF, SWF)>,
webgl_threads: Option<WebGLThreads>,
webxr_registry: Option<Registry>,
canvas: OnceCell<(Sender<ConstellationCanvasMsg>, GenericSender<CanvasMsg>)>,
pending_approval_navigations: FxHashMap<PipelineId, (LoadData, NavigationHistoryBehavior)>,
pressed_mouse_buttons: u16,
active_keyboard_modifiers: Modifiers,
hard_fail: bool,
active_media_session: Option<PipelineId>,
broken_image_icon_data: Vec<u8>,
user_content_manager: UserContentManager,
process_manager: ProcessManager,
async_runtime: Box<dyn AsyncRuntime>,
script_join_handles: FxHashMap<WebViewId, JoinHandle<()>>,
privileged_urls: Vec<ServoUrl>,
image_cache_factory: Arc<ImageCacheFactoryImpl>,
pending_viewport_changes: HashMap<BrowsingContextId, ViewportDetails>,
screenshot_readiness_requests: Vec<ScreenshotReadinessRequest>,
}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: RoutedReceiver<PipelineNamespaceRequest>An ipc-sender/threaded-receiver pair to facilitate installing pipeline namespaces in threads via a per-process installer.
namespace_ipc_sender: GenericSender<PipelineNamespaceRequest>§script_sender: GenericSender<(WebViewId, PipelineId, ScriptToConstellationMessage)>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<(WebViewId, PipelineId, ScriptToConstellationMessage), 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_register_join_handle: Option<JoinHandle<()>>In single process mode, a join handle on the BHM worker thread.
background_monitor_control_senders: Vec<GenericSender<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: GenericSender<HangMonitorAlert>A channel for the background hang monitor to send messages to the constellation.
background_hang_monitor_receiver: RoutedReceiver<HangMonitorAlert>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.
embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>A channel for the embedder (renderer and libservo) to send messages to the Constellation.
embedder_proxy: EmbedderProxyA channel through which messages can be sent to the embedder.
compositor_proxy: CompositorProxyA channel (the implementation of which is port-specific) for the constellation to send messages to the compositor thread.
webviews: WebViewManager<ConstellationWebView>Bookkeeping data for all webviews in the constellation.
public_resource_threads: ResourceThreadsChannels 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: ResourceThreadsChannels 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.
public_storage_threads: StorageThreadsChannels for the constellation to send messages to the public storage-related threads. There are two groups of storage threads: one for public browsing, and one for private browsing.
private_storage_threads: StorageThreadsChannels for the constellation to send messages to the private storage-related threads. There are two groups of storage 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, GenericSender<ServiceWorkerMsg>>A map of origin to sender to a Service worker manager.
swmanager_ipc_sender: GenericSender<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: RoutedReceiver<SWManagerMsg>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: ProfilerChanA channel for the constellation to send messages to the time profiler thread.
mem_profiler_chan: ProfilerChanA channel for the constellation to send messages to the memory profiler thread.
webrender_wgpu: WebRenderWGPUWebRender related objects required by WebGPU threads
message_ports: FxHashMap<MessagePortId, MessagePortInfo>A map of message-port Id to info.
message_port_routers: FxHashMap<MessagePortRouterId, IpcSender<MessagePortMsg>>A map of router-id to ipc-sender, to route messages to ports.
broadcast_channels: BroadcastChannelsBookkeeping for BroadcastChannel functionnality.
pipelines: FxHashMap<PipelineId, Pipeline>The set of all the pipelines in the browser. (See the pipeline module
for more details.)
browsing_contexts: FxHashMap<BrowsingContextId, BrowsingContext>The set of all the browsing contexts in the browser.
browsing_context_group_set: FxHashMap<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: u32The 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: PipelineNamespaceIdPipeline IDs are namespaced in order to avoid name collisions, and the namespaces are allocated by the constellation.
webdriver_load_status_sender: Option<(GenericSender<WebDriverLoadStatus>, PipelineId)>An IpcSender to notify navigation events to webdriver.
document_states: FxHashMap<PipelineId, DocumentState>Document states for loaded pipelines (used only when writing screenshots).
shutting_down: boolAre 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<(SmallRng, 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: OnceCell<(Sender<ConstellationCanvasMsg>, GenericSender<CanvasMsg>)>Lazily initialized channels for canvas paint thread.
Navigation requests from script awaiting approval from the embedder.
Bitmask which indicates which combination of mouse buttons are currently being pressed.
active_keyboard_modifiers: ModifiersThe currently activated keyboard modifiers.
hard_fail: boolIf True, exits on thread failure instead of displaying about:failure
active_media_session: Option<PipelineId>Pipeline ID of the active media session.
broken_image_icon_data: Vec<u8>The image bytes associated with the BrokenImageIcon embedder resource. Read during startup and provided to image caches that are created on an as-needed basis, rather than retrieving it every time.
user_content_manager: UserContentManagerUser content manager
process_manager: ProcessManagerThe process manager.
async_runtime: Box<dyn AsyncRuntime>The async runtime.
script_join_handles: FxHashMap<WebViewId, JoinHandle<()>>When in single-process mode, join handles for script-threads.
privileged_urls: Vec<ServoUrl>A list of URLs that can access privileged internal APIs.
image_cache_factory: Arc<ImageCacheFactoryImpl>The [ImageCacheFactory] to use for all ScriptThreads when we are running in
single-process mode. In multi-process mode, each process will create its own
ImageCacheFactoryImpl.
pending_viewport_changes: HashMap<BrowsingContextId, ViewportDetails>Pending viewport changes for browsing contexts that are not yet known to the constellation.
screenshot_readiness_requests: Vec<ScreenshotReadinessRequest>Pending screenshot readiness requests. These are collected until the screenshot is ready to take place, at which point the Constellation informs the renderer that it can start the process of taking the screenshot.
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(
embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>,
state: InitialConstellationState,
layout_factory: Arc<dyn LayoutFactory>,
random_pipeline_closure_probability: Option<f32>,
random_pipeline_closure_seed: Option<usize>,
hard_fail: bool,
)
pub fn start( embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>, state: InitialConstellationState, layout_factory: Arc<dyn LayoutFactory>, random_pipeline_closure_probability: Option<f32>, random_pipeline_closure_seed: Option<usize>, hard_fail: bool, )
Create a new constellation thread.
Sourcefn send_message_to_pipeline(
&mut self,
pipeline_id: PipelineId,
message: ScriptThreadMessage,
failure_message: &str,
) -> bool
fn send_message_to_pipeline( &mut self, pipeline_id: PipelineId, message: ScriptThreadMessage, failure_message: &str, ) -> bool
Helper that sends a message to the event loop of a given pipeline, logging the
given failure message and returning false on failure.
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, webview_id: &WebViewId, opener: &Option<BrowsingContextId>, ) -> Result<Weak<EventLoop>, &'static str>
fn set_event_loop( &mut self, event_loop: Weak<EventLoop>, host: Host, webview_id: WebViewId, opener: Option<BrowsingContextId>, )
Sourcefn new_pipeline(
&mut self,
pipeline_id: PipelineId,
browsing_context_id: BrowsingContextId,
webview_id: WebViewId,
parent_pipeline_id: Option<PipelineId>,
opener: Option<BrowsingContextId>,
initial_viewport_details: ViewportDetails,
load_data: LoadData,
is_private: bool,
throttled: bool,
)
fn new_pipeline( &mut self, pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, webview_id: WebViewId, parent_pipeline_id: Option<PipelineId>, opener: Option<BrowsingContextId>, initial_viewport_details: ViewportDetails, load_data: LoadData, 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,
webview_id: WebViewId,
) -> FullyActiveBrowsingContextsIterator<'_> ⓘ
fn fully_active_browsing_contexts_iter( &self, webview_id: WebViewId, ) -> 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 ancestor_pipelines_of_browsing_context_iter(
&self,
browsing_context_id: BrowsingContextId,
) -> impl Iterator<Item = &Pipeline> + '_
fn ancestor_pipelines_of_browsing_context_iter( &self, browsing_context_id: BrowsingContextId, ) -> impl Iterator<Item = &Pipeline> + '_
Enumerate the specified browsing context’s ancestor pipelines up to the top-level pipeline.
Sourcefn ancestor_or_self_pipelines_of_browsing_context_iter(
&self,
browsing_context_id: BrowsingContextId,
) -> impl Iterator<Item = &Pipeline> + '_
fn ancestor_or_self_pipelines_of_browsing_context_iter( &self, browsing_context_id: BrowsingContextId, ) -> impl Iterator<Item = &Pipeline> + '_
Enumerate the specified browsing context’s ancestor-or-self pipelines up to the top-level pipeline.
Sourcefn new_browsing_context(
&mut self,
browsing_context_id: BrowsingContextId,
webview_id: WebViewId,
pipeline_id: PipelineId,
parent_pipeline_id: Option<PipelineId>,
viewport_details: ViewportDetails,
is_private: bool,
inherited_secure_context: Option<bool>,
throttled: bool,
)
fn new_browsing_context( &mut self, browsing_context_id: BrowsingContextId, webview_id: WebViewId, pipeline_id: PipelineId, parent_pipeline_id: Option<PipelineId>, viewport_details: ViewportDetails, 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_swmanager(&mut self, message: SWManagerMsg)
fn handle_request_from_compositor( &mut self, message: EmbedderToConstellationMessage, )
fn handle_evaluate_javascript( &mut self, webview_id: WebViewId, evaluation_id: JavaScriptEvaluationId, script: String, )
fn handle_request_from_script( &mut self, message: (WebViewId, PipelineId, ScriptToConstellationMessage), )
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
fn handle_wgpu_request( &mut self, source_pipeline_id: PipelineId, browsing_context_id: BrowsingContextId, request: ScriptToConstellationMessage, )
fn handle_message_port_transfer_completed( &mut self, router_id: Option<MessagePortRouterId>, ports: Vec<MessagePortId>, )
fn handle_message_port_transfer_failed( &mut self, ports: FxHashMap<MessagePortId, PortTransferInfo>, )
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_entangle_messageports( &mut self, port1: MessagePortId, port2: MessagePortId, )
Sourcefn handle_disentangle_messageports(
&mut self,
port1: MessagePortId,
port2: Option<MessagePortId>,
)
fn handle_disentangle_messageports( &mut self, port1: MessagePortId, port2: Option<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, webview_id: Option<WebViewId>, reason: String, backtrace: Option<String>, )
fn handle_focus_web_view(&mut self, webview_id: WebViewId)
fn handle_log_entry( &mut self, webview_id: Option<WebViewId>, thread_name: Option<String>, entry: LogEntry, )
fn update_active_keybord_modifiers(&mut self, event: &KeyboardEvent)
fn forward_input_event( &mut self, webview_id: WebViewId, event: InputEventAndId, hit_test_result: Option<CompositorHitTestResult>, )
fn handle_new_top_level_browsing_context( &mut self, url: ServoUrl, webview_id: WebViewId, viewport_details: ViewportDetails, )
fn handle_close_top_level_browsing_context(&mut self, webview_id: WebViewId)
fn handle_iframe_size_msg(&mut self, iframe_sizes: Vec<IFrameSizeMsg>)
fn handle_finish_javascript_evaluation( &mut self, evaluation_id: JavaScriptEvaluationId, result: Result<JSValue, JavaScriptEvaluationError>, )
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: AuxiliaryWebViewCreationRequest, )
fn handle_refresh_cursor(&self, pipeline_id: PipelineId)
fn handle_change_running_animations_state( &mut self, pipeline_id: PipelineId, animation_state: AnimationState, )
fn handle_tick_animation(&mut self, webview_ids: Vec<WebViewId>)
fn handle_no_longer_waiting_on_asynchronous_image_updates( &mut self, pipeline_ids: Vec<PipelineId>, )
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, webview_id: WebViewId, 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, webview_id: WebViewId, pipeline_id: PipelineId, )
fn handle_traverse_history_msg( &mut self, webview_id: WebViewId, 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, webview_id: WebViewId, 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_reload_msg(&mut self, webview_id: WebViewId)
Sourcefn handle_post_message_msg(
&mut self,
browsing_context_id: BrowsingContextId,
source_pipeline: PipelineId,
origin: Option<ImmutableOrigin>,
source_origin: ImmutableOrigin,
data: StructuredSerializedData,
)
fn handle_post_message_msg( &mut self, browsing_context_id: BrowsingContextId, source_pipeline: PipelineId, origin: Option<ImmutableOrigin>, source_origin: ImmutableOrigin, data: StructuredSerializedData, )
fn handle_focus_msg( &mut self, pipeline_id: PipelineId, focused_child_browsing_context_id: Option<BrowsingContextId>, sequence: FocusSequenceNumber, )
fn handle_focus_remote_document_msg( &mut self, focused_browsing_context_id: BrowsingContextId, )
Sourcefn focus_browsing_context(
&mut self,
initiator_pipeline_id: Option<PipelineId>,
focused_browsing_context_id: BrowsingContextId,
)
fn focus_browsing_context( &mut self, initiator_pipeline_id: Option<PipelineId>, focused_browsing_context_id: BrowsingContextId, )
Perform the focusing steps for the active document of
focused_browsing_context_id.
If initiator_pipeline_id is specified, this method avoids sending
a message to initiator_pipeline_id, assuming its local focus state has
already been updated. This is necessary for performing the focusing
steps for an object that is not the document itself but something that
belongs to the document.
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<Option<(GenericSender<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, webview_id: WebViewId)
fn change_session_history(&mut self, change: SessionHistoryChange)
Sourcefn notify_focus_state(&mut self, pipeline_id: PipelineId)
fn notify_focus_state(&mut self, pipeline_id: PipelineId)
Update the focus state of the specified pipeline that recently became active (thus doesn’t have a focused container element) and may have out-dated information.
fn focused_browsing_context_is_descendant_of( &self, browsing_context_id: BrowsingContextId, ) -> bool
fn trim_history(&mut self, webview_id: WebViewId)
fn handle_activate_document_msg(&mut self, pipeline_id: PipelineId)
Sourcefn handle_change_viewport_details_msg(
&mut self,
webview_id: WebViewId,
new_viewport_details: ViewportDetails,
size_type: WindowSizeType,
)
fn handle_change_viewport_details_msg( &mut self, webview_id: WebViewId, new_viewport_details: ViewportDetails, size_type: WindowSizeType, )
Called when the window is resized.
Sourcefn handle_exit_fullscreen_msg(&mut self, webview_id: WebViewId)
fn handle_exit_fullscreen_msg(&mut self, webview_id: WebViewId)
Called when the window exits from fullscreen mode
fn handle_request_screenshot_readiness(&mut self, webview_id: WebViewId)
fn send_screenshot_readiness_requests_to_pipelines(&mut self)
fn handle_screenshot_readiness_response( &mut self, updated_pipeline_id: PipelineId, response: ScreenshotReadinessResponse, )
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_viewport_details: ViewportDetails,
size_type: WindowSizeType,
browsing_context_id: BrowsingContextId,
)
fn resize_browsing_context( &mut self, new_viewport_details: ViewportDetails, 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, webview_id: WebViewId, theme: Theme)
fn handle_theme_change(&mut self, webview_id: WebViewId, theme: Theme)
Handle theme change events from the embedder and forward them to all appropriate ScriptThreads.
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, )
Sourcefn refresh_load_data(&self, pipeline_id: PipelineId) -> Option<LoadData>
fn refresh_load_data(&self, pipeline_id: PipelineId) -> Option<LoadData>
Returns the LoadData associated with the given pipeline if it exists, containing the most recent URL associated with the given pipeline.
fn handle_discard_document( &mut self, webview_id: WebViewId, pipeline_id: PipelineId, )
Sourcefn unload_document(&self, pipeline_id: PipelineId)
fn unload_document(&self, pipeline_id: PipelineId)
Send a message to script requesting the document associated with this pipeline runs the ‘unload’ algorithm.
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, webview_id: WebViewId, ) -> &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)
fn handle_set_scroll_states( &self, pipeline_id: PipelineId, scroll_states: FxHashMap<ExternalScrollId, LayoutVector2D>, )
fn handle_paint_metric( &mut self, pipeline_id: PipelineId, event: PaintMetricEvent, )
fn create_canvas_paint_thread( &self, ) -> (Sender<ConstellationCanvasMsg>, GenericSender<CanvasMsg>)
fn handle_embedder_control_response( &self, id: EmbedderControlId, response: EmbedderControlResponse, )
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