aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared
diff options
context:
space:
mode:
Diffstat (limited to 'components/shared')
-rw-r--r--components/shared/compositing/lib.rs6
-rw-r--r--components/shared/script/lib.rs13
-rw-r--r--components/shared/script/script_msg.rs6
3 files changed, 12 insertions, 13 deletions
diff --git a/components/shared/compositing/lib.rs b/components/shared/compositing/lib.rs
index a06261dd86f..8ab45b374ed 100644
--- a/components/shared/compositing/lib.rs
+++ b/components/shared/compositing/lib.rs
@@ -81,8 +81,8 @@ pub enum CompositorMsg {
CreatePng(Option<Rect<f32, CSSPixel>>, IpcSender<Option<Image>>),
/// A reply to the compositor asking if the output image is stable.
IsReadyToSaveImageReply(bool),
- /// Pipeline visibility changed
- PipelineVisibilityChanged(PipelineId, bool),
+ /// Set whether to use less resources by stopping animations.
+ SetThrottled(PipelineId, bool),
/// WebRender has produced a new frame. This message informs the compositor that
/// the frame is ready, so that it may trigger a recomposite.
NewWebRenderFrameReady(bool /* composite_needed */),
@@ -157,7 +157,7 @@ impl Debug for CompositorMsg {
CompositorMsg::TouchEventProcessed(..) => write!(f, "TouchEventProcessed"),
CompositorMsg::CreatePng(..) => write!(f, "CreatePng"),
CompositorMsg::IsReadyToSaveImageReply(..) => write!(f, "IsReadyToSaveImageReply"),
- CompositorMsg::PipelineVisibilityChanged(..) => write!(f, "PipelineVisibilityChanged"),
+ CompositorMsg::SetThrottled(..) => write!(f, "SetThrottled"),
CompositorMsg::PipelineExited(..) => write!(f, "PipelineExited"),
CompositorMsg::NewWebRenderFrameReady(..) => write!(f, "NewWebRenderFrameReady"),
CompositorMsg::PendingPaintMetric(..) => write!(f, "PendingPaintMetric"),
diff --git a/components/shared/script/lib.rs b/components/shared/script/lib.rs
index 071efd92a02..76d0e74bd31 100644
--- a/components/shared/script/lib.rs
+++ b/components/shared/script/lib.rs
@@ -312,11 +312,10 @@ pub enum ConstellationControlMsg {
GetTitle(PipelineId),
/// Notifies script thread of a change to one of its document's activity
SetDocumentActivity(PipelineId, DocumentActivity),
- /// Notifies script thread whether frame is visible
- ChangeFrameVisibilityStatus(PipelineId, bool),
- /// Notifies script thread that frame visibility change is complete
- /// PipelineId is for the parent, BrowsingContextId is for the nested browsing context
- NotifyVisibilityChange(PipelineId, BrowsingContextId, bool),
+ /// Set whether to use less resources by running timers at a heavily limited rate.
+ SetThrottled(PipelineId, bool),
+ /// Notify the containing iframe (in PipelineId) that the nested browsing context (BrowsingContextId) is throttled.
+ SetThrottledInContainingIframe(PipelineId, BrowsingContextId, bool),
/// Notifies script thread that a url should be loaded in this iframe.
/// PipelineId is for the parent, BrowsingContextId is for the nested browsing context
NavigateIframe(
@@ -416,8 +415,8 @@ impl fmt::Debug for ConstellationControlMsg {
SetScrollState(..) => "SetScrollState",
GetTitle(..) => "GetTitle",
SetDocumentActivity(..) => "SetDocumentActivity",
- ChangeFrameVisibilityStatus(..) => "ChangeFrameVisibilityStatus",
- NotifyVisibilityChange(..) => "NotifyVisibilityChange",
+ SetThrottled(..) => "SetThrottled",
+ SetThrottledInContainingIframe(..) => "SetThrottledInContainingIframe",
NavigateIframe(..) => "NavigateIframe",
PostMessage { .. } => "PostMessage",
UpdatePipelineId(..) => "UpdatePipelineId",
diff --git a/components/shared/script/script_msg.rs b/components/shared/script/script_msg.rs
index cc569653dcd..ff854b8d26f 100644
--- a/components/shared/script/script_msg.rs
+++ b/components/shared/script/script_msg.rs
@@ -215,8 +215,8 @@ pub enum ScriptMsg {
/// Notification that this iframe should be removed.
/// Returns a list of pipelines which were closed.
RemoveIFrame(BrowsingContextId, IpcSender<Vec<PipelineId>>),
- /// Notifies constellation that an iframe's visibility has been changed.
- VisibilityChangeComplete(bool),
+ /// Successful response to [crate::ConstellationControlMsg::SetThrottled].
+ SetThrottledComplete(bool),
/// A load has been requested in an IFrame.
ScriptLoadedURLInIFrame(IFrameLoadInfoWithData),
/// A load of the initial `about:blank` has been completed in an IFrame.
@@ -304,7 +304,7 @@ impl fmt::Debug for ScriptMsg {
ReplaceHistoryState(..) => "ReplaceHistoryState",
JointSessionHistoryLength(..) => "JointSessionHistoryLength",
RemoveIFrame(..) => "RemoveIFrame",
- VisibilityChangeComplete(..) => "VisibilityChangeComplete",
+ SetThrottledComplete(..) => "SetThrottledComplete",
ScriptLoadedURLInIFrame(..) => "ScriptLoadedURLInIFrame",
ScriptNewIFrame(..) => "ScriptNewIFrame",
ScriptNewAuxiliary(..) => "ScriptNewAuxiliary",