[evolution/wip-webkit2] Adapt the code for webkitgtk 2.5.x and require it



commit 500955931e5b2bb3c43e561a4f50d31f9e5d4a9a
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Sep 4 12:59:16 2014 +0200

    Adapt the code for webkitgtk 2.5.x and require it

 addressbook/gui/widgets/eab-contact-display.c      |    1 -
 calendar/gui/e-cal-component-preview.c             |    1 -
 configure.ac                                       |    6 +-
 e-util/e-dom-utils.c                               |   13 +-
 e-util/e-web-view.c                                |  580 ++++++++++---------
 e-util/e-web-view.h                                |   11 +-
 mail/e-mail-display.c                              |  199 +++----
 mail/e-mail-display.h                              |    3 -
 mail/e-mail-paned-view.c                           |    1 -
 mail/e-mail-printer.c                              |    1 -
 .../module-itip-formatter-dom-utils.c              |    3 +
 modules/mail/e-mail-shell-backend.c                |    1 -
 .../module-prefer-plain-web-extension.c            |    3 +
 .../module-text-highlight-web-extension.c          |    3 +
 modules/web-inspector/evolution-web-inspector.c    |    3 +-
 shell/main.c                                       |    2 -
 16 files changed, 422 insertions(+), 409 deletions(-)
---
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index df043f5..45bc9ad 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -555,7 +555,6 @@ eab_contact_display_new (void)
 {
        return g_object_new (
                EAB_TYPE_CONTACT_DISPLAY,
-               "group", e_web_view_get_web_view_group (),
                NULL);
 }
 
diff --git a/calendar/gui/e-cal-component-preview.c b/calendar/gui/e-cal-component-preview.c
index 33a6646..9f105e7 100644
--- a/calendar/gui/e-cal-component-preview.c
+++ b/calendar/gui/e-cal-component-preview.c
@@ -448,7 +448,6 @@ e_cal_component_preview_new (void)
 {
        return g_object_new (
                E_TYPE_CAL_COMPONENT_PREVIEW,
-               "group", e_web_view_get_web_view_group (),
                NULL);
 }
 
diff --git a/configure.ac b/configure.ac
index f175d8f..4b4f452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -51,7 +51,7 @@ m4_define([gcr_minimum_version], [3.4])
 m4_define([gnome_desktop_minimum_version], [2.91.3])
 m4_define([gnome_icon_theme_minimum_version], [2.30.2.1])
 m4_define([gsettings_desktop_schemas_minimum_version], [2.91.92])
-m4_define([webkit2gtk_minimum_version], [2.4.0])
+m4_define([webkit2gtk_minimum_version], [2.5.0])
 m4_define([libgdata_minimum_version], [0.10])
 m4_define([libxml_minimum_version], [2.7.3])
 m4_define([shared_mime_info_minimum_version], [0.22])
@@ -289,7 +289,7 @@ PKG_CHECK_MODULES([GNOME_PLATFORM],
         shared-mime-info >= shared_mime_info_minimum_version
         gnome-desktop-3.0 >= gnome_desktop_minimum_version
         gsettings-desktop-schemas >= gsettings_desktop_schemas_minimum_version
-        webkit2gtk-3.0 >= webkit2gtk_minimum_version])
+        webkit2gtk-4.0 >= webkit2gtk_minimum_version])
 AC_SUBST(GNOME_PLATFORM_CFLAGS)
 AC_SUBST(GNOME_PLATFORM_LIBS)
 
@@ -1150,7 +1150,7 @@ dnl **********************************
 webextensionsdir="$privlibdir/web-extensions"
 AC_SUBST(webextensionsdir)
 
-PKG_CHECK_MODULES(WEB_EXTENSION, [webkit2gtk-3.0 >= webkit2gtk_minimum_version])
+PKG_CHECK_MODULES(WEB_EXTENSION, [webkit2gtk-4.0 >= webkit2gtk_minimum_version])
 AC_SUBST(WEB_EXTENSIONS_CFLAGS)
 AC_SUBST(WEB_EXTENSIONS_LIBS)
 
diff --git a/e-util/e-dom-utils.c b/e-util/e-dom-utils.c
index 679801b..ef8034e 100644
--- a/e-util/e-dom-utils.c
+++ b/e-util/e-dom-utils.c
@@ -18,6 +18,11 @@
 
 #include "e-dom-utils.h"
 
+#define WEBKIT_DOM_USE_UNSTABLE_API
+#include <webkitdom/WebKitDOMDOMSelection.h>
+#include <webkitdom/WebKitDOMDOMWindowUnstable.h>
+#include <webkitdom/WebKitDOMHTMLElementUnstable.h>
+
 #include "../web-extensions/evolution-web-extension.h"
 
 #include <config.h>
@@ -875,8 +880,7 @@ e_dom_utils_get_active_element_name (WebKitDOMDocument *document)
 {
        WebKitDOMElement *element;
 
-       element = webkit_dom_html_document_get_active_element (
-               WEBKIT_DOM_HTML_DOCUMENT (document));
+       element = webkit_dom_document_get_active_element (document);
 
        if (!element)
                return NULL;
@@ -891,8 +895,7 @@ e_dom_utils_get_active_element_name (WebKitDOMDocument *document)
                if (!content_document)
                        break;
 
-               element = webkit_dom_html_document_get_active_element (
-                       WEBKIT_DOM_HTML_DOCUMENT (content_document));
+               element = webkit_dom_document_get_active_element (content_document);
        }
 
        return webkit_dom_node_get_local_name (WEBKIT_DOM_NODE (element));
@@ -1099,7 +1102,7 @@ e_dom_utils_get_document_from_point (WebKitDOMDocument *document,
        WebKitDOMElement *element;
 
        if (x == 0 && y == 0)
-               element = webkit_dom_html_document_get_active_element (WEBKIT_DOM_HTML_DOCUMENT (document));
+               element = webkit_dom_document_get_active_element (document);
        else
                element = find_element_from_point (document, x, y, NULL);
 
diff --git a/e-util/e-web-view.c b/e-util/e-web-view.c
index a7c5db0..21ce317 100644
--- a/e-util/e-web-view.c
+++ b/e-util/e-web-view.c
@@ -546,6 +546,7 @@ web_view_decide_policy_cb (EWebView *web_view,
 {
        EWebViewClass *class;
        WebKitNavigationPolicyDecision *navigation_decision;
+       WebKitNavigationAction *navigation_action;
        WebKitNavigationType navigation_type;
        WebKitURIRequest *request;
        const gchar *uri;
@@ -554,10 +555,12 @@ web_view_decide_policy_cb (EWebView *web_view,
                return FALSE;
 
        navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
-       navigation_type = webkit_navigation_policy_decision_get_navigation_type (navigation_decision);
+       navigation_action = webkit_navigation_policy_decision_get_navigation_action (navigation_decision);
+       navigation_type = webkit_navigation_action_get_navigation_type (navigation_action);
 
-       if (navigation_type != WEBKIT_NAVIGATION_TYPE_LINK_CLICKED)
+       if (navigation_type != WEBKIT_NAVIGATION_TYPE_LINK_CLICKED) {
                return FALSE;
+       }
 
        /* XXX WebKitWebView does not provide a class method for
         *     this signal, so we do so we can override the default
@@ -567,7 +570,7 @@ web_view_decide_policy_cb (EWebView *web_view,
        g_return_val_if_fail (class->link_clicked != NULL, FALSE);
 
        webkit_policy_decision_ignore (decision);
-       request = webkit_navigation_policy_decision_get_request (navigation_decision);
+       request = webkit_navigation_action_get_request (navigation_action);
        uri = webkit_uri_request_get_uri (request);
 
        class->link_clicked (web_view, uri);
@@ -650,6 +653,46 @@ web_view_load_changed_cb (WebKitWebView *webkit_web_view,
        e_web_view_zoom_out (web_view);
 }
 
+static GObjectConstructParam*
+find_property(guint n_properties,
+              GObjectConstructParam* properties,
+              GParamSpec* param_spec)
+{
+       while (n_properties--) {
+               if (properties->pspec == param_spec)
+                       return properties;
+               properties++;
+       }
+
+       return NULL;
+}
+
+static GObject*
+web_view_constructor (GType type,
+                      guint n_construct_properties,
+                      GObjectConstructParam *construct_properties)
+{
+       GObjectClass* object_class;
+       GParamSpec* param_spec;
+       GObjectConstructParam *param = NULL;
+
+       object_class = G_OBJECT_CLASS(g_type_class_ref(type));
+       g_return_val_if_fail(object_class != NULL, NULL);
+
+       if (construct_properties && n_construct_properties != 0) {
+               param_spec = g_object_class_find_property(object_class, "settings");
+               if ((param = find_property(n_construct_properties, construct_properties, param_spec)))
+                       g_value_take_object (param->value, e_web_view_get_default_webkit_settings ());
+               param_spec = g_object_class_find_property(object_class, "user-content-manager");
+               if ((param = find_property(n_construct_properties, construct_properties, param_spec)))
+                       g_value_take_object (param->value, webkit_user_content_manager_new ());
+       }
+
+       g_type_class_unref (object_class);
+
+       return G_OBJECT_CLASS (e_web_view_parent_class)->constructor(type, n_construct_properties, 
construct_properties);
+}
+
 static void
 web_view_set_property (GObject *object,
                        guint property_id,
@@ -867,6 +910,29 @@ web_view_finalize (GObject *object)
 }
 
 static void
+web_view_initialize (WebKitWebView *web_view)
+{
+       const gchar *id = "org.gnome.settings-daemon.plugins.xsettings";
+       GSettings *settings;
+       GSettingsSchema *settings_schema;
+
+       /* Optional schema */
+       settings_schema = g_settings_schema_source_lookup (
+               g_settings_schema_source_get_default (), id, FALSE);
+
+       if (settings_schema)
+               settings = g_settings_new (id);
+       else
+               settings = NULL;
+
+       e_web_view_update_fonts_settings (
+               g_settings_new ("org.gnome.desktop.interface"),
+               settings,
+               NULL, NULL, GTK_WIDGET (web_view));
+}
+
+
+static void
 web_view_constructed (GObject *object)
 {
        WebKitSettings *web_settings;
@@ -887,8 +953,12 @@ web_view_constructed (GObject *object)
 
        g_object_unref (settings);
 #endif
-       web_settings = webkit_web_view_group_get_settings (
-               e_web_view_get_web_view_group ());
+       e_extensible_load_extensions (E_EXTENSIBLE (object));
+
+       /* Chain up to parent's constructed() method. */
+       G_OBJECT_CLASS (e_web_view_parent_class)->constructed (object);
+
+       web_settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (object));
 
        g_object_bind_property (
                web_settings, "enable-caret-browsing",
@@ -896,10 +966,7 @@ web_view_constructed (GObject *object)
                G_BINDING_BIDIRECTIONAL |
                G_BINDING_SYNC_CREATE);
 
-       e_extensible_load_extensions (E_EXTENSIBLE (object));
-
-       /* Chain up to parent's constructed() method. */
-       G_OBJECT_CLASS (e_web_view_parent_class)->constructed (object);
+       web_view_initialize (WEBKIT_WEB_VIEW (object));
 }
 
 static gboolean
@@ -1488,6 +1555,7 @@ e_web_view_class_init (EWebViewClass *class)
        g_type_class_add_private (class, sizeof (EWebViewPrivate));
 
        object_class = G_OBJECT_CLASS (class);
+       object_class->constructor = web_view_constructor;
        object_class->set_property = web_view_set_property;
        object_class->get_property = web_view_get_property;
        object_class->dispose = web_view_dispose;
@@ -1967,231 +2035,12 @@ e_web_view_register_uri_scheme (EWebView *web_view,
                (WebKitURISchemeRequestCallback) callback,
                user_data ? user_data : web_view,
                NULL);
-
 }
 
 static void
 web_view_update_fonts (EWebView *web_view)
 {
-       e_web_view_update_fonts (web_view, e_web_view_get_web_view_group ());
-}
-
-void
-e_web_view_update_fonts (EWebView *web_view,
-                         WebKitWebViewGroup *web_view_group)
-{
-       EWebViewClass *class;
-       PangoFontDescription *ms = NULL, *vw = NULL;
-
-       g_return_if_fail (E_IS_WEB_VIEW (web_view));
-
-       class = E_WEB_VIEW_GET_CLASS (web_view);
-       if (class->set_fonts != NULL)
-               class->set_fonts (web_view, &ms, &vw);
-
-       e_web_view_update_fonts_settings (
-               web_view->priv->font_settings,
-               web_view->priv->aliasing_settings,
-               web_view_group, ms, vw, GTK_WIDGET (web_view));
-
-       pango_font_description_free (ms);
-       pango_font_description_free (vw);
-}
-
-static void
-e_web_view_init (EWebView *web_view)
-{
-       GtkUIManager *ui_manager;
-       GtkActionGroup *action_group;
-       EPopupAction *popup_action;
-       GSettingsSchema *settings_schema;
-       GSettings *settings;
-       const gchar *domain = GETTEXT_PACKAGE;
-       const gchar *id;
-       gulong handler_id;
-       GError *error = NULL;
-
-       web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view);
-
-       /* XXX No WebKitWebView class method pointers to
-        *     override so we have to use signal handlers. */
-#if 0
-       g_signal_connect (
-               web_view, "create-plugin-widget",
-               G_CALLBACK (web_view_create_plugin_widget_cb), NULL);
-#endif
-       g_signal_connect (
-               web_view, "context-menu",
-               G_CALLBACK (web_view_context_menu_cb), NULL);
-
-       g_signal_connect (
-               web_view, "mouse-target-changed",
-               G_CALLBACK (web_view_mouse_target_changed_cb), NULL);
-
-       g_signal_connect (
-               web_view, "decide-policy",
-               G_CALLBACK (web_view_decide_policy_cb),
-               NULL);
-
-       g_signal_connect (
-               web_view, "load-changed",
-               G_CALLBACK (web_view_load_changed_cb), NULL);
-
-       g_signal_connect (
-               web_view, "style-updated",
-               G_CALLBACK (style_updated_cb), NULL);
-
-       g_signal_connect (
-               web_view, "state-flags-changed",
-               G_CALLBACK (style_updated_cb), NULL);
-
-       ui_manager = gtk_ui_manager_new ();
-       web_view->priv->ui_manager = ui_manager;
-
-       g_signal_connect_swapped (
-               ui_manager, "connect-proxy",
-               G_CALLBACK (web_view_connect_proxy_cb), web_view);
-
-       web_view_watch_web_extension (web_view);
-
-       e_web_view_register_uri_scheme (web_view, FILE_URI_SCHEME, NULL, NULL);
-       e_web_view_register_uri_scheme (web_view, GTK_STOCK_URI_SCHEME, NULL, NULL);
-#if 0
-       e_web_view_install_request_handler (web_view, E_TYPE_FILE_REQUEST);
-       e_web_view_install_request_handler (web_view, E_TYPE_STOCK_REQUEST);
-#endif
-       settings = g_settings_new ("org.gnome.desktop.interface");
-       web_view->priv->font_settings = g_object_ref (settings);
-       handler_id = g_signal_connect_swapped (
-               settings, "changed::font-name",
-               G_CALLBACK (web_view_update_fonts), web_view);
-       web_view->priv->font_name_changed_handler_id = handler_id;
-       handler_id = g_signal_connect_swapped (
-               settings, "changed::monospace-font-name",
-               G_CALLBACK (web_view_update_fonts), web_view);
-       web_view->priv->monospace_font_name_changed_handler_id = handler_id;
-       g_object_unref (settings);
-
-       /* This schema is optional.  Use if available. */
-       id = "org.gnome.settings-daemon.plugins.xsettings";
-       settings_schema = g_settings_schema_source_lookup (
-               g_settings_schema_source_get_default (), id, FALSE);
-       if (settings_schema != NULL) {
-               settings = g_settings_new (id);
-               web_view->priv->aliasing_settings = g_object_ref (settings);
-               handler_id = g_signal_connect_swapped (
-                       settings, "changed::antialiasing",
-                       G_CALLBACK (web_view_update_fonts), web_view);
-               web_view->priv->antialiasing_changed_handler_id = handler_id;
-               g_object_unref (settings);
-       }
-
-       action_group = gtk_action_group_new ("uri");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, uri_entries,
-               G_N_ELEMENTS (uri_entries), web_view);
-
-       action_group = gtk_action_group_new ("http");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, http_entries,
-               G_N_ELEMENTS (http_entries), web_view);
-
-       action_group = gtk_action_group_new ("mailto");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, mailto_entries,
-               G_N_ELEMENTS (mailto_entries), web_view);
-
-       action_group = gtk_action_group_new ("image");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, image_entries,
-               G_N_ELEMENTS (image_entries), web_view);
-
-       action_group = gtk_action_group_new ("selection");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, selection_entries,
-               G_N_ELEMENTS (selection_entries), web_view);
-
-       action_group = gtk_action_group_new ("standard");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       gtk_action_group_add_actions (
-               action_group, standard_entries,
-               G_N_ELEMENTS (standard_entries), web_view);
-
-       popup_action = e_popup_action_new ("open");
-       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
-       g_object_unref (popup_action);
-
-       g_object_bind_property (
-               web_view, "open-proxy",
-               popup_action, "related-action",
-               G_BINDING_BIDIRECTIONAL |
-               G_BINDING_SYNC_CREATE);
-
-       /* Support lockdown. */
-
-       action_group = gtk_action_group_new ("lockdown-printing");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       popup_action = e_popup_action_new ("print");
-       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
-       g_object_unref (popup_action);
-
-       g_object_bind_property (
-               web_view, "print-proxy",
-               popup_action, "related-action",
-               G_BINDING_BIDIRECTIONAL |
-               G_BINDING_SYNC_CREATE);
-
-       action_group = gtk_action_group_new ("lockdown-save-to-disk");
-       gtk_action_group_set_translation_domain (action_group, domain);
-       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
-       g_object_unref (action_group);
-
-       popup_action = e_popup_action_new ("save-as");
-       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
-       g_object_unref (popup_action);
-
-       g_object_bind_property (
-               web_view, "save-as-proxy",
-               popup_action, "related-action",
-               G_BINDING_BIDIRECTIONAL |
-               G_BINDING_SYNC_CREATE);
-
-       /* Because we are loading from a hard-coded string, there is
-        * no chance of I/O errors.  Failure here implies a malformed
-        * UI definition.  Full stop. */
-       gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error);
-       if (error != NULL)
-               g_error ("%s", error->message);
-
-       id = "org.gnome.evolution.webview";
-       e_plugin_ui_register_manager (ui_manager, id, web_view);
-       e_plugin_ui_enable_manager (ui_manager, id);
+       e_web_view_update_fonts (web_view);
 }
 
 static gdouble
@@ -2233,7 +2082,6 @@ normalize_font_size (GtkWidget *widget,
 void
 e_web_view_update_fonts_settings (GSettings *font_settings,
                                   GSettings *aliasing_settings,
-                                  WebKitWebViewGroup *web_view_group,
                                   PangoFontDescription *ms_font,
                                   PangoFontDescription *vw_font,
                                  GtkWidget *view_widget)
@@ -2248,6 +2096,8 @@ e_web_view_update_fonts_settings (GSettings *font_settings,
        GtkStyleContext *context;
        PangoFontDescription *min_size, *ms, *vw;
        WebKitSettings *wk_settings;
+       WebKitUserContentManager *manager;
+       WebKitUserStyleSheet *style_sheet;
 
        if (!ms_font) {
                gchar *font;
@@ -2366,7 +2216,7 @@ e_web_view_update_fonts_settings (GSettings *font_settings,
                gdk_color_free (visited);
        }
 
-       wk_settings = webkit_web_view_group_get_settings (web_view_group);
+       wk_settings = webkit_web_view_get_settings (WEBKIT_WEB_VIEW (view_widget));
 
        g_object_set (
                wk_settings,
@@ -2385,14 +2235,19 @@ e_web_view_update_fonts_settings (GSettings *font_settings,
                        view_widget, pango_font_description_get_size (min_size) / PANGO_SCALE),
                NULL);
 
-       webkit_web_view_group_remove_all_user_style_sheets (
-               web_view_group);
+       manager = webkit_web_view_get_user_content_manager (WEBKIT_WEB_VIEW (view_widget));
+       webkit_user_content_manager_remove_all_style_sheets (manager);
 
-       webkit_web_view_group_add_user_style_sheet (
-               web_view_group,
+       style_sheet = webkit_user_style_sheet_new (
                stylesheet->str,
-               NULL, NULL, NULL,
-               WEBKIT_INJECTED_CONTENT_FRAMES_ALL);
+               WEBKIT_USER_CONTENT_INJECT_ALL_FRAMES,
+               WEBKIT_USER_STYLE_LEVEL_USER,
+               NULL,
+               NULL);
+
+       webkit_user_content_manager_add_style_sheet (manager, style_sheet);
+
+       webkit_user_style_sheet_unref (style_sheet);
 
        g_string_free (stylesheet, TRUE);
 
@@ -2402,10 +2257,10 @@ e_web_view_update_fonts_settings (GSettings *font_settings,
                pango_font_description_free (vw);
 }
 
-void
-e_web_view_initialize_settings (WebKitSettings *settings)
+WebKitSettings *
+e_web_view_get_default_webkit_settings (void)
 {
-       g_object_set (settings,
+       return webkit_settings_new_with_settings (
                "auto-load-images", TRUE,
                "default-charset", "utf-8",
                "enable-html5-database", FALSE,
@@ -2422,57 +2277,233 @@ e_web_view_initialize_settings (WebKitSettings *settings)
 }
 
 static void
-web_view_initialize_group (WebKitWebViewGroup *web_view_group)
+initialize_web_extensions_cb (WebKitWebContext *web_context,
+                              gpointer user_data)
 {
-       const gchar *id = "org.gnome.settings-daemon.plugins.xsettings";
-       GSettings *settings;
-       GSettingsSchema *settings_schema;
-       WebKitSettings *wk_settings;
+       /* Set the web extensions dir before the process is launched */
+       webkit_web_context_set_web_extensions_directory (
+               web_context, EVOLUTION_WEB_EXTENSIONS_DIR);
 
-       wk_settings = webkit_web_view_group_get_settings (web_view_group);
+       webkit_web_context_set_cache_model (
+               web_context, WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
+}
 
-       e_web_view_initialize_settings (wk_settings);
+void
+e_web_view_update_fonts (EWebView *web_view)
+{
+       EWebViewClass *class;
+       PangoFontDescription *ms = NULL, *vw = NULL;
 
-       /* Optional schema */
-       settings_schema = g_settings_schema_source_lookup (
-               g_settings_schema_source_get_default (), id, FALSE);
+       g_return_if_fail (E_IS_WEB_VIEW (web_view));
 
-       if (settings_schema)
-               settings = g_settings_new (id);
-       else
-               settings = NULL;
+       class = E_WEB_VIEW_GET_CLASS (web_view);
+       if (class->set_fonts != NULL)
+               class->set_fonts (web_view, &ms, &vw);
 
        e_web_view_update_fonts_settings (
-               g_settings_new ("org.gnome.desktop.interface"),
-               settings,
-               web_view_group, NULL, NULL, NULL);
+               web_view->priv->font_settings,
+               web_view->priv->aliasing_settings,
+               ms, vw, GTK_WIDGET (web_view));
+
+       pango_font_description_free (ms);
+       pango_font_description_free (vw);
 }
 
-WebKitWebViewGroup *
-e_web_view_get_web_view_group (void)
+static void
+e_web_view_init (EWebView *web_view)
 {
-       static WebKitWebViewGroup *web_view_group = NULL;
+       GtkUIManager *ui_manager;
+       GtkActionGroup *action_group;
+       EPopupAction *popup_action;
+       GSettingsSchema *settings_schema;
+       GSettings *settings;
+       const gchar *domain = GETTEXT_PACKAGE;
+       const gchar *id;
+       gulong handler_id;
+       GError *error = NULL;
+
+       web_view->priv = E_WEB_VIEW_GET_PRIVATE (web_view);
+
+       /* XXX No WebKitWebView class method pointers to
+        *     override so we have to use signal handlers. */
+#if 0
+       g_signal_connect (
+               web_view, "create-plugin-widget",
+               G_CALLBACK (web_view_create_plugin_widget_cb), NULL);
+#endif
+       g_signal_connect (
+               web_view, "context-menu",
+               G_CALLBACK (web_view_context_menu_cb), NULL);
+
+       g_signal_connect (
+               web_view, "mouse-target-changed",
+               G_CALLBACK (web_view_mouse_target_changed_cb), NULL);
+
+       g_signal_connect (
+               web_view, "decide-policy",
+               G_CALLBACK (web_view_decide_policy_cb),
+               NULL);
+
+       g_signal_connect (
+               webkit_web_context_get_default (), "initialize-web-extensions",
+               G_CALLBACK (initialize_web_extensions_cb), NULL);
+
+       g_signal_connect (
+               web_view, "load-changed",
+               G_CALLBACK (web_view_load_changed_cb), NULL);
+
+       g_signal_connect (
+               web_view, "style-updated",
+               G_CALLBACK (style_updated_cb), NULL);
+
+       g_signal_connect (
+               web_view, "state-flags-changed",
+               G_CALLBACK (style_updated_cb), NULL);
+
+       ui_manager = gtk_ui_manager_new ();
+       web_view->priv->ui_manager = ui_manager;
+
+       g_signal_connect_swapped (
+               ui_manager, "connect-proxy",
+               G_CALLBACK (web_view_connect_proxy_cb), web_view);
+
+       web_view_watch_web_extension (web_view);
+
+       e_web_view_register_uri_scheme (web_view, FILE_URI_SCHEME, NULL, NULL);
+       e_web_view_register_uri_scheme (web_view, GTK_STOCK_URI_SCHEME, NULL, NULL);
+
+       settings = g_settings_new ("org.gnome.desktop.interface");
+       web_view->priv->font_settings = g_object_ref (settings);
+       handler_id = g_signal_connect_swapped (
+               settings, "changed::font-name",
+               G_CALLBACK (web_view_update_fonts), web_view);
+       web_view->priv->font_name_changed_handler_id = handler_id;
+       handler_id = g_signal_connect_swapped (
+               settings, "changed::monospace-font-name",
+               G_CALLBACK (web_view_update_fonts), web_view);
+       web_view->priv->monospace_font_name_changed_handler_id = handler_id;
+       g_object_unref (settings);
 
-       if (!web_view_group) {
-               web_view_group = webkit_web_view_group_new ("Evolution WebView Group");
-               web_view_initialize_group (web_view_group);
+       /* This schema is optional.  Use if available. */
+       id = "org.gnome.settings-daemon.plugins.xsettings";
+       settings_schema = g_settings_schema_source_lookup (
+               g_settings_schema_source_get_default (), id, FALSE);
+       if (settings_schema != NULL) {
+               settings = g_settings_new (id);
+               web_view->priv->aliasing_settings = g_object_ref (settings);
+               handler_id = g_signal_connect_swapped (
+                       settings, "changed::antialiasing",
+                       G_CALLBACK (web_view_update_fonts), web_view);
+               web_view->priv->antialiasing_changed_handler_id = handler_id;
+               g_object_unref (settings);
        }
 
-       return web_view_group;
-}
+       action_group = gtk_action_group_new ("uri");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
 
-void
-e_web_view_initialize_webkit (void)
-{
-       WebKitWebContext *web_context;
+       gtk_action_group_add_actions (
+               action_group, uri_entries,
+               G_N_ELEMENTS (uri_entries), web_view);
 
-       web_context = webkit_web_context_get_default ();
+       action_group = gtk_action_group_new ("http");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
 
-       /* Set the web extensions dir before the process is launched */
-       webkit_web_context_set_web_extensions_directory (
-               web_context, EVOLUTION_WEB_EXTENSIONS_DIR);
+       gtk_action_group_add_actions (
+               action_group, http_entries,
+               G_N_ELEMENTS (http_entries), web_view);
+
+       action_group = gtk_action_group_new ("mailto");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       gtk_action_group_add_actions (
+               action_group, mailto_entries,
+               G_N_ELEMENTS (mailto_entries), web_view);
+
+       action_group = gtk_action_group_new ("image");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       gtk_action_group_add_actions (
+               action_group, image_entries,
+               G_N_ELEMENTS (image_entries), web_view);
 
-       webkit_web_context_set_cache_model (web_context, WEBKIT_CACHE_MODEL_DOCUMENT_VIEWER);
+       action_group = gtk_action_group_new ("selection");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       gtk_action_group_add_actions (
+               action_group, selection_entries,
+               G_N_ELEMENTS (selection_entries), web_view);
+
+       action_group = gtk_action_group_new ("standard");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       gtk_action_group_add_actions (
+               action_group, standard_entries,
+               G_N_ELEMENTS (standard_entries), web_view);
+
+       popup_action = e_popup_action_new ("open");
+       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
+       g_object_unref (popup_action);
+
+       g_object_bind_property (
+               web_view, "open-proxy",
+               popup_action, "related-action",
+               G_BINDING_BIDIRECTIONAL |
+               G_BINDING_SYNC_CREATE);
+
+       /* Support lockdown. */
+
+       action_group = gtk_action_group_new ("lockdown-printing");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       popup_action = e_popup_action_new ("print");
+       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
+       g_object_unref (popup_action);
+
+       g_object_bind_property (
+               web_view, "print-proxy",
+               popup_action, "related-action",
+               G_BINDING_BIDIRECTIONAL |
+               G_BINDING_SYNC_CREATE);
+
+       action_group = gtk_action_group_new ("lockdown-save-to-disk");
+       gtk_action_group_set_translation_domain (action_group, domain);
+       gtk_ui_manager_insert_action_group (ui_manager, action_group, 0);
+       g_object_unref (action_group);
+
+       popup_action = e_popup_action_new ("save-as");
+       gtk_action_group_add_action (action_group, GTK_ACTION (popup_action));
+       g_object_unref (popup_action);
+
+       g_object_bind_property (
+               web_view, "save-as-proxy",
+               popup_action, "related-action",
+               G_BINDING_BIDIRECTIONAL |
+               G_BINDING_SYNC_CREATE);
+
+       /* Because we are loading from a hard-coded string, there is
+        * no chance of I/O errors.  Failure here implies a malformed
+        * UI definition.  Full stop. */
+       gtk_ui_manager_add_ui_from_string (ui_manager, ui, -1, &error);
+       if (error != NULL)
+               g_error ("%s", error->message);
+
+       id = "org.gnome.evolution.webview";
+       e_plugin_ui_register_manager (ui_manager, id, web_view);
+       e_plugin_ui_enable_manager (ui_manager, id);
 }
 
 GtkWidget *
@@ -2480,7 +2511,6 @@ e_web_view_new (void)
 {
        return g_object_new (
                E_TYPE_WEB_VIEW,
-               "group", e_web_view_get_web_view_group (),
                NULL);
 }
 
diff --git a/e-util/e-web-view.h b/e-util/e-web-view.h
index 24f8ccb..19c444e 100644
--- a/e-util/e-web-view.h
+++ b/e-util/e-web-view.h
@@ -113,14 +113,12 @@ struct _EWebViewClass {
 
 GType          e_web_view_get_type             (void) G_GNUC_CONST;
 GtkWidget *    e_web_view_new                  (void);
-void           e_web_view_initialize_webkit    (void);
-void           e_web_view_initialize_settings  (WebKitSettings *settings);
-WebKitWebViewGroup *
-               e_web_view_get_web_view_group   (void);
+WebKitSettings *
+               e_web_view_get_default_webkit_settings
+                                               (void);
 void           e_web_view_update_fonts_settings
                                                (GSettings *font_settings,
                                                 GSettings *aliasing_settings,
-                                                WebKitWebViewGroup *web_view_group,
                                                 PangoFontDescription *ms_font,
                                                 PangoFontDescription *vw_font,
                                                 GtkWidget *view_widget);
@@ -229,8 +227,7 @@ const gchar *       e_web_view_get_selection_content_html_sync
                                                (EWebView *web_view,
                                                 GCancellable *cancellable,
                                                 GError **error);
-void           e_web_view_update_fonts         (EWebView *web_view,
-                                                WebKitWebViewGroup *web_view_group);
+void           e_web_view_update_fonts         (EWebView *web_view);
 void           e_web_view_cursor_image_copy    (EWebView *web_view);
 void           e_web_view_cursor_image_save    (EWebView *web_view);
 void           e_web_view_request              (EWebView *web_view,
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 26c73a5..4fcf348 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -167,6 +167,7 @@ mail_display_update_formatter_colors (EMailDisplay *display)
                e_mail_formatter_update_style (formatter, state_flags);
 }
 
+#if 0
 static void
 mail_display_plugin_widget_disconnect_children (GtkWidget *widget,
                                                 gpointer mail_display)
@@ -189,7 +190,7 @@ mail_display_plugin_widget_disconnect (gpointer widget_uri,
                        mail_display_plugin_widget_disconnect_children,
                        mail_display);
 }
-
+#endif
 static gboolean
 mail_display_process_mailto (EWebView *web_view,
                              const gchar *mailto_uri,
@@ -224,6 +225,7 @@ decide_policy_cb (WebKitWebView *web_view,
                   WebKitPolicyDecisionType type)
 {
        WebKitNavigationPolicyDecision *navigation_decision;
+       WebKitNavigationAction *navigation_action;
        WebKitURIRequest *request;
        const gchar *uri;
 
@@ -231,10 +233,17 @@ decide_policy_cb (WebKitWebView *web_view,
                return FALSE;
 
        navigation_decision = WEBKIT_NAVIGATION_POLICY_DECISION (decision);
+       navigation_action = webkit_navigation_policy_decision_get_navigation_action (navigation_decision);
+       request = webkit_navigation_action_get_request (navigation_action);
 
-       request = webkit_navigation_policy_decision_get_request (navigation_decision);
        uri = webkit_uri_request_get_uri (request);
 
+       if (!uri || !*uri) {
+               g_warning ("asdasdasdasdadasdasd");
+               webkit_policy_decision_ignore (decision);
+               return TRUE;
+       }
+
        if (g_str_has_prefix (uri, "file://")) {
                gchar *filename;
 
@@ -902,7 +911,7 @@ mail_parts_bind_dom (WebKitWebView *web_view,
        while (!g_queue_is_empty (&queue))
                g_object_unref (g_queue_pop_head (&queue));
 }
-
+#if 0
 static void
 mail_display_uri_changed (EMailDisplay *display,
                           GParamSpec *pspec,
@@ -923,7 +932,7 @@ mail_display_uri_changed (EMailDisplay *display,
                (GDestroyNotify) g_free,
                (GDestroyNotify) g_object_unref);
 }
-
+#endif
 static void
 mail_display_set_property (GObject *object,
                            guint property_id,
@@ -1016,7 +1025,7 @@ mail_display_dispose (GObject *object)
                g_source_remove (priv->scheduled_reload);
                priv->scheduled_reload = 0;
        }
-
+#if 0
        if (priv->widgets != NULL) {
                g_hash_table_foreach (
                        priv->widgets,
@@ -1024,7 +1033,7 @@ mail_display_dispose (GObject *object)
                g_hash_table_destroy (priv->widgets);
                priv->widgets = NULL;
        }
-
+#endif
        if (priv->settings != NULL)
                g_signal_handlers_disconnect_matched (
                        priv->settings, G_SIGNAL_MATCH_DATA,
@@ -1047,12 +1056,88 @@ mail_display_dispose (GObject *object)
 }
 
 static void
+mail_display_get_font_settings (GSettings *settings,
+                                PangoFontDescription **monospace,
+                                PangoFontDescription **variable)
+{
+       gboolean use_custom_font;
+       gchar *monospace_font;
+       gchar *variable_font;
+
+       use_custom_font = g_settings_get_boolean (settings, "use-custom-font");
+
+       if (!use_custom_font) {
+               *monospace = NULL;
+               *variable = NULL;
+               return;
+       }
+
+       monospace_font = g_settings_get_string (settings, "monospace-font");
+       variable_font = g_settings_get_string (settings, "variable-width-font");
+
+       *monospace = (monospace_font != NULL) ?
+               pango_font_description_from_string (monospace_font) : NULL;
+       *variable = (variable_font != NULL) ?
+               pango_font_description_from_string (variable_font) : NULL;
+
+       g_free (monospace_font);
+       g_free (variable_font);
+}
+
+static void
+mail_display_set_fonts (EWebView *web_view,
+                        PangoFontDescription **monospace,
+                        PangoFontDescription **variable)
+{
+       EMailDisplay *display = E_MAIL_DISPLAY (web_view);
+
+       mail_display_get_font_settings (display->priv->settings, monospace, variable);
+}
+static void
+mail_display_web_view_initialize (WebKitWebView *web_view)
+{
+       const gchar *id = "org.gnome.settings-daemon.plugins.xsettings";
+       GSettings *settings;
+       GSettingsSchema *settings_schema;
+       WebKitSettings *webkit_settings;
+       PangoFontDescription *ms = NULL, *vw = NULL;
+
+       webkit_settings = webkit_web_view_get_settings (web_view);
+
+       g_object_set (webkit_settings,
+               "enable-frame-flattening", TRUE,
+               NULL);
+
+       settings = g_settings_new ("org.gnome.evolution.mail");
+       mail_display_get_font_settings (settings, &ms, &vw);
+
+       /* Optional schema */
+       settings_schema = g_settings_schema_source_lookup (
+               g_settings_schema_source_get_default (), id, FALSE);
+
+       if (settings_schema)
+               settings = g_settings_new (id);
+       else
+               settings = NULL;
+
+       e_web_view_update_fonts_settings (
+               g_settings_new ("org.gnome.desktop.interface"),
+               settings,
+               ms, vw, GTK_WIDGET (web_view));
+
+       pango_font_description_free (ms);
+       pango_font_description_free (vw);
+}
+
+static void
 mail_display_constructed (GObject *object)
 {
        e_extensible_load_extensions (E_EXTENSIBLE (object));
 
        /* Chain up to parent's constructed() method. */
        G_OBJECT_CLASS (e_mail_display_parent_class)->constructed (object);
+
+       mail_display_web_view_initialize (WEBKIT_WEB_VIEW (object));
 }
 
 static void
@@ -1231,44 +1316,6 @@ mail_display_suggest_filename (EWebView *web_view,
                suggest_filename (web_view, uri);
 }
 #endif
-static void
-mail_display_get_font_settings (GSettings *settings,
-                                PangoFontDescription **monospace,
-                                PangoFontDescription **variable)
-{
-       gboolean use_custom_font;
-       gchar *monospace_font;
-       gchar *variable_font;
-
-       use_custom_font = g_settings_get_boolean (settings, "use-custom-font");
-
-       if (!use_custom_font) {
-               *monospace = NULL;
-               *variable = NULL;
-               return;
-       }
-
-       monospace_font = g_settings_get_string (settings, "monospace-font");
-       variable_font = g_settings_get_string (settings, "variable-width-font");
-
-       *monospace = (monospace_font != NULL) ?
-               pango_font_description_from_string (monospace_font) : NULL;
-       *variable = (variable_font != NULL) ?
-               pango_font_description_from_string (variable_font) : NULL;
-
-       g_free (monospace_font);
-       g_free (variable_font);
-}
-
-static void
-mail_display_set_fonts (EWebView *web_view,
-                        PangoFontDescription **monospace,
-                        PangoFontDescription **variable)
-{
-       EMailDisplay *display = E_MAIL_DISPLAY (web_view);
-
-       mail_display_get_font_settings (display->priv->settings, monospace, variable);
-}
 
 static void
 e_mail_display_class_init (EMailDisplayClass *class)
@@ -2094,7 +2141,7 @@ mail_mail_uri_scheme_appeared_cb (WebKitURISchemeRequest *request,
 static void
 mail_display_update_fonts (EMailDisplay *display)
 {
-       e_web_view_update_fonts (E_WEB_VIEW (display), e_mail_display_get_web_view_group ());
+       e_web_view_update_fonts (E_WEB_VIEW (display));
 }
 
 static void
@@ -2168,16 +2215,6 @@ e_mail_display_init (EMailDisplay *display)
        e_web_view_register_uri_scheme (
                E_WEB_VIEW (display), MAIL_URI_SCHEME,
                mail_mail_uri_scheme_appeared_cb, display);
-#if 0
-       e_web_view_install_request_handler (
-               E_WEB_VIEW (display), E_TYPE_MAIL_REQUEST);
-       e_web_view_install_request_handler (
-               E_WEB_VIEW (display), E_TYPE_HTTP_REQUEST);
-       e_web_view_install_request_handler (
-               E_WEB_VIEW (display), E_TYPE_FILE_REQUEST);
-       e_web_view_install_request_handler (
-               E_WEB_VIEW (display), E_TYPE_STOCK_REQUEST);
-#endif
 }
 
 static void
@@ -2204,63 +2241,11 @@ e_mail_display_update_colors (EMailDisplay *display,
        g_free (color_value);
 }
 
-static void
-mail_display_initialize_group (WebKitWebViewGroup *web_view_group)
-{
-       const gchar *id = "org.gnome.settings-daemon.plugins.xsettings";
-       GSettings *settings;
-       GSettingsSchema *settings_schema;
-       WebKitSettings *wk_settings;
-       PangoFontDescription *ms = NULL, *vw = NULL;
-
-       wk_settings = webkit_web_view_group_get_settings (web_view_group);
-
-       e_web_view_initialize_settings (wk_settings);
-
-       g_object_set (wk_settings,
-               "enable-frame-flattening", TRUE,
-               NULL);
-
-       settings = g_settings_new ("org.gnome.evolution.mail");
-       mail_display_get_font_settings (settings, &ms, &vw);
-
-       /* Optional schema */
-       settings_schema = g_settings_schema_source_lookup (
-               g_settings_schema_source_get_default (), id, FALSE);
-
-       if (settings_schema)
-               settings = g_settings_new (id);
-       else
-               settings = NULL;
-
-       e_web_view_update_fonts_settings (
-               g_settings_new ("org.gnome.desktop.interface"),
-               settings,
-               web_view_group, ms, vw, NULL);
-
-       pango_font_description_free (ms);
-       pango_font_description_free (vw);
-}
-
-WebKitWebViewGroup *
-e_mail_display_get_web_view_group (void)
-{
-       static WebKitWebViewGroup *web_view_group = NULL;
-
-       if (!web_view_group) {
-               web_view_group = webkit_web_view_group_new ("Evolution Mail WebView Group");
-               mail_display_initialize_group (web_view_group);
-       }
-
-       return web_view_group;
-}
-
 GtkWidget *
 e_mail_display_new (void)
 {
        return g_object_new (
                E_TYPE_MAIL_DISPLAY,
-               "group", e_mail_display_get_web_view_group (),
                NULL);
 }
 
diff --git a/mail/e-mail-display.h b/mail/e-mail-display.h
index 9411850..f8e3199 100644
--- a/mail/e-mail-display.h
+++ b/mail/e-mail-display.h
@@ -63,9 +63,6 @@ struct _EMailDisplayClass {
 
 GType          e_mail_display_get_type         (void) G_GNUC_CONST;
 GtkWidget *    e_mail_display_new              (void);
-WebKitWebViewGroup *
-               e_mail_display_get_web_view_group
-                                               (void);
 EMailFormatterMode
                e_mail_display_get_mode         (EMailDisplay *display);
 void           e_mail_display_set_mode         (EMailDisplay *display,
diff --git a/mail/e-mail-paned-view.c b/mail/e-mail-paned-view.c
index b4be0ee..53853b7 100644
--- a/mail/e-mail-paned-view.c
+++ b/mail/e-mail-paned-view.c
@@ -645,7 +645,6 @@ mail_paned_view_constructed (GObject *object)
        priv->display = g_object_new (
                E_TYPE_MAIL_DISPLAY,
                "headers-collapsable", TRUE,
-               "group", e_mail_display_get_web_view_group (),
                NULL);
 
        view = E_MAIL_VIEW (object);
diff --git a/mail/e-mail-printer.c b/mail/e-mail-printer.c
index cb34786..3f4ac12 100644
--- a/mail/e-mail-printer.c
+++ b/mail/e-mail-printer.c
@@ -355,7 +355,6 @@ mail_printer_new_web_view (const gchar *charset,
        web_view = g_object_new (
                E_TYPE_MAIL_DISPLAY,
                "mode", E_MAIL_FORMATTER_MODE_PRINTING,
-               "group", e_mail_display_get_web_view_group (),
                NULL);
 
        /* XXX EMailDisplay enables frame flattening to prevent scrollable
diff --git a/modules/itip-formatter/module-itip-formatter-dom-utils.c 
b/modules/itip-formatter/module-itip-formatter-dom-utils.c
index 0cb7706..0f71a7a 100644
--- a/modules/itip-formatter/module-itip-formatter-dom-utils.c
+++ b/modules/itip-formatter/module-itip-formatter-dom-utils.c
@@ -18,6 +18,9 @@
 
 #include "module-itip-formatter-dom-utils.h"
 
+#define WEBKIT_DOM_USE_UNSTABLE_API
+#include <webkitdom/WebKitDOMHTMLElementUnstable.h>
+
 #include "web-extension/module-itip-formatter-web-extension.h"
 #include "itip-view-elements-defines.h"
 
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 484de92..1cd02be 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -1082,7 +1082,6 @@ mbox_create_preview_cb (GObject *preview,
 
        display = g_object_new (
                E_TYPE_MAIL_DISPLAY,
-               "group", e_mail_display_get_web_view_group (),
                NULL);
        g_object_set_data_full (
                preview, "mbox-imp-display",
diff --git a/modules/prefer-plain/web-extension/module-prefer-plain-web-extension.c 
b/modules/prefer-plain/web-extension/module-prefer-plain-web-extension.c
index 8c2d6ee..e83efb0 100644
--- a/modules/prefer-plain/web-extension/module-prefer-plain-web-extension.c
+++ b/modules/prefer-plain/web-extension/module-prefer-plain-web-extension.c
@@ -22,6 +22,9 @@
 #include <gtk/gtk.h>
 #include <webkit2/webkit-web-extension.h>
 
+#define WEBKIT_DOM_USE_UNSTABLE_API
+#include <webkitdom/WebKitDOMDOMWindowUnstable.h>
+
 #include <e-util/e-dom-utils.h>
 
 /* FIXME Clean it */
diff --git a/modules/text-highlight/web-extension/module-text-highlight-web-extension.c 
b/modules/text-highlight/web-extension/module-text-highlight-web-extension.c
index acb32db..229b981 100644
--- a/modules/text-highlight/web-extension/module-text-highlight-web-extension.c
+++ b/modules/text-highlight/web-extension/module-text-highlight-web-extension.c
@@ -22,6 +22,9 @@
 #include <gtk/gtk.h>
 #include <webkit2/webkit-web-extension.h>
 
+#define WEBKIT_DOM_USE_UNSTABLE_API
+#include <webkitdom/WebKitDOMDOMWindowUnstable.h>
+
 #include <e-util/e-dom-utils.h>
 
 /* FIXME Clean it */
diff --git a/modules/web-inspector/evolution-web-inspector.c b/modules/web-inspector/evolution-web-inspector.c
index 88c3dfd..e43a64d 100644
--- a/modules/web-inspector/evolution-web-inspector.c
+++ b/modules/web-inspector/evolution-web-inspector.c
@@ -96,8 +96,7 @@ web_inspector_constructed (GObject *object)
        extension = E_WEB_INSPECTOR (object);
        web_view = web_inspector_get_web_view (extension);
 
-       settings = webkit_web_view_group_get_settings (
-               webkit_web_view_get_group (web_view));
+       settings = webkit_web_view_get_settings (web_view);
        webkit_settings_set_enable_developer_extras (settings, TRUE);
 
        g_signal_connect (
diff --git a/shell/main.c b/shell/main.c
index e5a5c02..bfee350 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -609,8 +609,6 @@ main (gint argc,
        if (setup_only)
                exit (0);
 
-       e_web_view_initialize_webkit ();
-
        categories_icon_theme_hack ();
        gtk_accel_map_load (e_get_accels_filename ());
 



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