Bug 1197824 - Remove unused state and normalize others. r=botond

In the case of DisplayWidthHeight viewports, setting the allowDoubleTapToZoom
flag to true is fine because the ZoomConstraintsClient code will flip it back
to false based on the width of the CSS viewport. Setting it to true in the
GetViewportInfo code allows us to maintain the invariant that the default value
of allowDoubleTapToZoom is the same as the initial value of allowZoom.
This commit is contained in:
Kartikaya Gupta 2015-09-03 10:30:40 -04:00
parent 1f563eaeb2
commit ab26d27635
2 changed files with 2 additions and 8 deletions

View File

@ -7955,11 +7955,6 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
defaultScale,
/*allowZoom*/ true,
/*allowDoubleTapZoom*/ true);
case DisplayWidthHeightNoZoom:
return nsViewportInfo(aDisplaySize,
defaultScale,
/*allowZoom*/ false,
/*allowDoubleTapZoom*/ false);
case Unknown:
{
nsAutoString viewport;
@ -7982,7 +7977,7 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
return nsViewportInfo(aDisplaySize,
defaultScale,
/*allowZoom*/true,
/*allowDoubleTapZoom*/false);
/*allowDoubleTapZoom*/true);
}
}
}
@ -7994,7 +7989,7 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
return nsViewportInfo(aDisplaySize,
defaultScale,
/*allowZoom*/true,
/*allowDoubleTapZoom*/false);
/*allowDoubleTapZoom*/true);
}
}

View File

@ -1850,7 +1850,6 @@ private:
enum ViewportType {
DisplayWidthHeight,
DisplayWidthHeightNoZoom,
Specified,
Unknown
};