Bug 325248: Add MOZILLA_1_8_BRANCH ifdef for bug 314700, r=mconnor

git-svn-id: svn://10.0.0.236/trunk@188596 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
gavin%gavinsharp.com
2006-01-31 20:27:20 +00:00
parent 52734ef0af
commit 0a57e8b01d
2 changed files with 18 additions and 0 deletions

View File

@@ -384,7 +384,10 @@ const gPopupBlockerObserver = {
menuitem.setAttribute("requestingWindowURI", pageReport[i].requestingWindowURI.spec);
menuitem.setAttribute("popupWindowURI", popupURIspec);
menuitem.setAttribute("popupWindowFeatures", pageReport[i].popupWindowFeatures);
#ifndef MOZILLA_1_8_BRANCH
# bug 314700
menuitem.setAttribute("popupWindowName", pageReport[i].popupWindowName);
#endif
menuitem.setAttribute("oncommand", "gPopupBlockerObserver.showBlockedPopup(event);");
aEvent.target.appendChild(menuitem);
}
@@ -413,14 +416,22 @@ const gPopupBlockerObserver = {
var popupWindowURI = aEvent.target.getAttribute("popupWindowURI");
var features = aEvent.target.getAttribute("popupWindowFeatures");
#ifndef MOZILLA_1_8_BRANCH
# bug 314700
var name = aEvent.target.getAttribute("popupWindowName");
#endif
var shell = findChildShell(null, gBrowser.selectedBrowser.docShell,
requestingWindowURI);
if (shell) {
var ifr = shell.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var dwi = ifr.getInterface(Components.interfaces.nsIDOMWindowInternal);
#ifdef MOZILLA_1_8_BRANCH
# bug 314700
dwi.open(popupWindowURI, "", features);
#else
dwi.open(popupWindowURI, name, features);
#endif
}
},

View File

@@ -481,10 +481,17 @@
this.pageReport = new Array();
}
#ifdef MOZILLA_1_8_BRANCH
# bug 314700
var obj = { requestingWindowURI: evt.requestingWindowURI,
popupWindowURI: evt.popupWindowURI,
popupWindowFeatures: evt.popupWindowFeatures };
#else
var obj = { requestingWindowURI: evt.requestingWindowURI,
popupWindowURI: evt.popupWindowURI,
popupWindowFeatures: evt.popupWindowFeatures,
popupWindowName: evt.popupWindowName };
#endif
this.pageReport.push(obj);
this.updatePageReport()
]]>