diff --git a/camino/src/browser/BrowserWindowController.mm b/camino/src/browser/BrowserWindowController.mm index b42776d62c7..f8fb63ceb31 100644 --- a/camino/src/browser/BrowserWindowController.mm +++ b/camino/src/browser/BrowserWindowController.mm @@ -1914,6 +1914,11 @@ enum BWCOpenDest { // - (void)showBlockedPopups:(nsIArray*)blockedSites whitelistingSource:(BOOL)shouldWhitelist { + // Because of the way our UI is set up, we white/blacklist based on the top-level window URI, + // rather than the requesting URI (which can be different on framed sites). + if (shouldWhitelist) + [self whitelistPopupsFromURL:[mBrowserView currentURI]]; + nsCOMPtr enumerator; blockedSites->Enumerate(getter_AddRefs(enumerator)); PRBool hasMore = PR_FALSE; @@ -1931,10 +1936,6 @@ enum BWCOpenDest { if (evt) [self showPopup:evt]; } - // Because of the way our UI is set up, we white/blacklist based on the top-level window URI, - // rather than the requesting URI (which can be different on framed sites). - if (shouldWhitelist) - [self whitelistPopupsFromURL:[mBrowserView currentURI]]; } - (void)showPopup:(nsIDOMPopupBlockedEvent*)aPopupBlockedEvent