Remove VisiblePositions usage during composition.
There are cases where the IME tries to replace the characters that are in the middle of grapheme cluster and in those cases |VisiblePositions| adjust the positions to not be at the middle of grapheme clusters. Thus this ends up replacing/duplicating characters in many languages such as Devanagari, Tibetan, Burmese etc. In this patch we are using the |SelectionInDOMTree| instead which has the correct node and offsets which is used to place the positions in the middle of grapheme cluster and perform the composition operation correctly. Also added logic to not remove the existing TypingCommand when a composition is in-progress. Bug: 621394, 1020371 Change-Id: I6472ce2e2e34b43ec3e385a2874dee29a158f5ca Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2619002 Commit-Queue: Anupam Snigdha <snianu@microsoft.com> Reviewed-by:Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#843126}
Showing
Please register or sign in to comment