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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user