[epiphany] webkit-embed.c: do not reinvent ephy-embed-utils functions.



commit 4916b8718e065e37e45f5609ef1061f894fc71a0
Author: Xan Lopez <xan gnome org>
Date:   Thu May 28 19:16:39 2009 +0300

    webkit-embed.c: do not reinvent ephy-embed-utils functions.
---
 embed/webkit/webkit-embed.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/embed/webkit/webkit-embed.c b/embed/webkit/webkit-embed.c
index 1323322..66da62f 100644
--- a/embed/webkit/webkit-embed.c
+++ b/embed/webkit/webkit-embed.c
@@ -796,16 +796,8 @@ impl_load (EphyEmbed *embed,
   WebKitEmbed *wembed = WEBKIT_EMBED (embed);
   char *effective_url = NULL;
 
-  /* FIXME: WebKit has some strange bug for which there must be
-   * protocol prefix into the parsed URL, or it will not show images
-   * and lock badly.  I copied this function from WebKit's
-   * GdkLauncher.
-   */
-  if (strncmp ("about:", url, 6)   != 0 &&
-      strncmp ("http://";, url, 7)  != 0 &&
-      strncmp ("https://";, url, 8) != 0 &&
-      strncmp ("file://", url, 7)  != 0 &&
-      strncmp ("ftp://";, url, 6)   != 0)
+  /* WebKit cannot handle URLs without a protocol */
+  if (ephy_embed_utils_address_has_web_scheme (url) == FALSE)
     effective_url = g_strconcat ("http://";, url, NULL);
   else
     effective_url = g_strdup (url);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]