Bug 1197592 - Don't set an SPCSPS in the mobile viewport manager if APZ zooming is not enabled. r=botond

--HG--
extra : commitid : k3dsO29PIm
This commit is contained in:
Kartikaya Gupta 2015-08-24 13:45:44 -04:00
Родитель aeacc8883e
Коммит 50d8193e09
1 изменённых файлов: 6 добавлений и 9 удалений

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

@ -116,11 +116,6 @@ MobileViewportManager::UpdateResolution(const nsViewportInfo& aViewportInfo,
/ mPresShell->GetPresContext()->AppUnitsPerDevPixel());
LayoutDeviceToLayerScale res(nsLayoutUtils::GetResolution(mPresShell));
if (!gfxPrefs::APZAllowZooming()) {
return ViewTargetAs<ScreenPixel>(cssToDev * res / ParentLayerToLayerScale(1),
PixelCastJustification::ScreenIsParentLayerForRoot);
}
if (mIsFirstPaint) {
CSSToScreenScale defaultZoom = aViewportInfo.GetDefaultZoom();
MVM_LOG("%p: default zoom from viewport is %f\n", this, defaultZoom.scale);
@ -272,10 +267,12 @@ MobileViewportManager::RefreshViewportSize(bool aForceAdjustResolution)
MVM_LOG("%p: Updating properties because %d || %d\n", this,
mIsFirstPaint, mMobileViewportSize != viewport);
CSSToScreenScale zoom = UpdateResolution(viewportInfo, displaySize, viewport,
displayWidthChangeRatio);
MVM_LOG("%p: New zoom is %f\n", this, zoom.scale);
UpdateSPCSPS(displaySize, zoom);
if (gfxPrefs::APZAllowZooming()) {
CSSToScreenScale zoom = UpdateResolution(viewportInfo, displaySize, viewport,
displayWidthChangeRatio);
MVM_LOG("%p: New zoom is %f\n", this, zoom.scale);
UpdateSPCSPS(displaySize, zoom);
}
UpdateDisplayPortMargins();
// Update internal state.