[evolution/wip/webkit2] wrap_lines() is called with active selection, possibly leaving the part of the block unwrapped
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] wrap_lines() is called with active selection, possibly leaving the part of the block unwrapped
- Date: Tue, 26 Jul 2016 13:01:18 +0000 (UTC)
commit c42d3bcae5c12b78b12fbb7ccfe9a0496558a6ab
Author: Tomas Popela <tpopela redhat com>
Date: Tue Jul 26 14:56:26 2016 +0200
wrap_lines() is called with active selection, possibly leaving the part of the block unwrapped
.../web-extension/e-editor-dom-functions.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
index 32a6efc..665877b 100644
--- a/modules/webkit-editor/web-extension/e-editor-dom-functions.c
+++ b/modules/webkit-editor/web-extension/e-editor-dom-functions.c
@@ -7987,6 +7987,8 @@ e_editor_dom_process_content_to_plain_text_for_exporting (EEditorPage *editor_pa
WebKitDOMDocument *document;
WebKitDOMNode *body, *source;
WebKitDOMNodeList *list;
+ WebKitDOMDOMWindow *dom_window;
+ WebKitDOMDOMSelection *dom_selection;
gboolean wrap = FALSE, quote = FALSE, remove_last_new_line = FALSE;
gint length, ii;
GString *plain_text;
@@ -8081,6 +8083,12 @@ e_editor_dom_process_content_to_plain_text_for_exporting (EEditorPage *editor_pa
list = webkit_dom_element_query_selector_all (
WEBKIT_DOM_ELEMENT (source), "[data-evo-paragraph]", NULL);
+ dom_window = webkit_dom_document_get_default_view (document);
+ dom_selection = webkit_dom_dom_window_get_selection (dom_window);
+ webkit_dom_dom_selection_collapse_to_end (dom_selection, NULL);
+ g_object_unref (dom_window);
+ g_object_unref (dom_selection);
+
length = webkit_dom_node_list_get_length (list);
for (ii = 0; ii < length; ii++) {
WebKitDOMNode *paragraph;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]