Bug 1449756 - Make DisplayPort suppression PresShell specific and not process global. r=kats

Originally, DisplayPort suppression was a process-global static. This change makes it possible
to control DisplayPort suppression on a per-PresShell basis.

Differential Revision: https://phabricator.services.mozilla.com/D1759
This commit is contained in:
Mike Conley
2018-06-25 21:42:25 +00:00
parent 2824a326f1
commit 1a33d3d8d9
11 changed files with 99 additions and 91 deletions

View File

@@ -1913,7 +1913,9 @@ public:
}
mCallee = aCallee;
APZCCallbackHelper::SuppressDisplayport(true, mCallee->mOuter->PresShell());
if (nsIPresShell* shell = mCallee->mOuter->PresShell()) {
shell->SuppressDisplayport(true);
}
return true;
}
@@ -1938,7 +1940,9 @@ private:
void RemoveObserver() {
if (mCallee) {
RefreshDriver(mCallee)->RemoveRefreshObserver(this, FlushType::Style);
APZCCallbackHelper::SuppressDisplayport(false, mCallee->mOuter->PresShell());
if (nsIPresShell* shell = mCallee->mOuter->PresShell()) {
shell->SuppressDisplayport(false);
}
}
}
};