Backed out changeset a043578146a6 for incorrect attribution
authorMyk Melez <myk@mozilla.org>
Fri, 11 Jul 2014 09:23:42 -0700
changeset 193498 0f39a24086dc9e5a18a0f12f5d0bd2993834d482
parent 193497 a043578146a60fa730061cb43165c574e1e34073
child 193499 f3f1735c4c09628eec67f9877ffd328ec6b8bc43
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone33.0a1
backs outa043578146a60fa730061cb43165c574e1e34073
Backed out changeset a043578146a6 for incorrect attribution
mobile/android/chrome/content/browser.js
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -4152,23 +4152,16 @@ Tab.prototype = {
     sendMessageToJava(message);
 
     // The search term is only valid for this location change event, so reset it here.
     this.userSearch = "";
 
     if (!sameDocument) {
       // XXX This code assumes that this is the earliest hook we have at which
       // browser.contentDocument is changed to the new document we're loading
-
-      // We have a new browser and a new window, so the old browserWidth and
-      // browserHeight are no longer valid.  We need to force-set the browser
-      // size to ensure it sets the CSS viewport size before the document
-      // has a chance to check it.
-      this.setBrowserSize(kDefaultCSSViewportWidth, kDefaultCSSViewportHeight, true);
-
       this.contentDocumentIsDisplayed = false;
       this.hasTouchListener = false;
     } else {
       this.sendViewportUpdate();
     }
   },
 
   // Properties used to cache security state used to update the UI
@@ -4462,21 +4455,19 @@ Tab.prototype = {
       defaultZoom: metadata.defaultZoom || window.devicePixelRatio,
       minZoom: metadata.minZoom || 0,
       maxZoom: metadata.maxZoom || 0,
       isRTL: metadata.isRTL,
       tabID: this.id
     });
   },
 
-  setBrowserSize: function(aWidth, aHeight, aForce) {
-    if (!aForce) {
-      if (fuzzyEquals(this.browserWidth, aWidth) && fuzzyEquals(this.browserHeight, aHeight)) {
-        return;
-      }
+  setBrowserSize: function(aWidth, aHeight) {
+    if (fuzzyEquals(this.browserWidth, aWidth) && fuzzyEquals(this.browserHeight, aHeight)) {
+      return;
     }
 
     this.browserWidth = aWidth;
     this.browserHeight = aHeight;
 
     if (!this.browser.contentWindow)
       return;
     let cwu = this.browser.contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils);