[evolution] Bug 749712 - Undo/Redo in composer doesn't work right
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 749712 - Undo/Redo in composer doesn't work right
- Date: Fri, 11 Dec 2015 10:29:32 +0000 (UTC)
commit 87a27e49205de7ab11de3ad8b979e16f0b460ae7
Author: Tomas Popela <tpopela redhat com>
Date: Fri Dec 11 11:25:54 2015 +0100
Bug 749712 - Undo/Redo in composer doesn't work right
Implement the workaround on the Evolution side. The cause of the bug is that
WebKit is having problems determining the right line height for some fonts and
font sizes (the right and wrong value differ by 1). To fix this we will add an
extra one to the final top offset. This is safe to do even for fonts and font
sizes that don't behave badly as we will still get the right element as we use
fonts bigger than 1 pixel.
e-util/e-html-editor-selection.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-html-editor-selection.c b/e-util/e-html-editor-selection.c
index a64c939..4a2914d 100644
--- a/e-util/e-html-editor-selection.c
+++ b/e-util/e-html-editor-selection.c
@@ -1678,7 +1678,7 @@ e_html_editor_selection_get_selection_coordinates (EHTMLEditorSelection *selecti
if (created_selection_markers)
e_html_editor_selection_restore (selection);
- return;
+ goto workaroud;
}
element = webkit_dom_document_get_element_by_id (
@@ -1701,6 +1701,16 @@ e_html_editor_selection_get_selection_coordinates (EHTMLEditorSelection *selecti
if (created_selection_markers)
e_html_editor_selection_restore (selection);
+
+ workaroud:
+ /* Workaround for bug 749712 on the Evolution side. The cause of the bug
+ * is that WebKit is having problems determining the right line height
+ * for some fonts and font sizes (the right and wrong value differ by 1).
+ * To fix this we will add an extra one to the final top offset. This is
+ * safe to do even for fonts and font sizes that don't behave badly as we
+ * will still get the right element as we use fonts bigger than 1 pixel. */
+ *start_y += 1;
+ *end_y += 1;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]