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
This commit is contained in:
Thomas Wisniewski 2019-12-05 13:29:08 +00:00
parent d7e08dcd18
commit 826897618a

View File

@ -263,9 +263,11 @@ class GeckoViewContentChild extends GeckoViewChildModule {
case "GeckoView:SetActive":
if (content) {
if (!aMsg.data.active) {
docShell.contentViewer.pausePainting();
content.windowUtils.suspendTimeouts();
this.timeoutsSuspended = true;
} else if (this.timeoutsSuspended) {
docShell.contentViewer.resumePainting();
content.windowUtils.resumeTimeouts();
this.timeoutsSuspended = false;
}