-
Darren Shen authored
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/+/2576067Reviewed-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}
29ff7965