[evolution/wip/webkit2] EHTMLEditorSelection - Make sure we really wrap when ending a line



commit 7ff37741d6ffa67ec6e1d7c6af8dbe48e465b184
Author: Tomas Popela <tpopela redhat com>
Date:   Wed Mar 2 12:48:49 2016 +0100

    EHTMLEditorSelection - Make sure we really wrap when ending a line

 .../e-html-editor-selection-dom-functions.c        |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 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 096e9b6..9e051b0 100644
--- a/web-extensions/composer/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-selection-dom-functions.c
@@ -2497,8 +2497,18 @@ wrap_lines (WebKitDOMDocument *document,
                        if (check_next_node)
                                goto check_node;
                        line_length += length_left;
-                       if (line_length == length_to_wrap)
+                       if (line_length == length_to_wrap) {
                                line_length = 0;
+
+                               element = webkit_dom_document_create_element (document, "BR", NULL);
+                               element_add_class (element, "-x-evo-wrap-br");
+
+                               webkit_dom_node_insert_before (
+                                       webkit_dom_node_get_parent_node (node),
+                                       WEBKIT_DOM_NODE (element),
+                                       webkit_dom_node_get_next_sibling (node),
+                                       NULL);
+                       }
                        goto next_node;
                }
 


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