Bug 514029: renderCanvas JS error 'cr is null', r=stuart
authorBenjamin Stover <bstover@mozilla.com>
Thu, 03 Sep 2009 18:12:02 -0700
changeset 65529 f951e5b3e7e819adee33d8147815a2adcbde1b81
parent 65528 4cd2e803b2a7175ca3e6b03adacd4948ea00d47b
child 65530 e4e15d5f6d69fe2bec48242770df76a084afcc81
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)
reviewersstuart
bugs514029
Bug 514029: renderCanvas JS error 'cr is null', r=stuart
mobile/chrome/content/BrowserView.js
--- a/mobile/chrome/content/BrowserView.js
+++ b/mobile/chrome/content/BrowserView.js
@@ -173,18 +173,18 @@ BrowserView.Util = {
     if (cdoc instanceof SVGDocument) {
       let rect = cdoc.rootElement.getBoundingClientRect();
       return [Math.ceil(rect.width), Math.ceil(rect.height)];
     }
 
     // These might not exist yet depending on page load state
     let body = cdoc.body || {};
     let html = cdoc.documentElement || {};
-    let w = Math.max(body.scrollWidth || 0, html.scrollWidth);
-    let h = Math.max(body.scrollHeight || 0, html.scrollHeight);
+    let w = Math.max(body.scrollWidth || 1, html.scrollWidth);
+    let h = Math.max(body.scrollHeight || 1, html.scrollHeight);
 
     return [w, h];
   },
 
   getContentScrollValues: function getContentScrollValues(browser) {
     let cwu = BrowserView.Util.getBrowserDOMWindowUtils(browser);
     let scrollX = {};
     let scrollY = {};