[evolution] EHTMLEditorView - Use webkit_dom_html_element_insert_adjacent_html in parse_html_into_paragraphs



commit daaa8d08aa19aad060832f0bc755c22407a4cb39
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Feb 12 08:39:44 2015 +0100

    EHTMLEditorView - Use webkit_dom_html_element_insert_adjacent_html in parse_html_into_paragraphs

 e-util/e-html-editor-view.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 05c56aa..b82b4c1 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -4462,7 +4462,7 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                                        selection, document, blockquote, block, "<br>");
                        } else if (preserve_block) {
                                gchar *html;
-                               gchar *new_content;
+                               gchar *content_to_append;
 
                                if (!paragraph) {
                                        if (!block || WEBKIT_DOM_IS_HTML_DIV_ELEMENT (block))
@@ -4475,19 +4475,19 @@ parse_html_into_paragraphs (EHTMLEditorView *view,
                                html = webkit_dom_html_element_get_inner_html (
                                        WEBKIT_DOM_HTML_ELEMENT (paragraph));
 
-                               new_content = g_strconcat (
-                                       html && *html ? html : "",
+                               content_to_append = g_strconcat (
                                        html && *html ? " " : "",
                                        rest_to_insert ? rest_to_insert : "<br>",
                                        NULL),
 
-                               webkit_dom_html_element_set_inner_html (
+                               webkit_dom_html_element_insert_adjacent_html (
                                        WEBKIT_DOM_HTML_ELEMENT (paragraph),
-                                       new_content,
+                                       "beforeend",
+                                       content_to_append,
                                        NULL);
 
                                g_free (html);
-                               g_free (new_content);
+                               g_free (content_to_append);
                        } else {
                                if (paragraph)
                                        append_new_paragraph (blockquote, &paragraph);


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