Bug 915951 - Notifications should ignore sub-frame navigation. r=dao

This commit is contained in:
Tanvi Vyas 2013-10-31 22:13:43 -07:00
parent b56cb75c4d
commit 972897afdb

View File

@ -4206,6 +4206,10 @@ var TabsProgressListener = {
if (aFlags & Ci.nsIWebProgressListener.LOCATION_CHANGE_SAME_DOCUMENT)
return;
// Filter out location changes in sub documents.
if (!aWebProgress.isTopLevel)
return;
// Only need to call locationChange if the PopupNotifications object
// for this window has already been initialized (i.e. its getter no
// longer exists)
@ -4214,10 +4218,7 @@ var TabsProgressListener = {
gBrowser.getNotificationBox(aBrowser).removeTransientNotifications();
// Filter out location changes in sub documents.
if (aWebProgress.isTopLevel) {
FullZoom.onLocationChange(aLocationURI, false, aBrowser);
}
FullZoom.onLocationChange(aLocationURI, false, aBrowser);
},
onRefreshAttempted: function (aBrowser, aWebProgress, aURI, aDelay, aSameURI) {