[evolution/wip/webkit2] EHTMLEditorView - Busy loop when replying to certain mail
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorView - Busy loop when replying to certain mail
- Date: Wed, 2 Mar 2016 14:39:28 +0000 (UTC)
commit 03aa1ae57ccd27c537b804f1d15ddd70fb656afb
Author: Tomas Popela <tpopela redhat com>
Date: Wed Mar 2 14:47:19 2016 +0100
EHTMLEditorView - Busy loop when replying to certain mail
.../e-html-editor-selection-dom-functions.c | 16 ++++++----------
1 files changed, 6 insertions(+), 10 deletions(-)
---
diff --git a/web-extensions/composer/e-html-editor-selection-dom-functions.c
b/web-extensions/composer/e-html-editor-selection-dom-functions.c
index 7e36c31..e67c1aa 100644
--- a/web-extensions/composer/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-selection-dom-functions.c
@@ -2645,18 +2645,20 @@ wrap_lines (WebKitDOMDocument *document,
}
}
- if (offset > 0) {
+ if (offset >= 0) {
WebKitDOMNode *nd;
- if (offset != length_left)
+ if (offset != length_left && offset != 0) {
webkit_dom_text_split_text (
WEBKIT_DOM_TEXT (node), offset, NULL);
- nd = webkit_dom_node_get_next_sibling (node);
+ nd = webkit_dom_node_get_next_sibling (node);
+ } else
+ nd = node;
+
if (nd) {
gchar *nd_content;
-
nd_content = webkit_dom_node_get_text_content (nd);
if (nd_content && *nd_content) {
if (*nd_content == ' ')
@@ -2684,12 +2686,6 @@ wrap_lines (WebKitDOMDocument *document,
WEBKIT_DOM_NODE (element),
NULL);
}
- } else {
- webkit_dom_node_insert_before (
- webkit_dom_node_get_parent_node (node),
- WEBKIT_DOM_NODE (element),
- node,
- NULL);
}
if (node && WEBKIT_DOM_IS_CHARACTER_DATA (node))
length_left = webkit_dom_character_data_get_length (
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]