Bug 628660 - Gray area when navigating with the form assistant [r=mfinkle,stechz]
authorVivien Nicolas <21@vingtetun.org>
Thu, 27 Jan 2011 21:32:35 +0100
changeset 2709 07ebdaffee36c5a91c95cd62f9f33dc260d11628
parent 2708 218eb4e4dbe61d0269effa15fe57dc27d68eb09a
child 2710 a8e4a7e239b21c20eee21f0375bc3f3420e22d5b
push id2276
push uservnicolas@mozilla.com
push dateThu, 27 Jan 2011 20:36:17 +0000
reviewersmfinkle, stechz
bugs628660
Bug 628660 - Gray area when navigating with the form assistant [r=mfinkle,stechz]
chrome/content/browser.js
--- a/chrome/content/browser.js
+++ b/chrome/content/browser.js
@@ -1036,17 +1036,22 @@ var Browser = {
     let scale = this.selectedTab.clampZoomLevel(zoomLevel);
 
     // Use _contentView and setScale so that the displayport does not update.
     // See bug 628799.
     let view = browser.getRootView();
     view.setScale(scale);
     view._contentView.scrollTo(scrollX, scrollY);
 
-    browser.scale = scale;
+    // If the scale level doesn't change ensure the view is well refreshed
+    // otherwise setting the scale level of the browser will do it
+    if (scale == browser.scale)
+      view._updateCacheViewport();
+    else
+      browser.scale = scale;
   },
 
   zoomToPoint: function zoomToPoint(cX, cY, aRect) {
     let tab = this.selectedTab;
     if (!tab.allowZoom)
       return null;
 
     let zoomRect = null;