[evolution/wip/webkit2] Bug 759046 - Undo deletes the wrong text and redo does not add it back
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Bug 759046 - Undo deletes the wrong text and redo does not add it back
- Date: Thu, 3 Mar 2016 12:00:36 +0000 (UTC)
commit c9d6af77533d193f8c079813831db549eef744de
Author: Tomas Popela <tpopela redhat com>
Date: Thu Mar 3 12:58:00 2016 +0100
Bug 759046 - Undo deletes the wrong text and redo does not add it back
.../composer/e-html-editor-undo-redo-manager.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
---
diff --git a/web-extensions/composer/e-html-editor-undo-redo-manager.c
b/web-extensions/composer/e-html-editor-undo-redo-manager.c
index 8cd35d8..bb83928 100644
--- a/web-extensions/composer/e-html-editor-undo-redo-manager.c
+++ b/web-extensions/composer/e-html-editor-undo-redo-manager.c
@@ -1493,7 +1493,6 @@ undo_redo_paste (WebKitDOMDocument *document,
if (event->type == HISTORY_PASTE_QUOTED) {
WebKitDOMElement *tmp;
WebKitDOMNode *parent;
- WebKitDOMNode *sibling;
restore_selection_to_history_event_state (document, event->after);
@@ -1507,18 +1506,12 @@ undo_redo_paste (WebKitDOMDocument *document,
while (!WEBKIT_DOM_IS_HTML_BODY_ELEMENT (webkit_dom_node_get_parent_node (parent)))
parent = webkit_dom_node_get_parent_node (parent);
- sibling = webkit_dom_node_get_previous_sibling (parent);
- if (sibling) {
- dom_add_selection_markers_into_element_end (document, WEBKIT_DOM_ELEMENT
(sibling), NULL, NULL);
+ webkit_dom_node_replace_child (
+ webkit_dom_node_get_parent_node (parent),
+ WEBKIT_DOM_NODE (dom_prepare_paragraph (document, extension, TRUE)),
+ parent,
+ NULL);
- remove_node (parent);
- } else {
- webkit_dom_node_replace_child (
- webkit_dom_node_get_parent_node (parent),
- WEBKIT_DOM_NODE (dom_prepare_paragraph (document, extension, TRUE)),
- parent,
- NULL);
- }
dom_selection_restore (document);
} else {
WebKitDOMDOMWindow *dom_window;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]