From 6d9a847d4a0642c6b850d3d52e5a8b26cbc78944 Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Thu, 9 Sep 2004 18:53:21 +0000 Subject: [PATCH] Landing fix for bug 258487, patch by Wladimir Palant . Add code to check a pref for how to treat popups opened by a plugin. r+sr=jst@mozilla.org git-svn-id: svn://10.0.0.236/trunk@161999 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsObjectFrame.cpp | 4 +++- mozilla/layout/html/base/src/nsObjectFrame.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsObjectFrame.cpp b/mozilla/layout/generic/nsObjectFrame.cpp index 76002cf11dc..d3455795fe7 100644 --- a/mozilla/layout/generic/nsObjectFrame.cpp +++ b/mozilla/layout/generic/nsObjectFrame.cpp @@ -2286,7 +2286,9 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge } } - nsAutoPopupStatePusher popupStatePusher(openAllowed); + PRInt32 blockPopups = + nsContentUtils::GetIntPref("privacy.popups.disable_from_plugins"); + nsAutoPopupStatePusher popupStatePusher((PopupControlState)blockPopups); rv = lh->OnLinkClick(content, eLinkVerb_Replace, uri, unitarget.get(), diff --git a/mozilla/layout/html/base/src/nsObjectFrame.cpp b/mozilla/layout/html/base/src/nsObjectFrame.cpp index 76002cf11dc..d3455795fe7 100644 --- a/mozilla/layout/html/base/src/nsObjectFrame.cpp +++ b/mozilla/layout/html/base/src/nsObjectFrame.cpp @@ -2286,7 +2286,9 @@ NS_IMETHODIMP nsPluginInstanceOwner::GetURL(const char *aURL, const char *aTarge } } - nsAutoPopupStatePusher popupStatePusher(openAllowed); + PRInt32 blockPopups = + nsContentUtils::GetIntPref("privacy.popups.disable_from_plugins"); + nsAutoPopupStatePusher popupStatePusher((PopupControlState)blockPopups); rv = lh->OnLinkClick(content, eLinkVerb_Replace, uri, unitarget.get(),