aboutsummaryrefslogtreecommitdiffstats
path: root/lib/widgets/ephy-location-entry.c
diff options
context:
space:
mode:
authorCarlos Garcia Campos <cgarcia@igalia.com>2013-02-20 21:20:30 +0800
committerCarlos Garcia Campos <carlosgc@gnome.org>2013-03-06 20:56:10 +0800
commitb3351b02000d5ab223202b1ac083b73b418160b2 (patch)
tree87d9b67cd55faa7c804bf3dd25513f8079677433 /lib/widgets/ephy-location-entry.c
parent9601637c22d53cfedbbe157640a8c0edb13f4dfc (diff)
downloadgsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar.gz
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar.bz2
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar.lz
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar.xz
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.tar.zst
gsoc2013-epiphany-b3351b02000d5ab223202b1ac083b73b418160b2.zip
Add support for DNS prefetching when using WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=684445
Diffstat (limited to 'lib/widgets/ephy-location-entry.c')
-rw-r--r--lib/widgets/ephy-location-entry.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index f89c6d834..b21f65696 100644
--- a/lib/widgets/ephy-location-entry.c
+++ b/lib/widgets/ephy-location-entry.c
@@ -30,11 +30,16 @@
#include "ephy-gui.h"
#include "ephy-signal-accumulator.h"
+#include <libsoup/soup.h>
#include <gdk/gdkkeysyms.h>
#include <glib/gi18n.h>
#include <gtk/gtk.h>
#include <string.h>
+#ifdef HAVE_WEBKIT2
+#include <webkit2/webkit2.h>
+#else
#include <webkit/webkit.h>
+#endif
/**
* SECTION:ephy-location-entry
@@ -941,7 +946,10 @@ static gboolean
do_dns_prefetch (PrefetchHelper *helper)
{
#ifdef HAVE_WEBKIT2
- /* TODO: Network Features */
+ WebKitWebContext *context = webkit_web_context_get_default ();
+
+ if (helper->uri)
+ webkit_web_context_prefetch_dns (context, helper->uri->host);
#else
SoupSession *session = webkit_get_default_session ();