This commit is contained in:
Wes Johnston 2013-01-22 17:27:01 -08:00
Родитель 9590a48867
Коммит bfb081c78c
1 изменённых файлов: 2 добавлений и 12 удалений

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

@ -162,12 +162,6 @@ var BrowserApp = {
_tabs: [],
_selectedTab: null,
get isTablet() {
let sysInfo = Cc["@mozilla.org/system-info;1"].getService(Ci.nsIPropertyBag2);
delete this.isTablet;
return this.isTablet = sysInfo.get("tablet");
},
deck: null,
startup: function startup() {
@ -1074,8 +1068,7 @@ var BrowserApp = {
scrollToFocusedInput: function(aBrowser, aAllowZoom = true) {
let focused = this.getFocusedInput(aBrowser);
if (focused && !this.isTablet && !ViewportHandler.getViewportMetadata(aBrowser.contentWindow).hasMetaViewport) {
if (focused) {
// _zoomToElement will handle not sending any message if this input is already mostly filling the screen
BrowserEventHandler._zoomToElement(focused, -1, false, aAllowZoom);
}
@ -5432,7 +5425,6 @@ var ViewportHandler = {
// Note: These values will be NaN if parseFloat or parseInt doesn't find a number.
// Remember that NaN is contagious: Math.max(1, NaN) == Math.min(1, NaN) == NaN.
let hasMetaViewport = true;
let scale = parseFloat(windowUtils.getDocumentMetadata("viewport-initial-scale"));
let minScale = parseFloat(windowUtils.getDocumentMetadata("viewport-minimum-scale"));
let maxScale = parseFloat(windowUtils.getDocumentMetadata("viewport-maximum-scale"));
@ -5460,7 +5452,6 @@ var ViewportHandler = {
if (doctype && /(WAP|WML|Mobile)/.test(doctype.publicId))
return { defaultZoom: 1, autoSize: true, allowZoom: true };
hasMetaViewport = false;
let defaultZoom = Services.prefs.getIntPref("browser.viewport.defaultZoom");
if (defaultZoom >= 0) {
scale = defaultZoom / 1000;
@ -5485,8 +5476,7 @@ var ViewportHandler = {
width: width,
height: height,
autoSize: autoSize,
allowZoom: allowZoom,
hasMetaViewport: hasMetaViewport
allowZoom: allowZoom
};
},