• Darren Shen's avatar
    Reland "ime: Handle InsertTextCursorBehavior in InputMethodChromeOS." · 0f79b6e1
    Darren Shen authored
    This is a reland of 29ff7965
    
    Reordered initialization to fix ASAN/MSAN bug.
    
    Original change's description:
    > ime: Handle InsertTextCursorBehavior in InputMethodChromeOS.
    >
    > TextInputClients now support moving the cursor after committing some
    > text. This patch adds support for input engines to call the new API.
    >
    > There is a slight complication with multiple CommitText calls during
    > key event handling. Previously, when handling a key event, any calls
    > to CommitText will be coalesced together and executed once the key
    > event is handled. However, this coalescing logic doesn't handle
    > cursor movement.
    >
    > Add logic to handle cursor movement when coalescing commits by observing that
    > any sequence of CommitTexts with cursor movement can be implemented with two
    > separate CommitTexts. Note that this is a no-op change if the IME never uses
    > the new cursor movement parameter.
    >
    > Bug: 1155331
    > Change-Id: I6c89ec1cde5624eca7bf0d5c803085f7d7803c71
    > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2576067
    > Reviewed-by: Keith Lee <keithlee@chromium.org>
    > Reviewed-by: Alice Boxhall <aboxhall@chromium.org>
    > Commit-Queue: Darren Shen <shend@chromium.org>
    > Cr-Commit-Position: refs/heads/master@{#840082}
    
    Bug: 1155331
    Change-Id: I373a8195946ec4fb966f932eaf084b2b74f06b6c
    Cq-Include-Trybots: luci.chromium.try:linux_chromium_chromeos_msan_rel_ng,linux_chromium_chromeos_asan_rel_ng
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2612604Reviewed-by: default avatarAlice Boxhall <aboxhall@chromium.org>
    Reviewed-by: default avatarJohn Palmer <jopalmer@chromium.org>
    Reviewed-by: default avatarKeith Lee <keithlee@chromium.org>
    Commit-Queue: Darren Shen <shend@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#842595}
    0f79b6e1
input_method_chromeos.h 7.41 KB