Bug 578679 - on desktop linux, about:config doesn't display in the browser window [r=mfinkle]
authorVivien Nicolas <21@vingtetun.org>
Wed, 14 Jul 2010 18:44:16 +0200
changeset 66365 f254fa7a10bebc433173fbd5c8f58e85205717dc
parent 66364 241eea888156b6ac0e52e852a369bdc404d31e00
child 66366 9b61ea422c732bb2d982c4987f9920b80898a374
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
bugs578679
Bug 578679 - on desktop linux, about:config doesn't display in the browser window [r=mfinkle]
mobile/chrome/content/BrowserView.js
--- a/mobile/chrome/content/BrowserView.js
+++ b/mobile/chrome/content/BrowserView.js
@@ -592,17 +592,19 @@ BrowserView.prototype = {
     if (threshold < pageZoom && pageZoom < 1)
       pageZoom = 1;
 
     return this.clampZoomLevel(pageZoom);
   },
 
   getPageZoomLevel: function getPageZoomLevel() {
     let bvs = this._browserViewportState;  // browser exists, so bvs must as well
-    let browserW = this.viewportToBrowser(bvs.viewportRect.right);
+
+    // for xul pages, bvs.viewportRect.right can be 0
+    let browserW = this.viewportToBrowser(bvs.viewportRect.right) || 1.0;
     return this.getVisibleRect().width / browserW;
   },
 
   zoom: function zoom(aDirection) {
     let bvs = this._browserViewportState;
     if (!bvs)
       throw "No browser is set";