Bug 640997 - Always update the viewport size, even if it appears unchanged [r=mfinkle, a=blocking]
authorMatt Brubeck <mbrubeck@mozilla.com>
Fri, 11 Mar 2011 17:12:09 -0800
changeset 67505 cc633f9983cc9ef2268977272f1bc6b5d4221ed5
parent 67504 b9601dd729b9aa2731bd50bb75d7ee9a89e5f8f0
child 67506 31be3e9a5400ecc96c651d960006a80ecc4dfe60
push id1
push userroot
push dateTue, 26 Apr 2011 22:38:44 +0000
treeherdermozilla-beta@bfdb6e623a36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmfinkle, blocking
bugs640997
Bug 640997 - Always update the viewport size, even if it appears unchanged [r=mfinkle, a=blocking]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2494,19 +2494,17 @@ Tab.prototype = {
         viewportW = this.useFallbackWidth ? kFallbackBrowserWidth : kDefaultBrowserWidth;
         viewportH = kDefaultBrowserWidth * (screenH / screenW);
 
         // Make sure the viewport height is not shorter than the window when
         // the page is zoomed out to show its full width.
         viewportH = Math.max(viewportH, screenH * (browser.contentDocumentWidth / screenW));
       }
     }
-
-    if (browser.contentWindowWidth != viewportW || browser.contentWindowHeight != viewportH)
-      browser.setWindowSize(viewportW, viewportH);
+    browser.setWindowSize(viewportW, viewportH);
   },
 
   restoreViewportPosition: function restoreViewportPosition(aOldWidth, aNewWidth) {
     let browser = this._browser;
 
     // zoom to keep the same portion of the document visible
     let oldScale = browser.scale;
     let newScale = this.clampZoomLevel(oldScale * aNewWidth / aOldWidth);