Chromium Code Reviews
Description[Android] Restart input only once on focus change
Even when finishComposingText() returns false in
InputMethodController::willChangeFocus(), we do not need to reset input
because RenderFrameImpl::focusedNodeChanged() will reset input in the
later part of focus change process.
Also, currently updateKeyboardVisibility() and updateState() in ImeAdapter
may each restart input which is another source of redundant restart input.
By merging the code path and changing some order of execution, we can
reduce additional restart input.
Lastly, we defer restartInput until the next state update. By the time we
send FocusedNodeChanged, selection is not created for the newly focused
input because of the reason mentioned in http://crbug.com/650204#c17,
so we want to defer it in order to provide correct initial sel values for
View#onCreateInputConnection().
BUG=650204
Review-Url: https://codereview.chromium.org/2681833006
Cr-Commit-Position: refs/heads/master@{#451269}
Committed: https://chromium.googlesource.com/chromium/src/+/62f5729e30dc50465f85419949564cb6e786dd49
Patch Set 1 #
Total comments: 6
Patch Set 2 : addressed aelias@'s comments #
Total comments: 2
Patch Set 3 : fixed nit #Messages
Total messages: 23 (14 generated)
|