[Webkit-unassigned] [Bug 191182] New: [GTK] Text offset calculation breaks with certain emojicons
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Nov 2 01:32:31 PDT 2018
https://bugs.webkit.org/show_bug.cgi?id=191182
Bug ID: 191182
Summary: [GTK] Text offset calculation breaks with certain
emojicons
Product: WebKit
Version: Other
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: WebKit Gtk
Assignee: webkit-unassigned at lists.webkit.org
Reporter: mcrha at redhat.com
CC: bugs-noreply at webkitgtk.org
Moving this from a downstream bug report:
https://gitlab.gnome.org/GNOME/evolution/issues/206
It contains more details, I'll summarize it here:
Evolution uses webkit_dom_range_get_end_offset() and webkit_dom_character_data_delete_data() with other offset-related WebKitDOMCharacterData functions to replace emoticons written by a user to either images or Unicode letters or "normalized appearance" (like from ":)" to ":-)"). Just have in Edit->Preferences->Composer Preferences checked [x] Automatically insert emoticons and [x] Use Unicode characters for emoticons, then create a new message in Plain Text mode and type:
:) ;) :)
The first two will be replaced, but the third not ("☺ 😉 :)").
I figured out that the webkit_dom_range_get_end_offset() returns wrong value when the text contains a wink Unicode letter, it says that the end is one letter after the text (character) length. When I workaround it and clamp it, then the replacement of the typed ":)" at the end is made also off-by-one, thus it makes it "☺ 😉)☺" instead of "☺ 😉 ☺", which makes me believe the WebKitDOMCharacterData functions are affected the same way.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20181102/f5b16f46/attachment.html>
More information about the webkit-unassigned
mailing list