зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1511375 - Update the visual viewport size in UpdateResolution() if either the zoom or the display size might have changed. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D13578 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
1ca919f882
Коммит
cad1533d02
|
@ -329,15 +329,19 @@ void MobileViewportManager::UpdateResolution(
|
|||
}
|
||||
}
|
||||
|
||||
// If the zoom has changed, update the pres shell resolution and the
|
||||
// visual viewport size accordingly.
|
||||
// If the zoom has changed, update the pres shell resolution accordingly.
|
||||
if (newZoom) {
|
||||
LayoutDeviceToLayerScale resolution = ZoomToResolution(*newZoom, cssToDev);
|
||||
MVM_LOG("%p: setting resolution %f\n", this, resolution.scale);
|
||||
mPresShell->SetResolutionAndScaleTo(resolution.scale);
|
||||
|
||||
MVM_LOG("%p: New zoom is %f\n", this, newZoom->scale);
|
||||
UpdateVisualViewportSize(aDisplaySize, *newZoom);
|
||||
}
|
||||
|
||||
// The visual viewport size depends on both the zoom and the display size,
|
||||
// and needs to be updated if either might have changed.
|
||||
if (newZoom || aType == UpdateType::ViewportSize) {
|
||||
UpdateVisualViewportSize(aDisplaySize, newZoom ? *newZoom : zoom);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче