Backed out changeset 27624d9e8f27 (bug 1084321) for B2G reftest orange.

This commit is contained in:
Ryan VanderMeulen 2014-10-22 15:56:16 -04:00
parent dd1b8e9dc0
commit 4f4f100a5a

View File

@ -7655,6 +7655,32 @@ nsDocument::GetViewportInfo(const ScreenIntSize& aDisplaySize)
/*allowZoom*/true,
/*allowDoubleTapZoom*/false);
}
// Bug 940036. This is bad. When FirefoxOS was built, apps installed
// where not using the AsyncPanZoom code. As a result a lot of apps
// in the marketplace does not use it yet and instead are built to
// render correctly in FirefoxOS only. For a smooth transition the above
// code force installed apps to render as if they have a viewport with
// content="width=device-width, height=device-height, user-scalable=no".
// This could be safely remove once it is known that most apps in the
// marketplace use it and that users does not use an old version of the
// app that does not use it.
nsCOMPtr<nsIDocShell> docShell(mDocumentContainer);
if (docShell && docShell->GetIsApp()) {
nsString uri;
GetDocumentURI(uri);
if (!uri.EqualsLiteral("about:blank")) {
nsContentUtils::ReportToConsole(nsIScriptError::warningFlag,
NS_LITERAL_CSTRING("DOM"), this,
nsContentUtils::eDOM_PROPERTIES,
"ImplicitMetaViewportTagFallback");
}
mViewportType = DisplayWidthHeightNoZoom;
return nsViewportInfo(aDisplaySize,
defaultScale,
/*allowZoom*/false,
/*allowDoubleTapZoom*/false);
}
}
nsAutoString minScaleStr;