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 2018-12-05 02:55:25 +00:00
parent ed617be144
commit 0f0088f7ee

View File

@ -401,10 +401,6 @@ void MobileViewportManager::RefreshVisualViewportSize() {
// This function is a subset of RefreshViewportSize, and only updates the
// visual viewport size.
if (!gfxPrefs::APZAllowZooming()) {
return;
}
ScreenIntSize displaySize = ViewAs<ScreenPixel>(
mDisplaySize, PixelCastJustification::LayoutDeviceIsScreenForBounds);
@ -480,6 +476,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();