mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1024391 - Fix popup blocking bug (r=felipe)
This commit is contained in:
parent
76cf0a1088
commit
4da3783e52
@ -540,7 +540,7 @@ var gPopupBlockerObserver = {
|
||||
// xxxdz this should make the option say "Show file picker" and do it (Bug 590306)
|
||||
if (!blockedPopup.popupWindowURI)
|
||||
continue;
|
||||
var popupURIspec = blockedPopup.popupWindowURI;
|
||||
var popupURIspec = blockedPopup.popupWindowURI.spec;
|
||||
|
||||
// Sometimes the popup URI that we get back from the blockedPopup
|
||||
// isn't useful (for instance, netscape.com's popup URI ends up
|
||||
|
@ -1024,7 +1024,7 @@
|
||||
this._appendStatusPanel();
|
||||
|
||||
if (updateBlockedPopups)
|
||||
this.mCurrentBrowser.updateBlockedPopups(false);
|
||||
this.mCurrentBrowser.updateBlockedPopups();
|
||||
|
||||
// Update the URL bar.
|
||||
var loc = this.mCurrentBrowser.currentURI;
|
||||
|
@ -595,15 +595,8 @@
|
||||
</method>
|
||||
|
||||
<method name="updateBlockedPopups">
|
||||
<parameter name="aBlockedPopups"/>
|
||||
<parameter name="aFreshPopup"/>
|
||||
<body>
|
||||
<![CDATA[
|
||||
this.blockedPopups = aBlockedPopups;
|
||||
if (aFreshPopup) {
|
||||
this.blockedPopups.reported = false;
|
||||
}
|
||||
|
||||
var event = document.createEvent("Events");
|
||||
event.initEvent("DOMUpdatePageReport", true, true);
|
||||
this.dispatchEvent(event);
|
||||
@ -842,9 +835,19 @@
|
||||
<body><![CDATA[
|
||||
let data = aMessage.data;
|
||||
switch (aMessage.name) {
|
||||
case "PopupBlocking:UpdateBlockedPopups":
|
||||
this.updateBlockedPopups(data.blockedPopups, data.freshPopup);
|
||||
case "PopupBlocking:UpdateBlockedPopups": {
|
||||
this.blockedPopups = data.blockedPopups;
|
||||
for (let i = 0; i < this.blockedPopups.length; i++) {
|
||||
let scope = Components.utils.import("resource://gre/modules/BrowserUtils.jsm", {});
|
||||
let uri = scope.BrowserUtils.makeURI(this.blockedPopups[i].popupWindowURI);
|
||||
this.blockedPopups[i].popupWindowURI = uri;
|
||||
}
|
||||
if (data.freshPopup) {
|
||||
this.blockedPopups.reported = false;
|
||||
}
|
||||
this.updateBlockedPopups();
|
||||
break;
|
||||
}
|
||||
case "Autoscroll:Start": {
|
||||
if (!this.autoscrollEnabled) {
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user