aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorJean-François Rameau <jframeau@cvs.gnome.org>2006-02-09 06:20:02 +0800
committerJean-François Rameau <jframeau@src.gnome.org>2006-02-09 06:20:02 +0800
commit05c6fc746dbf135d87b214d0f741bf533eb16b5b (patch)
tree6f608f9ab13520b0a4ced07a6ac2917b9258a448 /embed
parent9ceb5eafd29a927d9333bec2fda3ea5e21f0ec72 (diff)
downloadgsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar.gz
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar.bz2
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar.lz
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar.xz
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.tar.zst
gsoc2013-epiphany-05c6fc746dbf135d87b214d0f741bf533eb16b5b.zip
Block popup with NULL url (javascript:window.open() for instance). but
2006-02-08 Jean-François Rameau <jframeau@cvs.gnome.org> * embed/mozilla/EphyBrowser.cpp: (HandleEvent): * src/ephy-tab.c: (popups_manager_add),(popups_manager_show): Block popup with NULL url (javascript:window.open() for instance). but don't show them when unblocking. Bug #155009.
Diffstat (limited to 'embed')
-rw-r--r--embed/mozilla/EphyBrowser.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/embed/mozilla/EphyBrowser.cpp b/embed/mozilla/EphyBrowser.cpp
index b097ec33a..6a97f026a 100644
--- a/embed/mozilla/EphyBrowser.cpp
+++ b/embed/mozilla/EphyBrowser.cpp
@@ -358,12 +358,15 @@ EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent)
nsCOMPtr<nsIURI> popupWindowURI;
popupEvent->GetPopupWindowURI (getter_AddRefs (popupWindowURI));
- NS_ENSURE_TRUE (popupWindowURI, NS_ERROR_FAILURE);
-
- nsresult rv;
+
nsEmbedCString popupWindowURIString;
- rv = popupWindowURI->GetSpec (popupWindowURIString);
- NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
+ nsresult rv;
+
+ if (popupWindowURI)
+ {
+ rv = popupWindowURI->GetSpec (popupWindowURIString);
+ NS_ENSURE_SUCCESS (rv, NS_ERROR_FAILURE);
+ }
nsEmbedString popupWindowFeatures;
rv = popupEvent->GetPopupWindowFeatures (popupWindowFeatures);
@@ -386,7 +389,7 @@ EphyPopupBlockEventListener::HandleEvent (nsIDOMEvent * aDOMEvent)
#endif
g_signal_emit_by_name(mOwner->mEmbed, "ge-popup-blocked",
- popupWindowURIString.get(),
+ popupWindowURI == NULL ? NULL : popupWindowURIString.get(),
popupWindowNameString.get(),
popupWindowFeaturesString.get());