[evolution/wip/webkit2] EHTMLEditorSelection - Use create_selection_marker function when saving selection



commit ff4f8bdb4469fab39165b00acdba5fb7b712fae5
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Mar 24 16:58:31 2015 +0100

    EHTMLEditorSelection - Use create_selection_marker function when saving selection

 .../e-html-editor-selection-dom-functions.c        |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/web-extensions/e-html-editor-selection-dom-functions.c 
b/web-extensions/e-html-editor-selection-dom-functions.c
index cbb0f1d..f292d26 100644
--- a/web-extensions/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/e-html-editor-selection-dom-functions.c
@@ -1489,8 +1489,7 @@ dom_selection_save (WebKitDOMDocument *document)
                return;
 
        collapsed = webkit_dom_range_get_collapsed (range, NULL);
-       start_marker = webkit_dom_document_create_element (document, "SPAN", NULL);
-       webkit_dom_element_set_id (start_marker, "-x-evo-selection-start-marker");
+       start_marker = create_selection_marker (document, TRUE);
 
        container = webkit_dom_range_get_start_container (range, NULL);
        offset = webkit_dom_range_get_start_offset (range, NULL);
@@ -1600,8 +1599,7 @@ dom_selection_save (WebKitDOMDocument *document)
        webkit_dom_node_normalize (parent_node);
 
  insert_end_marker:
-       end_marker = webkit_dom_document_create_element (document, "SPAN", NULL);
-       webkit_dom_element_set_id (end_marker, "-x-evo-selection-end-marker");
+       end_marker = create_selection_marker (document, FALSE);
 
        if (webkit_dom_range_get_collapsed (range, NULL)) {
                webkit_dom_node_insert_before (


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