[evolution/wip/webkit2] EHTMLEditorSelection - Anchors could be wrongly wrapped in quoted content



commit 2a823a7e664842c29336bf80d3700a825ae87eb0
Author: Tomas Popela <tpopela redhat com>
Date:   Tue May 31 11:10:53 2016 +0200

    EHTMLEditorSelection - Anchors could be wrongly wrapped in quoted content

 .../e-html-editor-selection-dom-functions.c        |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/modules/webkit-content-editor/web-extension/e-html-editor-selection-dom-functions.c 
b/modules/webkit-content-editor/web-extension/e-html-editor-selection-dom-functions.c
index caab306..316350d 100644
--- a/modules/webkit-content-editor/web-extension/e-html-editor-selection-dom-functions.c
+++ b/modules/webkit-content-editor/web-extension/e-html-editor-selection-dom-functions.c
@@ -2643,7 +2643,11 @@ wrap_lines (WebKitDOMDocument *document,
                                        webkit_dom_html_element_set_outer_text (
                                                WEBKIT_DOM_HTML_ELEMENT (nd), " ", NULL);
                                } else if (!prev_nd) {
-                                       start_point = nd;
+                                       WebKitDOMNode *parent;
+
+                                       parent = webkit_dom_node_get_parent_node (parent);
+                                       if (!WEBKIT_DOM_IS_HTML_ANCHOR_ELEMENT (parent))
+                                               start_point = nd;
                                }
 
                                nd = prev_nd;


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