Rework “visible” to “throttled” in constellation + script + compositor (#31816)

This commit is contained in:
Delan Azabani 2024-03-22 14:06:28 +08:00 committed by GitHub
parent 9b26dca141
commit 8882507ad0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 124 additions and 129 deletions

View file

@ -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",