Bug 480894: CanvasBrowser._drawInterval is never shut off when loading page via cmdline, r=gavin r=tglek
authorMark Finkle <mfinkle@mozilla.com>
Fri, 27 Mar 2009 11:57:20 -0500
changeset 65142 9b2ecbf64a9ab0852f6398fcedd0c18c5ac10408
parent 65141 ed493d9428251bddc0c654be41292a176b89a3eb
child 65143 a5635142cef593cd8f5c79b1dcdd8d2e88c193d9
push idunknown
push userunknown
push dateunknown
reviewersgavin, tglek
bugs480894
Bug 480894: CanvasBrowser._drawInterval is never shut off when loading page via cmdline, r=gavin r=tglek
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -1054,20 +1054,20 @@ ProgressController.prototype = {
   },
 
   // This method is called to indicate a change to the current location.
   onLocationChange: function(aWebProgress, aRequest, aLocationURI) {
     // XXX this code is not multiple-tab friendly.
     var location = aLocationURI ? aLocationURI.spec : "";
     let selectedBrowser = Browser.selectedBrowser;
     let lastURI = selectedBrowser.lastURI;
+
     //don't do anything for about:blank or about:firstrun on first display
-    if (!lastURI && (location == "about:blank" || location == "about:firstrun" )) {
+    if (!lastURI && (location == "about:blank" || location == "about:firstrun" ))
       return;
-    }
 
     this._hostChanged = true;
 
     // This code here does not compare uris exactly when determining
     // whether or not the message(s) should be hidden since the message
     // may be prematurely hidden when an install is invoked by a click
     // on a link that looks like this:
     //
@@ -1117,31 +1117,30 @@ ProgressController.prototype = {
         this.browser.markupDocumentViewer.textZoom = kDefaultTextZoom;
     }
   },
 
   _networkStop: function() {
     this._tab.setLoading(false);
 
     if (Browser.selectedBrowser == this.browser) {
+      Browser.canvasBrowser.endLoading();
       BrowserUI.update(TOOLBARSTATE_LOADED);
       this.browser.docShell.isOffScreenBrowser = true;
     }
   },
 
   _documentStop: function() {
     // translate any phone numbers
     Browser.translatePhoneNumbers();
 
     if (Browser.selectedBrowser == this.browser) {
       // focus the dom window
       if (this.browser.currentURI.spec != "about:blank")
         this.browser.contentWindow.focus();
-
-      Browser.canvasBrowser.endLoading();
     }
     if (!this._isStartup)
       this._tab.updateThumbnail();
   },
 
  // Properties used to cache security state used to update the UI
   _state: null,
   _host: undefined,