diff options
author | Delan Azabani <dazabani@igalia.com> | 2024-03-22 14:06:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-22 06:06:28 +0000 |
commit | 8882507ad06b598fb43d8542c67ad76daeda739c (patch) | |
tree | 5d78c92d40aab37a71f87c6f5a1df0c5218e81c5 /components/shared/script/lib.rs | |
parent | 9b26dca141159ddc75266de9ef5a54f537450921 (diff) | |
download | servo-8882507ad06b598fb43d8542c67ad76daeda739c.tar.gz servo-8882507ad06b598fb43d8542c67ad76daeda739c.zip |
Rework “visible” to “throttled” in constellation + script + compositor (#31816)
Diffstat (limited to 'components/shared/script/lib.rs')
-rw-r--r-- | components/shared/script/lib.rs | 13 |
1 files changed, 6 insertions, 7 deletions
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", |