[evolution] I#155 - Cannot expand list of recipients of an attached email



commit 91d7dedba1578a97e7124551864a13f740d1c737
Author: Milan Crha <mcrha redhat com>
Date:   Mon Oct 1 17:34:36 2018 +0200

    I#155 - Cannot expand list of recipients of an attached email
    
    Closes https://gitlab.gnome.org/GNOME/evolution/issues/155

 src/mail/e-mail-display.c        | 12 ++++++++++++
 src/web-extensions/e-dom-utils.c | 15 +++++++++++++++
 2 files changed, 27 insertions(+)
---
diff --git a/src/mail/e-mail-display.c b/src/mail/e-mail-display.c
index 92cfe136e9..bf1623a734 100644
--- a/src/mail/e-mail-display.c
+++ b/src/mail/e-mail-display.c
@@ -542,6 +542,7 @@ mail_display_mail_part_appeared_signal_cb (GDBusConnection *connection,
                                           gpointer user_data)
 {
        EMailDisplay *display = user_data;
+       GDBusProxy *web_extension;
        const gchar *part_id = NULL;
        guint64 page_id = 0;
        EMailPart *part;
@@ -565,6 +566,17 @@ mail_display_mail_part_appeared_signal_cb (GDBusConnection *connection,
        }
 
        g_clear_object (&part);
+
+       web_extension = e_web_view_get_web_extension_proxy (E_WEB_VIEW (display));
+       if (web_extension) {
+               e_util_invoke_g_dbus_proxy_call_with_error_check (
+                       web_extension,
+                       "EMailDisplayBindDOM",
+                       g_variant_new (
+                               "(t)",
+                               webkit_web_view_get_page_id (WEBKIT_WEB_VIEW (display))),
+                       NULL);
+       }
 }
 
 static void
diff --git a/src/web-extensions/e-dom-utils.c b/src/web-extensions/e-dom-utils.c
index 67552dd9ab..30e94b025a 100644
--- a/src/web-extensions/e-dom-utils.c
+++ b/src/web-extensions/e-dom-utils.c
@@ -789,6 +789,21 @@ e_dom_utils_bind_dom (WebKitDOMDocument *document,
                        G_CALLBACK (callback), FALSE, user_data);
        }
        g_clear_object (&nodes);
+
+       /* Traverse in inner frames as well */
+       nodes = webkit_dom_document_query_selector_all (document, "iframe", NULL);
+       length = webkit_dom_node_list_get_length (nodes);
+       for (ii = 0; ii < length; ii++) {
+               WebKitDOMDocument *iframe_document;
+               WebKitDOMNode *node;
+
+               node = webkit_dom_node_list_item (nodes, ii);
+               iframe_document = webkit_dom_html_iframe_element_get_content_document 
(WEBKIT_DOM_HTML_IFRAME_ELEMENT (node));
+               if (iframe_document)
+                       e_dom_utils_bind_dom (iframe_document, selector, event, callback, user_data);
+       }
+
+       g_clear_object (&nodes);
 }
 
 static gboolean


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