[evolution] EHTMLEditorSelection - Avoid the runtime warning when the caret was saved outside of the body



commit 04b05bf605cdad727ad17ed632a37a6635c79f19
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Sep 5 13:34:15 2014 +0200

    EHTMLEditorSelection - Avoid the runtime warning when the caret was saved outside of the body
    
    This could happen during the HTML -> plain text conversion.

 e-util/e-html-editor-selection.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 84f6fbc..d2b4121 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -2612,7 +2612,8 @@ get_parent_indented_block (WebKitDOMNode *node)
        if (element_has_class (WEBKIT_DOM_ELEMENT (parent), "-x-evo-indented"))
                block = parent;
 
-       while (parent && !WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent)) {
+       while (parent && !WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent) &&
+              !WEBKIT_DOM_IS_HTML_HTML_ELEMENT (parent)) {
                if (element_has_class (WEBKIT_DOM_ELEMENT (parent), "-x-evo-indented"))
                        block = parent;
                parent = webkit_dom_node_get_parent_node (parent);


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