EHTMLEditorView - Make get_parent_block_element public

This commit is contained in:
Tomas Popela
2015-03-06 12:27:19 +01:00
parent 65d37bb152
commit 8fa63f0228
3 changed files with 3 additions and 25 deletions

View File

@ -25,7 +25,6 @@
#include "e-html-editor-hrule-dialog.h"
#include "e-html-editor-utils.h"
#include "e-html-editor-view.h"
#include "e-web-view.h"
#include <glib/gi18n-lib.h>
#include <webkit/webkitdom.h>
@ -207,29 +206,6 @@ html_editor_hrule_dialog_hide (GtkWidget *widget)
GTK_WIDGET_CLASS (e_html_editor_hrule_dialog_parent_class)->hide (widget);
}
static WebKitDOMElement *
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) &&
!WEBKIT_DOM_IS_HTMLU_LIST_ELEMENT (parent) &&
!WEBKIT_DOM_IS_HTMLO_LIST_ELEMENT (parent) &&
!WEBKIT_DOM_IS_HTML_PRE_ELEMENT (parent) &&
!WEBKIT_DOM_IS_HTML_HEADING_ELEMENT (parent) &&
!element_has_tag (parent, "address")) {
parent = webkit_dom_node_get_parent_element (
WEBKIT_DOM_NODE (parent));
}
return parent;
}
static void
html_editor_hrule_dialog_show (GtkWidget *widget)
{

View File

@ -261,7 +261,7 @@ html_editor_view_should_show_delete_interface_for_element (EHTMLEditorView *view
return FALSE;
}
static WebKitDOMElement *
WebKitDOMElement *
get_parent_block_element (WebKitDOMNode *node)
{
WebKitDOMElement *parent = webkit_dom_node_get_parent_element (node);

View File

@ -184,6 +184,8 @@ void e_html_editor_view_set_is_message_from_edit_as_new
void e_html_editor_view_set_remove_initial_input_line
(EHTMLEditorView *view,
gboolean value);
WebKitDOMElement *
get_parent_block_element (WebKitDOMNode *node);
G_END_DECLS
#endif /* E_HTML_EDITOR_VIEW_H */