Bug 557567 - urlbar changes when pages load within frames [r=mark.finkle r=stechz]
authorMatt Brubeck <mbrubeck@mozilla.com>
Wed, 07 Apr 2010 12:57:12 -0400
changeset 66111 21c2f9b942c6385352f7163699cc64805c5e54ad
parent 66110 0554e6c279ee61121cd2abd71a80cb1feb104721
child 66112 841299f2247d8eb8a218d4b8e248037e0751bafd
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)
reviewersmark, stechz
bugs557567
Bug 557567 - urlbar changes when pages load within frames [r=mark.finkle r=stechz]
mobile/chrome/content/browser.js
--- a/mobile/chrome/content/browser.js
+++ b/mobile/chrome/content/browser.js
@@ -2566,16 +2566,20 @@ ProgressController.prototype = {
 
   /** This method is called to indicate progress changes for the currently loading page. */
   onProgressChange: function onProgressChange(aWebProgress, aRequest, aCurSelf, aMaxSelf, aCurTotal, aMaxTotal) {
     // To use this method, add NOTIFY_PROGRESS to the flags in Tab._createBrowser
   },
 
   /** This method is called to indicate a change to the current location. */
   onLocationChange: function onLocationChange(aWebProgress, aRequest, aLocationURI) {
+    // ignore notification that aren't about the main document (iframes, etc)
+    if (aWebProgress.DOMWindow != this._tab.browser.contentWindow)
+      return;
+
     let location = aLocationURI ? aLocationURI.spec : "";
 
     this._hostChanged = true;
 
     if (location != this.browser.lastSpec) {
       this.browser.lastSpec = this.browser.currentURI.spec;
       Browser.removeTransientNotificationsForTab(this._tab);
       this._tab.resetZoomLevel();