[Xfce4-commits] <midori:master> Implement URI prefetching for WebKit2

Christian Dywan noreply at xfce.org
Fri Apr 5 00:30:04 CEST 2013


Updating branch refs/heads/master
         to 489c3d951c41a12354c234c7b241d7a640dccc0d (commit)
       from 431e1b48022d7bc6e1c687ae0ff33a40ec5ca074 (commit)

commit 489c3d951c41a12354c234c7b241d7a640dccc0d
Author: Christian Dywan <christian at twotoasts.de>
Date:   Thu Apr 4 23:42:04 2013 +0200

    Implement URI prefetching for WebKit2

 midori/sokoke.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index bcc3c24..04940b3 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -977,6 +977,10 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
         return FALSE;
     }
 
+#ifdef HAVE_WEBKIT2
+    WebKitWebContext* context = webkit_web_context_get_default ();
+    webkit_web_context_prefetch_dns (context, hostname);
+#else
     if (!hosts ||
         !g_regex_match_simple (hostname, hosts,
                                G_REGEX_CASELESS, G_REGEX_MATCH_NOTEMPTY))
@@ -997,15 +1001,11 @@ sokoke_prefetch_uri (MidoriWebSettings*  settings,
         new_hosts = g_strdup_printf ("%s|%s", hosts, hostname);
         katze_assign (hosts, new_hosts);
     }
-#ifndef HAVE_WEBKIT2
     else if (callback)
         callback (NULL, SOUP_STATUS_OK, user_data);
+#endif
     g_free (hostname);
     return TRUE;
-#else
-    g_free (hostname);
-    return FALSE;
-#endif
 }
 
 /**


More information about the Xfce4-commits mailing list