diff --git a/mobile/chrome/content/browser.js b/mobile/chrome/content/browser.js index bb8521b84707..09c0d3f4adbf 100644 --- a/mobile/chrome/content/browser.js +++ b/mobile/chrome/content/browser.js @@ -390,15 +390,16 @@ ProgressController.prototype = { }, onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus) { + // we currently only care if we're getting things for the main document, not sub-frames + if (aWebProgress.DOMWindow != this._browser.contentWindow) { + return; + } + if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_NETWORK) { - if (aRequest && aWebProgress.DOMWindow == this._browser.contentWindow) { - if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) { - BrowserUI.update(TOOLBARSTATE_LOADING, this._browser); - } - else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) { - BrowserUI.update(TOOLBARSTATE_LOADED, this._browser); - } - } + if (aStateFlags & Ci.nsIWebProgressListener.STATE_START) + BrowserUI.update(TOOLBARSTATE_LOADING, this._browser); + else if (aStateFlags & Ci.nsIWebProgressListener.STATE_STOP) + BrowserUI.update(TOOLBARSTATE_LOADED, this._browser); } if (aStateFlags & Ci.nsIWebProgressListener.STATE_IS_DOCUMENT) { diff --git a/mobile/chrome/content/deckbrowser.xml b/mobile/chrome/content/deckbrowser.xml index 3051f6dd6adc..8ce55b8df536 100644 --- a/mobile/chrome/content/deckbrowser.xml +++ b/mobile/chrome/content/deckbrowser.xml @@ -136,7 +136,9 @@