From bfb081c78c1b24122f044d2c706d255c9c602575 Mon Sep 17 00:00:00 2001 From: Wes Johnston Date: Tue, 22 Jan 2013 17:27:01 -0800 Subject: [PATCH] backout 3167daa05ef4 --- mobile/android/chrome/content/browser.js | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/mobile/android/chrome/content/browser.js b/mobile/android/chrome/content/browser.js index 167dbdfa1f0b..8385a178ed01 100644 --- a/mobile/android/chrome/content/browser.js +++ b/mobile/android/chrome/content/browser.js @@ -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 }; },