mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 942799 - Respect height=device-height in meta viewport tag on B2G. r=mbrubeck,ehsan
This commit is contained in:
parent
4d8d2f3290
commit
62f37ebda5
@ -554,11 +554,6 @@ TabChild::HandlePossibleViewportChange()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make sure the viewport height is not shorter than the window when the page
|
|
||||||
// is zoomed out to show its full width. Note that before we set the viewport
|
|
||||||
// width, the "full width" of the page isn't properly defined, so that's why
|
|
||||||
// we have to call SetCSSViewport twice - once to set the width, and the
|
|
||||||
// second time to figure out the height based on the layout at that width.
|
|
||||||
float oldBrowserWidth = mOldViewportWidth;
|
float oldBrowserWidth = mOldViewportWidth;
|
||||||
mLastMetrics.mViewport.SizeTo(viewport);
|
mLastMetrics.mViewport.SizeTo(viewport);
|
||||||
if (!oldBrowserWidth) {
|
if (!oldBrowserWidth) {
|
||||||
@ -606,13 +601,6 @@ TabChild::HandlePossibleViewportChange()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CSSToScreenScale minScale(mInnerSize.width / pageSize.width);
|
|
||||||
minScale = clamped(minScale, viewportInfo.GetMinZoom(), viewportInfo.GetMaxZoom());
|
|
||||||
NS_ENSURE_TRUE_VOID(minScale.scale); // (return early rather than divide by 0)
|
|
||||||
|
|
||||||
viewport.height = std::max(viewport.height, screenH / minScale.scale);
|
|
||||||
SetCSSViewport(viewport);
|
|
||||||
|
|
||||||
float oldScreenWidth = mLastMetrics.mCompositionBounds.width;
|
float oldScreenWidth = mLastMetrics.mCompositionBounds.width;
|
||||||
if (!oldScreenWidth) {
|
if (!oldScreenWidth) {
|
||||||
oldScreenWidth = mInnerSize.width;
|
oldScreenWidth = mInnerSize.width;
|
||||||
|
Loading…
Reference in New Issue
Block a user