Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(338)

Issue 2470713002: [WIP Approach 1] Straighten up input method reactivation

Created:
4 years, 1 month ago by Changwan Ryu
Modified:
4 years, 1 month ago
Reviewers:
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, creis+watch_chromium.org, yusukes+watch_chromium.org, shuchen+watch_chromium.org, nasko+codewatch_chromium.org, jam, nona+watch_chromium.org, darin-cc_chromium.org, agrieve+watch_chromium.org, James Su
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Straighten up input method reactivation On Android, if you move focus from one input form to another, and type a word immediately, then sometimes the original text gets duplicated. The reason is that currently onCreateInputConnection() provides incorrect initial sel start and initial sel end values, and this ended up confusing the keyboard. The changes here include: 1) Ignore IME-initiated operations until restart input gets ACKed. Otherwise, IME operations targeted for the previous input form get applied to the next input form. This apply both to cancel composition and focused node change scenarios. For the deprecating ReplicaInputConnection model, we ignored IME-initiated operations whenever there was renderer-initiated conflict. We dropped the logic for ThreadedInputConnection model, but I think it’s useful when we have to restart input, so partially reviving the logic. 2) Defer cancel composition and focused node changed messages. When CancelComposition and FocusedNodeChanged messages are sent in the middle of IME event guard, input method may see an outdated text input state when restarting input method. We queue the messages and send them at once after UpdateTextInputState() is finished. An alternative approach would be to call focusedNodeChanged after visible selection becomes available, but I couldn't find a way so far. 3) Update text input state when IME event guard finishes. Currently only Android does this. Extend the logic to other platforms in order to implement 2) without adding OS_ANDROID imperatives. BUG=650204

Patch Set 1 #

Patch Set 2 : fix some tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -50 lines) Patch
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/common/text_input_state.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/common/text_input_state.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/view_messages.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 3 chunks +5 lines, -9 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/InputMethodManagerWrapper.java View 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java View 1 2 chunks +4 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnectionFactory.java View 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 chunks +6 lines, -10 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 1 chunk +10 lines, -13 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 2 chunks +3 lines, -3 lines 0 comments Download
M content/renderer/render_widget.h View 1 3 chunks +13 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 10 chunks +35 lines, -9 lines 0 comments Download

Messages

Total messages: 9 (9 generated)
Changwan Ryu
The CQ bit was checked by changwan@chromium.org to run a CQ dry run
4 years, 1 month ago (2016-11-01 07:37:01 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2470713002/1
4 years, 1 month ago (2016-11-01 07:37:27 UTC) #2
Changwan Ryu
Description was changed from ========== Straighten up input method reactivation On Android, if you move ...
4 years, 1 month ago (2016-11-01 07:44:42 UTC) #3
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
4 years, 1 month ago (2016-11-01 08:19:17 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/171804)
4 years, 1 month ago (2016-11-01 08:19:18 UTC) #5
Changwan Ryu
The CQ bit was checked by changwan@chromium.org to run a CQ dry run
4 years, 1 month ago (2016-11-01 09:01:54 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2470713002/20001
4 years, 1 month ago (2016-11-01 09:02:10 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
4 years, 1 month ago (2016-11-01 10:24:42 UTC) #8
commit-bot: I haz the power
4 years, 1 month ago (2016-11-01 10:24:43 UTC) #9
Dry run: Try jobs failed on following builders:
  linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED,
https://build.chromium.org/p/tryserver.chromium.android/builders/linux_androi...)

Powered by Google App Engine
This is Rietveld 408576698