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
Родитель d7e08dcd18
Коммит 826897618a
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -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;
}