aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-tab.c
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 /src/ephy-tab.c
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 'src/ephy-tab.c')
-rw-r--r--src/ephy-tab.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c
index 8a95ff477..2fa0c31aa 100644
--- a/src/ephy-tab.c
+++ b/src/ephy-tab.c
@@ -535,7 +535,7 @@ popups_manager_add (EphyTab *tab,
popup = g_new0 (PopupInfo, 1);
- popup->url = g_strdup (url);
+ popup->url = (url == NULL) ? NULL : g_strdup (url);
popup->name = g_strdup (name);
popup->features = g_strdup (features);
@@ -651,14 +651,17 @@ popups_manager_show (PopupInfo *popup,
EphyEmbed *embed;
EphyEmbedSingle *single;
- embed = ephy_tab_get_embed (tab);
-
- single = EPHY_EMBED_SINGLE
- (ephy_embed_shell_get_embed_single (embed_shell));
+ /* Only show popup with non NULL url */
+ if (popup->url != NULL)
+ {
+ embed = ephy_tab_get_embed (tab);
- ephy_embed_single_open_window (single, embed, popup->url,
- popup->name, popup->features);
+ single = EPHY_EMBED_SINGLE
+ (ephy_embed_shell_get_embed_single (embed_shell));
+ ephy_embed_single_open_window (single, embed, popup->url,
+ popup->name, popup->features);
+ }
popups_manager_free_info (popup);
}