Bug 1084321 - Remove b2g app meta viewport work-around. r=kats,roc

This commit is contained in:
Chris Lord 2014-11-04 17:15:30 +00:00
Родитель ab3a404727
Коммит 4dad620994
7 изменённых файлов: 8 добавлений и 26 удалений

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

@ -7728,32 +7728,6 @@ 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;

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

@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>Scrolling by pages with fixed-pos headers and footers</title>
<style>
.fp { position:fixed; left:0; width:100%; }

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

@ -1,6 +1,7 @@
<!DOCTYPE HTML>
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>Scrolling by pages with fixed-pos headers and footers</title>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />

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

@ -5,6 +5,7 @@
-->
<html>
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>reference background-image-rendering: -moz-crisp-edges</title>
<style>
html
@ -13,6 +14,7 @@ background-image: url('big.png');
background-attachment:fixed;
background-position: 20px 20px;
background-repeat: no-repeat;
overflow: hidden;
}
</style>
</head>

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

@ -5,6 +5,7 @@
-->
<html reftest-zoom="5">
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>test background-image-rendering: -moz-crisp-edges</title>
<style>
html
@ -14,6 +15,7 @@ image-rendering: -moz-crisp-edges;
background-attachment:fixed;
background-position: 4px 4px;
background-repeat: no-repeat;
overflow: hidden;
}
</style>
</head>

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

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" reftest-zoom="0.6">
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>Test for bug 541270 (SVG Effects area)</title>
<style type="text/css">
html, body, div { display: block; width: 100%; height: 100%; border: none; margin: 0; padding: 0; }

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

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml" reftest-zoom="0.6">
<head>
<meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no" />
<title>Test for bug 541270 (SVG Effects area)</title>
<style type="text/css">
html, body, div { display: block; width: 100%; height: 100%; border: none; margin: 0; padding: 0; }