[evolution/wip/webkit2] EHTMLEditorView - Use webkit_dom_html_element_insert_adjacent_html in parse_html_into_paragraphs
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Use webkit_dom_html_element_insert_adjacent_html in parse_html_into_paragraphs
- Date: Wed, 22 Apr 2015 12:57:21 +0000 (UTC)
commit 1c6056bd983479eaddb434724bb1fa743e0bdf41
Author: Tomas Popela <tpopela redhat com>
Date: Tue Mar 24 14:27:03 2015 +0100
EHTMLEditorView - Use webkit_dom_html_element_insert_adjacent_html in parse_html_into_paragraphs
web-extensions/e-html-editor-view-dom-functions.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/web-extensions/e-html-editor-view-dom-functions.c
b/web-extensions/e-html-editor-view-dom-functions.c
index 69af62b..1f847a4 100644
--- a/web-extensions/e-html-editor-view-dom-functions.c
+++ b/web-extensions/e-html-editor-view-dom-functions.c
@@ -3311,7 +3311,7 @@ parse_html_into_paragraphs (WebKitDOMDocument *document,
document, extension, 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))
@@ -3323,19 +3323,19 @@ parse_html_into_paragraphs (WebKitDOMDocument *document,
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, ¶graph);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]