зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1560770 - Use a method of getting the widget in UseMobileViewportManager() than does not require the frame tree to be constructed. r=tnikkel
Differential Revision: https://phabricator.services.mozilla.com/D50121 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
cfdcf5a828
Коммит
432e039626
|
@ -10506,10 +10506,12 @@ RefPtr<MobileViewportManager> PresShell::GetMobileViewportManager() const {
|
|||
bool UseMobileViewportManager(PresShell* aPresShell, Document* aDocument) {
|
||||
// If we're not using APZ, we won't be able to zoom, so there is no
|
||||
// point in having an MVM.
|
||||
if (nsPresContext* presContext = aPresShell->GetPresContext()) {
|
||||
if (nsIWidget* widget = presContext->GetNearestWidget()) {
|
||||
if (!widget->AsyncPanZoomEnabled()) {
|
||||
return false;
|
||||
if (nsViewManager* viewManager = aPresShell->GetViewManager()) {
|
||||
if (nsView* view = viewManager->GetRootView()) {
|
||||
if (nsIWidget* widget = view->GetNearestWidget(nullptr)) {
|
||||
if (!widget->AsyncPanZoomEnabled()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче