[evolution/wip/webkit2] EHTMLEditorSelection - Return the right font color when is set on body
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] EHTMLEditorSelection - Return the right font color when is set on body
- Date: Wed, 22 Apr 2015 13:11:49 +0000 (UTC)
commit 57cd375d2246100a7a68bf840598dbd707178398
Author: Tomas Popela <tpopela redhat com>
Date: Mon Mar 30 11:10:03 2015 +0200
EHTMLEditorSelection - Return the right font color when is set on body
.../e-html-editor-selection-dom-functions.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/web-extensions/e-html-editor-selection-dom-functions.c
b/web-extensions/e-html-editor-selection-dom-functions.c
index 8070217..3415bdc 100644
--- a/web-extensions/e-html-editor-selection-dom-functions.c
+++ b/web-extensions/e-html-editor-selection-dom-functions.c
@@ -3849,8 +3849,14 @@ dom_selection_get_font_color (WebKitDOMDocument *document,
gchar *color;
color = get_font_property (document, "color");
- if (!(color && *color))
- return g_strdup ("#000000");
+ if (!(color && *color)) {
+ WebKitDOMHTMLElement *body;
+
+ body = webkit_dom_document_get_body (document);
+ color = webkit_dom_html_body_element_get_text (WEBKIT_DOM_HTML_BODY_ELEMENT (body));
+ if (!(color && *color))
+ return g_strdup ("#000000");
+ }
return color;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]