Blame SOURCES/evolution-3.22.6-composer-font-color.patch

a00a81
diff -up evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-dom-functions.c.composer-font-color evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-dom-functions.c
a00a81
--- evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-dom-functions.c.composer-font-color	2017-03-24 13:43:34.992659166 +0100
a00a81
+++ evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-dom-functions.c	2017-03-24 13:43:34.997659165 +0100
a00a81
@@ -2834,6 +2834,8 @@ body_keypress_event_cb (WebKitDOMElement
a00a81
 
a00a81
 	g_return_if_fail (E_IS_EDITOR_PAGE (editor_page));
a00a81
 
a00a81
+	e_editor_page_set_is_processing_keypress_event (editor_page, TRUE);
a00a81
+
a00a81
 	document = webkit_dom_node_get_owner_document (WEBKIT_DOM_NODE (element));
a00a81
 	dom_window = webkit_dom_document_get_default_view (document);
a00a81
 	dom_selection = webkit_dom_dom_window_get_selection (dom_window);
a00a81
@@ -3583,7 +3585,13 @@ body_input_event_cb (WebKitDOMElement *e
a00a81
 {
a00a81
 	g_return_if_fail (E_IS_EDITOR_PAGE (editor_page));
a00a81
 
a00a81
-	e_editor_dom_body_input_event_process (editor_page, event);
a00a81
+	/* Only process the input event if it was triggered by the key press
a00a81
+	 * and not i.e. by exexCommand. This behavior changed when the support
a00a81
+	 * for beforeinput event was introduced in WebKit. */
a00a81
+	if (e_editor_page_is_processing_keypress_event (editor_page))
a00a81
+		e_editor_dom_body_input_event_process (editor_page, event);
a00a81
+
a00a81
+	e_editor_page_set_is_processing_keypress_event (editor_page, FALSE);
a00a81
 }
a00a81
 
a00a81
 void
a00a81
diff -up evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.c.composer-font-color evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.c
a00a81
--- evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.c.composer-font-color	2017-02-07 17:48:51.000000000 +0100
a00a81
+++ evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.c	2017-03-24 13:43:34.997659165 +0100
a00a81
@@ -64,6 +64,7 @@ struct _EEditorPagePrivate {
a00a81
 	gboolean pasting_content_from_itself;
a00a81
 	gboolean renew_history_after_coordinates;
a00a81
 	gboolean allow_top_signature;
a00a81
+	gboolean processing_keypress_event;
a00a81
 
a00a81
 	GHashTable *inline_images;
a00a81
 
a00a81
@@ -246,6 +247,7 @@ e_editor_page_init (EEditorPage *editor_
a00a81
 	editor_page->priv->block_format = E_CONTENT_EDITOR_BLOCK_FORMAT_PARAGRAPH;
a00a81
 	editor_page->priv->force_image_load = FALSE;
a00a81
 	editor_page->priv->html_mode = TRUE;
a00a81
+	editor_page->priv->processing_keypress_event = FALSE;
a00a81
 	editor_page->priv->return_key_pressed = FALSE;
a00a81
 	editor_page->priv->space_key_pressed = FALSE;
a00a81
 	editor_page->priv->smiley_written = FALSE;
a00a81
@@ -559,6 +561,23 @@ e_editor_page_set_alignment (EEditorPage
a00a81
 }
a00a81
 
a00a81
 gboolean
a00a81
+e_editor_page_is_processing_keypress_event (EEditorPage *editor_page)
a00a81
+{
a00a81
+	g_return_val_if_fail (E_IS_EDITOR_PAGE (editor_page), FALSE);
a00a81
+
a00a81
+	return editor_page->priv->processing_keypress_event;
a00a81
+}
a00a81
+
a00a81
+void
a00a81
+e_editor_page_set_is_processing_keypress_event (EEditorPage *editor_page,
a00a81
+                                                gboolean processing_keypress_event)
a00a81
+{
a00a81
+	g_return_if_fail (E_IS_EDITOR_PAGE (editor_page));
a00a81
+
a00a81
+	editor_page->priv->processing_keypress_event = processing_keypress_event;
a00a81
+}
a00a81
+
a00a81
+gboolean
a00a81
 e_editor_page_get_return_key_pressed (EEditorPage *editor_page)
a00a81
 {
a00a81
 	g_return_val_if_fail (E_IS_EDITOR_PAGE (editor_page), FALSE);
a00a81
diff -up evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.h.composer-font-color evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.h
a00a81
--- evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.h.composer-font-color	2017-02-07 17:48:51.000000000 +0100
a00a81
+++ evolution-3.22.6/modules/webkit-editor/web-extension/e-editor-page.h	2017-03-24 13:43:34.997659165 +0100
a00a81
@@ -112,6 +112,11 @@ void		e_editor_page_set_alignment	(EEdit
a00a81
 						 EContentEditorAlignment value);
a00a81
 gint		e_editor_page_get_word_wrap_length
a00a81
 						(EEditorPage *editor_page);
a00a81
+gboolean	e_editor_page_is_processing_keypress_event
a00a81
+						(EEditorPage *editor_page);
a00a81
+void		e_editor_page_set_is_processing_keypress_event
a00a81
+						(EEditorPage *editor_page,
a00a81
+						 gboolean processing_keypress_event);
a00a81
 gboolean	e_editor_page_get_return_key_pressed
a00a81
 						(EEditorPage *editor_page);
a00a81
 void		e_editor_page_set_return_key_pressed