diff options
author | Christian Dywan <christian@twotoasts.de> | 2013-04-04 23:42:04 +0200 |
---|---|---|
committer | Christian Dywan <christian@twotoasts.de> | 2013-04-04 23:42:04 +0200 |
commit | bffaeb36f2997b7c816f0395cd83a8aaf9a08027 (patch) | |
tree | cfebb1e7771a7929b01b3acc0a93b4b8f9d398bd /midori/sokoke.c | |
parent | f265dbaf10b442a56bf5810ef3231e132a260723 (diff) | |
download | midori-bffaeb36f2997b7c816f0395cd83a8aaf9a08027.tar.gz |
Implement URI prefetching for WebKit2
Diffstat (limited to 'midori/sokoke.c')
-rw-r--r-- | midori/sokoke.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/midori/sokoke.c b/midori/sokoke.c index bcc3c245..04940b35 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 } /** |