summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2009-10-15 18:27:07 +0800
committerkwm <kwm@df743ca5-7f9a-e211-a948-0013205c9059>2009-10-15 18:27:07 +0800
commit1580f4b09512af6d2497467754c9b7eed6cd441b (patch)
treea3f42cb513b7a1163082bdb39ee059bb3d73d269
parent1a19587ee7b0fb3859e41b32f24b675a148999ac (diff)
downloadmarcuscom-ports-1580f4b09512af6d2497467754c9b7eed6cd441b.tar.gz
marcuscom-ports-1580f4b09512af6d2497467754c9b7eed6cd441b.tar.zst
marcuscom-ports-1580f4b09512af6d2497467754c9b7eed6cd441b.zip
Fix mailto: [1], execute javascript: [2] instead of viewing it.
The bug that you can't browser ftp:// will get fixed in 2.30 in libsoup Gnome Bug 557777. Obtained from: Gnome Bug 584537 [1], epi mailing list [2] git-svn-id: svn://creme-brulee.marcuscom.com/ports/trunk@13120 df743ca5-7f9a-e211-a948-0013205c9059
-rw-r--r--www/epiphany/Makefile4
-rw-r--r--www/epiphany/files/patch-embed_ephy-embed-utils.c10
-rw-r--r--www/epiphany/files/patch-embed_ephy-web-view.c14
-rw-r--r--www/epiphany/files/patch-src_ephy-window.c35
4 files changed, 61 insertions, 2 deletions
diff --git a/www/epiphany/Makefile b/www/epiphany/Makefile
index 43c486923..f5f91d02b 100644
--- a/www/epiphany/Makefile
+++ b/www/epiphany/Makefile
@@ -3,12 +3,12 @@
# Whom: Joe Marcus Clarke <marcus@FreeBSD.org>
#
# $FreeBSD$
-# $MCom: ports/www/epiphany/Makefile,v 1.210 2009/09/17 01:17:36 avl Exp $
+# $MCom: ports/www/epiphany/Makefile,v 1.211 2009/09/22 18:45:40 kwm Exp $
#
PORTNAME= epiphany
PORTVERSION= 2.28.0
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= www gnome
MASTER_SITES= GNOME
DIST_SUBDIR= gnome2
diff --git a/www/epiphany/files/patch-embed_ephy-embed-utils.c b/www/epiphany/files/patch-embed_ephy-embed-utils.c
new file mode 100644
index 000000000..09de6a981
--- /dev/null
+++ b/www/epiphany/files/patch-embed_ephy-embed-utils.c
@@ -0,0 +1,10 @@
+--- embed/ephy-embed-utils.c.orig 2009-10-13 15:28:59.000000000 +0200
++++ embed/ephy-embed-utils.c 2009-10-13 15:29:30.000000000 +0200
+@@ -91,6 +91,7 @@ ephy_embed_utils_address_has_web_scheme
+ g_str_has_prefix (address, "file:") ||
+ g_str_has_prefix (address, "data:") ||
+ g_str_has_prefix (address, "about:") ||
++ g_str_has_prefix (address, "javascript:") ||
+ g_str_has_prefix (address, "gopher:"));
+
+ return has_web_scheme;
diff --git a/www/epiphany/files/patch-embed_ephy-web-view.c b/www/epiphany/files/patch-embed_ephy-web-view.c
new file mode 100644
index 000000000..beb96fd71
--- /dev/null
+++ b/www/epiphany/files/patch-embed_ephy-web-view.c
@@ -0,0 +1,14 @@
+--- embed/ephy-web-view.c.orig 2009-10-13 15:30:12.000000000 +0200
++++ embed/ephy-web-view.c 2009-10-13 15:30:52.000000000 +0200
+@@ -1129,7 +1129,10 @@ ephy_web_view_load_url (EphyWebView *vie
+ else
+ effective_url = ephy_embed_utils_normalize_address (url);
+
+- webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
++ if (g_str_has_prefix (effective_url, "javascript:"))
++ webkit_web_view_execute_script (WEBKIT_WEB_VIEW (view), effective_url);
++ else
++ webkit_web_view_open (WEBKIT_WEB_VIEW (view), effective_url);
+
+ if (soup_uri)
+ soup_uri_free (soup_uri);
diff --git a/www/epiphany/files/patch-src_ephy-window.c b/www/epiphany/files/patch-src_ephy-window.c
new file mode 100644
index 000000000..f8467d96b
--- /dev/null
+++ b/www/epiphany/files/patch-src_ephy-window.c
@@ -0,0 +1,35 @@
+From c61c318aabdc980477dccd78549fe9819c3b1fa0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= <fpeters@0d.be>
+Date: Fri, 9 Oct 2009 20:07:20 +0200
+Subject: [PATCH] Pass mailto: URI to gtk_show_uri()
+
+(Part of) Bug #584537
+---
+ src/ephy-window.c | 8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/src/ephy-window.c b/src/ephy-window.c
+index 635a779..630ecec 100644
+--- src/ephy-window.c
++++ src/ephy-window.c
+@@ -2548,10 +2548,18 @@ policy_decision_required_cb (WebKitWebView *web_view,
+ WebKitWebNavigationReason reason;
+ gint button;
+ gint state;
++ const char *uri;
+
+ reason = webkit_web_navigation_action_get_reason (action);
+ button = webkit_web_navigation_action_get_button (action);
+ state = webkit_web_navigation_action_get_modifier_state (action);
++ uri = webkit_network_request_get_uri (request);
++
++ if (strncmp (uri, "mailto:", 7) == 0) {
++ webkit_web_policy_decision_ignore (decision);
++ gtk_show_uri (NULL, uri, GDK_CURRENT_TIME, NULL);
++ return TRUE;
++ }
+
+ /* Open in new tab for middle click or ctrl+click */
+ if (reason == WEBKIT_WEB_NAVIGATION_REASON_LINK_CLICKED &&
+--
+1.6.4.3