Commit 82689761 authored by Thomas Wisniewski's avatar Thomas Wisniewski
Browse files

Bug 1595086 - also freeze the presshell when setActive(false) is called to...

Bug 1595086 - also freeze the presshell when setActive(false) is called to stop requestAnimationFrames; r=smaug

also freeze the presshell when setActive(false) is called to stop requestAnimationFrames

Differential Revision: https://phabricator.services.mozilla.com/D55343

--HG--
extra : moz-landing-system : lando
parent d7e08dcd
...@@ -263,9 +263,11 @@ class GeckoViewContentChild extends GeckoViewChildModule { ...@@ -263,9 +263,11 @@ class GeckoViewContentChild extends GeckoViewChildModule {
case "GeckoView:SetActive": case "GeckoView:SetActive":
if (content) { if (content) {
if (!aMsg.data.active) { if (!aMsg.data.active) {
docShell.contentViewer.pausePainting();
content.windowUtils.suspendTimeouts(); content.windowUtils.suspendTimeouts();
this.timeoutsSuspended = true; this.timeoutsSuspended = true;
} else if (this.timeoutsSuspended) { } else if (this.timeoutsSuspended) {
docShell.contentViewer.resumePainting();
content.windowUtils.resumeTimeouts(); content.windowUtils.resumeTimeouts();
this.timeoutsSuspended = false; this.timeoutsSuspended = false;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment