Bug 1504659 Part 1: Make RefreshVisualViewportSize allow non-APZ zooming, and call it during RefreshViewportSize. r=botond

Differential Revision: https://phabricator.services.mozilla.com/D13173

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Brad Werth 2019-01-16 17:09:24 +00:00
Родитель fcac6b1172
Коммит 0a5341e566
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -430,10 +430,6 @@ void MobileViewportManager::RefreshVisualViewportSize() {
return;
}
if (!gfxPrefs::APZAllowZooming()) {
return;
}
ScreenIntSize displaySize = ViewAs<ScreenPixel>(
mDisplaySize, PixelCastJustification::LayoutDeviceIsScreenForBounds);
@ -513,6 +509,10 @@ void MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution) {
if (gfxPrefs::APZAllowZooming()) {
UpdateResolution(viewportInfo, displaySize, viewport,
displayWidthChangeRatio, UpdateType::ViewportSize);
} else {
// Even without zoom, we need to update that the visual viewport size
// has changed.
RefreshVisualViewportSize();
}
if (gfxPlatform::AsyncPanZoomEnabled()) {
UpdateDisplayPortMargins();