pub struct Pipeline {Show 19 fields
pub id: PipelineId,
pub browsing_context_id: BrowsingContextId,
pub webview_id: WebViewId,
pub opener: Option<BrowsingContextId>,
pub event_loop: Rc<EventLoop>,
pub paint_proxy: PaintProxy,
pub url: ServoUrl,
pub animation_state: AnimationState,
pub document_callbacks_active: bool,
pub worker_callbacks_active: FxHashSet<WorkerId>,
pub last_callbacks_active_sent_to_paint: bool,
pub children: Vec<BrowsingContextId>,
pub load_data: LoadData,
pub history_state_id: Option<HistoryStateId>,
pub history_states: HashSet<HistoryStateId>,
pub completely_loaded: bool,
pub title: String,
pub focus_sequence: FocusSequenceNumber,
has_active_document: bool,
}Expand description
A Pipeline is the constellation’s view of a Window. Each pipeline has an event loop
(executed by a script thread). A script thread may be responsible for many pipelines.
Fields§
§id: PipelineIdThe ID of the pipeline.
browsing_context_id: BrowsingContextIdThe ID of the browsing context that contains this Pipeline.
webview_id: WebViewIdThe WebViewId of the WebView that contains this Pipeline.
opener: Option<BrowsingContextId>§event_loop: Rc<EventLoop>The event loop handling this pipeline.
paint_proxy: PaintProxyA channel to Paint.
url: ServoUrlThe most recently loaded URL in this pipeline. Note that this URL can change, for example if the page navigates to a hash URL.
animation_state: AnimationStateWhether this pipeline is currently running animations. Pipelines that are running animations cause composites to be continually scheduled.
document_callbacks_active: boolWhether the document for this pipeline has active animation frame callbacks.
worker_callbacks_active: FxHashSet<WorkerId>Workers in this pipeline with active animation frame callbacks.
last_callbacks_active_sent_to_paint: boolThe last aggregate animation-callback state sent to Paint.
children: Vec<BrowsingContextId>The child browsing contexts of this pipeline (these are iframes in the document).
load_data: LoadDataThe Load Data used to create this pipeline.
history_state_id: Option<HistoryStateId>The active history state for this pipeline.
history_states: HashSet<HistoryStateId>The history states owned by this pipeline.
completely_loaded: boolHas this pipeline received a notification that it is completely loaded?
title: StringThe title of this pipeline’s document.
focus_sequence: FocusSequenceNumberThe FocusSequenceNumber of this Pipeline.
has_active_document: boolWhether or not this Pipeline has an actively loading/loaded document. When there is
no active document, the Pipeline will never be unthrottled. Throttled pipelines do
not update animations and their timers are slowed.
Implementations§
Source§impl Pipeline
impl Pipeline
Sourcepub(crate) fn spawn<STF: ScriptThreadFactory, SWF: ServiceWorkerManagerFactory>(
new_pipeline_info: NewPipelineInfo,
event_loop: Rc<EventLoop>,
constellation: &Constellation<STF, SWF>,
webview_hidden: bool,
) -> Result<Self, SendError>
pub(crate) fn spawn<STF: ScriptThreadFactory, SWF: ServiceWorkerManagerFactory>( new_pipeline_info: NewPipelineInfo, event_loop: Rc<EventLoop>, constellation: &Constellation<STF, SWF>, webview_hidden: bool, ) -> Result<Self, SendError>
Possibly starts a script thread, in a new process if requested.
Sourcepub fn new_already_spawned(
id: PipelineId,
browsing_context_id: BrowsingContextId,
webview_id: WebViewId,
opener: Option<BrowsingContextId>,
event_loop: Rc<EventLoop>,
paint_proxy: PaintProxy,
webview_hidden: bool,
load_data: LoadData,
) -> Self
pub fn new_already_spawned( id: PipelineId, browsing_context_id: BrowsingContextId, webview_id: WebViewId, opener: Option<BrowsingContextId>, event_loop: Rc<EventLoop>, paint_proxy: PaintProxy, webview_hidden: bool, load_data: LoadData, ) -> Self
Creates a new Pipeline, after it has been spawned in its EventLoop.
Sourcepub fn send_exit_message_to_script(
&self,
discard_bc: DiscardBrowsingContext,
) -> bool
pub fn send_exit_message_to_script( &self, discard_bc: DiscardBrowsingContext, ) -> bool
Let the ScriptThread for this Pipeline know that it has exited. If the ScriptThread hasn’t
panicked and is still alive, it will send a PipelineExited message back to the Constellation
when it finishes cleaning up.
Returns true if the channel is still alive or false otherwise.
Sourcepub fn set_activity(&self, activity: DocumentActivity)
pub fn set_activity(&self, activity: DocumentActivity)
Notify this pipeline of its activity.
Sourcepub fn to_sendable(&self) -> CompositionPipeline
pub fn to_sendable(&self) -> CompositionPipeline
Paint’s view of a pipeline.
Sourcepub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn add_child(&mut self, browsing_context_id: BrowsingContextId)
Add a new child browsing context.
Sourcepub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
pub fn remove_child(&mut self, browsing_context_id: BrowsingContextId)
Remove a child browsing context.
Sourcepub(crate) fn set_has_active_document(&mut self, has_active_document: bool)
pub(crate) fn set_has_active_document(&mut self, has_active_document: bool)
Set whether or not this Pipeline has an active document.
Sourcepub(crate) fn send_throttle_messages(&self, throttled: bool)
pub(crate) fn send_throttle_messages(&self, throttled: bool)
Set whether this Pipeline is throttled or unthrottled. If the Pipeline
does not have an active Document, it will not be unthrottled until it does.
Auto Trait Implementations§
impl Freeze for Pipeline
impl !RefUnwindSafe for Pipeline
impl !Send for Pipeline
impl !Sync for Pipeline
impl Unpin for Pipeline
impl UnsafeUnpin for Pipeline
impl !UnwindSafe for Pipeline
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