Commit 6afeaac2 authored by Yuichiro Hanada's avatar Yuichiro Hanada Committed by Commit Bot

Don't send updated state in FinishComposingText and DeleteSurroundingText.

After calling these method, return values of TextInputClient is not
updated.
This CL removes the text input state update timer when calling the
methods to prevent send a false state.

Bug: 897691
Test: Ran on DUT
Change-Id: I7fdb7f8038391f7e9433ad1de0e0607232e2e890
Reviewed-on: https://chromium-review.googlesource.com/c/1319396Reviewed-by: default avatarYusuke Sato <yusukes@chromium.org>
Commit-Queue: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605845}
parent b159c717
...@@ -116,8 +116,6 @@ void InputConnectionImpl::CommitText(const base::string16& text, ...@@ -116,8 +116,6 @@ void InputConnectionImpl::CommitText(const base::string16& text,
} }
void InputConnectionImpl::DeleteSurroundingText(int before, int after) { void InputConnectionImpl::DeleteSurroundingText(int before, int after) {
StartStateUpdateTimer();
if (before == 0 && after == 0) { if (before == 0 && after == 0) {
// This should be no-op. // This should be no-op.
// Return the current state immediately. // Return the current state immediately.
...@@ -177,8 +175,6 @@ void InputConnectionImpl::SetComposingText( ...@@ -177,8 +175,6 @@ void InputConnectionImpl::SetComposingText(
// so 0 means the cursor should be just before the last character of the text. // so 0 means the cursor should be just before the last character of the text.
new_cursor_pos += text.length() - 1; new_cursor_pos += text.length() - 1;
StartStateUpdateTimer();
const int selection_start = new_selection_range const int selection_start = new_selection_range
? new_selection_range.value().start() ? new_selection_range.value().start()
: new_cursor_pos; : new_cursor_pos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment