--- 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);