[epiphany] Add support for DNS prefetching when using WebKit2
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] Add support for DNS prefetching when using WebKit2
- Date: Wed, 6 Mar 2013 12:56:32 +0000 (UTC)
commit b3351b02000d5ab223202b1ac083b73b418160b2
Author: Carlos Garcia Campos <cgarcia igalia com>
Date: Wed Feb 20 14:20:30 2013 +0100
Add support for DNS prefetching when using WebKit2
https://bugzilla.gnome.org/show_bug.cgi?id=684445
embed/ephy-embed-prefs.c | 1 +
lib/widgets/ephy-location-entry.c | 10 +++++++++-
2 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-embed-prefs.c b/embed/ephy-embed-prefs.c
index e470e1f..e039957 100644
--- a/embed/ephy-embed-prefs.c
+++ b/embed/ephy-embed-prefs.c
@@ -685,6 +685,7 @@ ephy_embed_prefs_init (void)
webkit_settings = webkit_settings_new_with_settings ("enable-developer-extras", TRUE,
"enable-fullscreen", TRUE,
"enable-site-specific-quirks", TRUE,
+ "enable-dns-prefetching", TRUE,
NULL);
#else
webkit_settings = webkit_web_settings_new ();
diff --git a/lib/widgets/ephy-location-entry.c b/lib/widgets/ephy-location-entry.c
index f89c6d8..b21f656 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]