[evolution] EHTMLEditorSelection - Avoid unnecessary wrapping for paragraphs that are wrapped with CSS
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] EHTMLEditorSelection - Avoid unnecessary wrapping for paragraphs that are wrapped with CSS
- Date: Wed, 22 Oct 2014 08:45:38 +0000 (UTC)
commit 5603dd5fa0ed6f319d4acfa463254ceb1b014882
Author: Tomas Popela <tpopela redhat com>
Date: Wed Oct 22 10:43:56 2014 +0200
EHTMLEditorSelection - Avoid unnecessary wrapping for paragraphs that are wrapped with CSS
e-util/e-html-editor-selection.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index 476ab7d..8231610 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -1958,8 +1958,9 @@ process_block_to_block (EHTMLEditorSelection *selection,
citation_level = get_citation_level (WEBKIT_DOM_NODE (element));
quote = citation_level ? citation_level * 2 : 0;
- element = e_html_editor_selection_wrap_paragraph_length (
- selection, element, selection->priv->word_wrap_length - quote);
+ if (citation_level > 0)
+ element = e_html_editor_selection_wrap_paragraph_length (
+ selection, element, selection->priv->word_wrap_length - quote);
}
if (quoted)
@@ -5779,8 +5780,12 @@ e_html_editor_selection_wrap_paragraphs_in_document (EHTMLEditorSelection *selec
g_return_if_fail (E_IS_HTML_EDITOR_SELECTION (selection));
+ /* Only wrap paragraphs that are inside the quoted content, others are
+ * wrapped by CSS. */
list = webkit_dom_document_query_selector_all (
- document, "div.-x-evo-paragraph:not(#-x-evo-input-start)", NULL);
+ document,
+ "blockquote[type=cite] > div.-x-evo-paragraph:not(#-x-evo-input-start)",
+ NULL);
length = webkit_dom_node_list_get_length (list);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]