From 0a57e8b01d2a42afd1e54999f96aefd55b4ce783 Mon Sep 17 00:00:00 2001 From: "gavin%gavinsharp.com" Date: Tue, 31 Jan 2006 20:27:20 +0000 Subject: [PATCH] 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 --- mozilla/browser/base/content/browser.js | 11 +++++++++++ mozilla/toolkit/content/widgets/browser.xml | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/mozilla/browser/base/content/browser.js b/mozilla/browser/base/content/browser.js index 8c44d61660f..3947b93e3cb 100644 --- a/mozilla/browser/base/content/browser.js +++ b/mozilla/browser/base/content/browser.js @@ -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 } }, diff --git a/mozilla/toolkit/content/widgets/browser.xml b/mozilla/toolkit/content/widgets/browser.xml index ea62e3a7e81..d9fc84d9c3a 100644 --- a/mozilla/toolkit/content/widgets/browser.xml +++ b/mozilla/toolkit/content/widgets/browser.xml @@ -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() ]]>