[evolution] EHTMLEditorView - Avoid runtime warnings when manipulating with text in table cell



commit 0477d770490f79e0611bf96a3a87ccb075bd8041
Author: Tomas Popela <tpopela redhat com>
Date:   Fri Mar 6 08:50:20 2015 +0100

    EHTMLEditorView - Avoid runtime warnings when manipulating with text in table cell

 e-util/e-html-editor-view.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/e-util/e-html-editor-view.c b/e-util/e-html-editor-view.c
index 24b9428..918096d 100644
--- a/e-util/e-html-editor-view.c
+++ b/e-util/e-html-editor-view.c
@@ -266,6 +266,9 @@ get_parent_block_element (WebKitDOMNode *node)
 {
        WebKitDOMElement *parent = webkit_dom_node_get_parent_element (node);
 
+       if (WEBKIT_DOM_IS_HTML_BODY_ELEMENT (parent))
+               return WEBKIT_DOM_ELEMENT (node);
+
        while (parent &&
               !WEBKIT_DOM_IS_HTML_DIV_ELEMENT (parent) &&
               !WEBKIT_DOM_IS_HTML_QUOTE_ELEMENT (parent) &&
@@ -273,6 +276,7 @@ get_parent_block_element (WebKitDOMNode *node)
               !WEBKIT_DOM_IS_HTMLO_LIST_ELEMENT (parent) &&
               !WEBKIT_DOM_IS_HTML_PRE_ELEMENT (parent) &&
               !WEBKIT_DOM_IS_HTML_HEADING_ELEMENT (parent) &&
+              !WEBKIT_DOM_IS_HTML_TABLE_CELL_ELEMENT (parent) &&
               !element_has_tag (parent, "address")) {
                parent = webkit_dom_node_get_parent_element (
                        WEBKIT_DOM_NODE (parent));


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