pub struct Constellation<STF, SWF> {Show 63 fields
namespace_receiver: RoutedReceiver<PipelineNamespaceRequest>,
pub(crate) namespace_ipc_sender: GenericSender<PipelineNamespaceRequest>,
event_loops: Vec<Weak<EventLoop>>,
pub(crate) script_sender: GenericSender<(WebViewId, PipelineId, ScriptToConstellationMessage)>,
script_receiver: Receiver<Result<(WebViewId, PipelineId, ScriptToConstellationMessage), IpcError>>,
pub(crate) background_monitor_register: Option<Box<dyn BackgroundHangMonitorRegister>>,
background_monitor_register_join_handle: Option<JoinHandle<()>>,
background_monitor_control_sender: Option<GenericSender<BackgroundHangMonitorControlMsg>>,
pub(crate) background_hang_monitor_sender: GenericSender<HangMonitorAlert>,
background_hang_monitor_receiver: RoutedReceiver<HangMonitorAlert>,
pub(crate) layout_factory: Arc<dyn LayoutFactory>,
embedder_to_constellation_receiver: Receiver<EmbedderToConstellationMessage>,
pub(crate) embedder_proxy: EmbedderProxy,
pub(crate) constellation_to_embedder_proxy: GenericEmbedderProxy<ConstellationToEmbedderMsg>,
pub(crate) paint_proxy: PaintProxy,
webviews: FxHashMap<WebViewId, ConstellationWebView>,
pub(crate) public_resource_threads: ResourceThreads,
pub(crate) private_resource_threads: ResourceThreads,
pub(crate) public_storage_threads: StorageThreads,
pub(crate) private_storage_threads: StorageThreads,
pub(crate) system_font_service: Arc<SystemFontServiceProxy>,
pub(crate) devtools_sender: Option<Sender<DevtoolsControlMsg>>,
pub script_to_devtools_callback: OnceCell<Option<GenericCallback<ScriptToDevtoolsControlMsg>>>,
pub(crate) bluetooth_ipc_sender: GenericSender<BluetoothRequest>,
sw_managers: HashMap<ImmutableOrigin, GenericSender<ServiceWorkerMsg>>,
pub(crate) time_profiler_chan: ProfilerChan,
pub(crate) mem_profiler_chan: ProfilerChan,
webrender_wgpu: WebRenderWGPU,
message_ports: FxHashMap<MessagePortId, MessagePortInfo>,
message_port_routers: FxHashMap<MessagePortRouterId, GenericCallback<MessagePortMsg>>,
broadcast_channels: BroadcastChannels,
pipeline_interests: FxHashMap<ConstellationInterest, FxHashSet<PipelineId>>,
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: Cell<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)>,
pub(crate) webgl_threads: Option<WebGLThreads>,
pub(crate) webxr_registry: Option<Registry>,
canvas: OnceCell<(Sender<ConstellationCanvasMsg>, GenericSender<CanvasMsg>)>,
pending_approval_navigations: FxHashMap<PipelineId, PendingApprovalNavigation>,
pressed_mouse_buttons: u16,
active_keyboard_modifiers: Modifiers,
hard_fail: bool,
active_media_session: Option<PipelineId>,
screen_wake_lock_count: u32,
wake_lock_provider: Box<dyn WakeLockDelegate>,
pub(crate) broken_image_icon_data: Vec<u8>,
pub(crate) process_manager: ProcessManager,
async_runtime: Box<dyn AsyncRuntime>,
event_loop_join_handles: Vec<JoinHandle<()>>,
pub(crate) privileged_urls: Vec<ServoUrl>,
pub(crate) image_cache_factory: Arc<ImageCacheFactoryImpl>,
pending_viewport_changes: HashMap<BrowsingContextId, ViewportDetails>,
screenshot_readiness_requests: Vec<ScreenshotReadinessRequest>,
pub(crate) user_contents_for_manager_id: FxHashMap<UserContentManagerId, UserContents>,
}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>§event_loops: Vec<Weak<EventLoop>>A Vec of all EventLoops that have been created for this Constellation.
This will be cleaned up periodically. This stores weak references so that EventLoops
can be stopped when they are no longer used.
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), IpcError>>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_sender: Option<GenericSender<BackgroundHangMonitorControlMsg>>When running in single-process mode, this is a channel to the shared BackgroundHangMonitor
for all EventLoops. This will be None in multiprocess mode.
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. This is not used by the Constellation
itself but only needed to create an EventLoop.
Messages from the Constellation to the embedder are sent using the constellation_to_embedder_proxy
constellation_to_embedder_proxy: GenericEmbedderProxy<ConstellationToEmbedderMsg>A channel through which messages can be sent to the embedder.
paint_proxy: PaintProxyA channel (the implementation of which is port-specific) for the
constellation to send messages to Paint.
webviews: FxHashMap<WebViewId, 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.
script_to_devtools_callback: OnceCell<Option<GenericCallback<ScriptToDevtoolsControlMsg>>>A (potentially) IPC-based channel to the developer tools, if enabled. This allows
EventLoops to send messages to then. Shared with all EventLoops.
bluetooth_ipc_sender: GenericSender<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.
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, GenericCallback<MessagePortMsg>>A map of router-id to ipc-sender, to route messages to ports.
broadcast_channels: BroadcastChannelsBookkeeping for BroadcastChannel functionnality.
pipeline_interests: FxHashMap<ConstellationInterest, FxHashSet<PipelineId>>Tracks which pipelines have registered interest in each notification category.
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: Cell<PipelineNamespaceId>Pipeline 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)>A GenericSender 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.
screen_wake_lock_count: u32Aggregate screen wake lock count across all webviews. The provider is notified only when this transitions 0→1 (acquire) or N→0 (release).
wake_lock_provider: Box<dyn WakeLockDelegate>Provider for OS-level screen wake lock acquisition and release.
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.
process_manager: ProcessManagerThe process manager.
async_runtime: Box<dyn AsyncRuntime>The async runtime.
event_loop_join_handles: Vec<JoinHandle<()>>A vector of JoinHandles used to ensure full termination of threaded EventLoops
which are runnning in the same process.
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.
user_contents_for_manager_id: FxHashMap<UserContentManagerId, UserContents>A map from UserContentManagerId to the UserContents for that manager.
Multiple WebViews can share the same UserContentManager and any mutations
to the UserContents need to be forwared to all the ScriptThreads that host
the relevant WebView.
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.
fn event_loops(&self) -> Vec<Rc<EventLoop>>
pub(crate) fn add_event_loop(&mut self, event_loop: &Rc<EventLoop>)
pub(crate) fn add_event_loop_join_handle(&mut self, join_handle: JoinHandle<()>)
fn clean_up_finished_script_event_loops(&mut self)
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.
Sourcepub(crate) fn next_pipeline_namespace_id(&self) -> PipelineNamespaceId
pub(crate) fn next_pipeline_namespace_id(&self) -> PipelineNamespaceId
Generate a new pipeline id namespace.
fn next_browsing_context_group_id(&mut self) -> BrowsingContextGroupId
fn get_event_loop( &self, host: &Host, webview_id: &WebViewId, opener: &Option<BrowsingContextId>, ) -> Result<Weak<EventLoop>, &'static str>
fn set_event_loop( &mut self, event_loop: &Rc<EventLoop>, host: Host, webview_id: WebViewId, opener: Option<BrowsingContextId>, )
fn get_event_loop_for_new_pipeline( &self, load_data: &LoadData, webview_id: WebViewId, opener: Option<BrowsingContextId>, parent_pipeline_id: Option<PipelineId>, registered_domain_name: &Option<Host>, ) -> Option<Rc<EventLoop>>
fn get_or_create_event_loop_for_new_pipeline( &mut self, webview_id: WebViewId, opener: Option<BrowsingContextId>, parent_pipeline_id: Option<PipelineId>, load_data: &LoadData, is_private: bool, ) -> Result<Rc<EventLoop>, IpcError>
Sourcefn new_pipeline(
&mut self,
new_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,
target_snapshot_params: TargetSnapshotParams,
)
fn new_pipeline( &mut self, new_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, target_snapshot_params: TargetSnapshotParams, )
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 Paint.
fn handle_request_for_pipeline_namespace( &mut self, request: PipelineNamespaceRequest, )
fn handle_request_from_background_hang_monitor(&self, message: HangMonitorAlert)
fn handle_request_from_embedder( &mut self, message: EmbedderToConstellationMessage, )
fn mutate_user_contents_for_manager_id_and_notify_script_threads( &mut self, user_content_manager_id: UserContentManagerId, callback: impl FnOnce(&mut UserContents), )
fn handle_user_content_manager_action( &mut self, user_content_manager_id: UserContentManagerId, action: UserContentManagerAction, )
fn send_message_to_all_background_hang_monitors( &self, message: BackgroundHangMonitorControlMsg, )
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_callbacks: GenericCallback<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_serviceworker_algorithm(
&mut self,
pipeline_id: PipelineId,
algorithm: ServiceWorkerAlgorithm,
)
fn handle_serviceworker_algorithm( &mut self, pipeline_id: PipelineId, algorithm: ServiceWorkerAlgorithm, )
https://www.w3.org/TR/service-workers/#algorithms Algorithms invoked from in-parallel steps run on the service worker mananager, per origin and routed by the constellation.
fn handle_broadcast_storage_event( &self, pipeline_id: PipelineId, storage: WebStorageType, 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, error: SendError)
fn handle_panic( &mut self, event_loop_id: Option<ScriptEventLoopId>, reason: String, backtrace: Option<String>, )
fn handle_panic_in_webview( &mut self, webview_id: WebViewId, reason: &String, backtrace: &Option<String>, )
fn handle_focus_web_view(&mut self, webview_id: WebViewId)
fn handle_log_entry( &mut self, event_loop_id: Option<ScriptEventLoopId>, thread_name: Option<String>, entry: LogEntry, )
fn update_active_keybord_modifiers(&mut self, event: &KeyboardEvent)
fn set_accessibility_active(&mut self, webview_id: WebViewId, active: bool)
fn forward_input_event( &mut self, webview_id: WebViewId, event: InputEventAndId, hit_test_result: Option<PaintHitTestResult>, )
fn handle_new_top_level_browsing_context( &mut self, url: ServoUrl, _: NewWebViewDetails, )
Sourcefn handle_close_top_level_browsing_context(&mut self, webview_id: WebViewId)
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, target_snapshot_params: TargetSnapshotParams, ) -> 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: GenericSender<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_ancestor_browsing_contexts_for_focusing_steps( &mut self, pipeline_id: PipelineId, focused_child_browsing_context_id: Option<BrowsingContextId>, sequence: FocusSequenceNumber, )
fn handle_focus_remote_browsing_context( &mut self, target: BrowsingContextId, operation: RemoteFocusOperation, )
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: GenericSender<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, change: &SessionHistoryChange, ) -> 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)
Sourcefn browsing_context_to_sendable(
&self,
browsing_context_id: BrowsingContextId,
) -> Option<SendableFrameTree>
fn browsing_context_to_sendable( &self, browsing_context_id: BrowsingContextId, ) -> Option<SendableFrameTree>
Convert a browsing context to a tree of active pipeline ids, for sending to Paint.
Sourcefn set_frame_tree_for_webview(&mut self, webview_id: WebViewId)
fn set_frame_tree_for_webview(&mut self, webview_id: WebViewId)
Send the frame tree for the given webview to Paint.
fn handle_media_session_action_msg(&mut self, action: MediaSessionActionType)
fn handle_set_scroll_states( &self, pipeline_id: PipelineId, scroll_states: ScrollStateUpdate, )
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, )
fn handle_update_pinch_zoom_infos( &self, pipeline_id: PipelineId, pinch_zoom_infos: PinchZoomInfos, )
pub(crate) fn script_to_devtools_callback( &self, ) -> Option<GenericCallback<ScriptToDevtoolsControlMsg>>
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> UnsafeUnpin 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