[evolution/wip/webkit2] EHTMLEditorSelection - Alignment cannot be set back to left in list
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorSelection - Alignment cannot be set back to left in list
- Date: Thu, 25 Feb 2016 20:36:40 +0000 (UTC)
commit 1276f72d0774d044ebaaa12a74a15abf40ad582d
Author: Tomas Popela <tpopela redhat com>
Date: Thu Feb 25 21:09:51 2016 +0100
EHTMLEditorSelection - Alignment cannot be set back to left in list
.../e-html-editor-selection-dom-functions.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 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 03918f5..d62cfeb 100644
--- a/web-extensions/composer/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/composer/e-html-editor-selection-dom-functions.c
@@ -503,6 +503,17 @@ dom_get_alignment (WebKitDOMDocument *document)
else
element = webkit_dom_node_get_parent_element (node);
+ if (WEBKIT_DOM_IS_HTML_LI_ELEMENT (element)) {
+ if (element_has_class (element, "-x-evo-align-right"))
+ alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_RIGHT;
+ else if (element_has_class (element, "-x-evo-align-center"))
+ alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_CENTER;
+ else
+ alignment = E_HTML_EDITOR_SELECTION_ALIGNMENT_LEFT;
+
+ return alignment;
+ }
+
dom_window = webkit_dom_document_get_default_view (document);
style = webkit_dom_dom_window_get_computed_style (dom_window, element, NULL);
value = webkit_dom_css_style_declaration_get_property_value (style, "text-align");
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]