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 17:16:34 +00:00
Родитель 1ea7c3efc9
Коммит 268ef43bd7
1 изменённых файлов: 4 добавлений и 4 удалений

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

@ -397,10 +397,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);
@ -476,6 +472,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();