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

Issue 2309983002: Allow selection change update before beginBatchEdit (Closed)

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

Description

Allow selection change update before beginBatchEdit Currently, selection changes immediately before beginBatchEdit() may be merged into batch edit selection update which happens at endBatchEdit(). The reason is that it takes round-trip time to get update from previous operation and if we increment mNumNestedBatchEdits in beginBatchEdit() before the update from renderer process arrives at browser process, then the update from operation will be ignored because mNumNestedBatchEdits > 0. This can be prevented if we keep the batch edit information in renderer and tag it to each text input state update. Note that mNumNestedBatchEdits should still be kept in ThreadedInputConnection to return the correct value in endBatchEdit(). BUG=644574, 643473, 643477 Committed: https://crrev.com/4662007a92a92b016ef3f05fb4cbbd6904825cc0 Cr-Commit-Position: refs/heads/master@{#419959}

Patch Set 1 #

Patch Set 2 : fix from_ime and fix tests #

Patch Set 3 : fix test failure #

Patch Set 4 : polish up a bit #

Total comments: 11

Patch Set 5 : fix for get* methods inside batch edit #

Patch Set 6 : add a unit test for no-op batch edit #

Patch Set 7 : fixed a test failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+219 lines, -52 lines) Patch
M content/browser/android/content_view_core_impl.h View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.h View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 1 2 3 4 1 chunk +20 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M content/common/input_messages.h View 1 2 3 4 1 chunk +3 lines, -0 lines 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 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ChromiumBaseInputConnection.java View 1 chunk +3 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 1 2 3 4 4 chunks +26 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ReplicaInputConnection.java View 1 chunk +2 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/TextInputState.java View 4 chunks +9 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java View 1 2 3 4 7 chunks +34 lines, -10 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 3 4 5 6 2 chunks +14 lines, -9 lines 0 comments Download
M content/public/android/junit/src/org/chromium/content/browser/input/TextInputStateTest.java View 2 chunks +2 lines, -2 lines 0 comments Download
M content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionFactoryTest.java View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M content/public/android/junit/src/org/chromium/content/browser/input/ThreadedInputConnectionTest.java View 1 2 3 4 5 6 chunks +62 lines, -16 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 3 4 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 4 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 47 (28 generated)
Changwan Ryu
4 years, 3 months ago (2016-09-06 08:57:15 UTC) #8
Changwan Ryu
Fixed test failure. PTAL. BTW, one big advantage of this approach is that we can ...
4 years, 3 months ago (2016-09-07 07:29:25 UTC) #13
Changwan Ryu
On 2016/09/07 07:29:25, Changwan Ryu wrote: > Fixed test failure. PTAL. > > BTW, one ...
4 years, 3 months ago (2016-09-13 02:15:14 UTC) #20
aelias_OOO_until_Jul13
https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java File content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java (right): https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java#newcode77 content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java:77: private final Runnable mBeginBatchEdit = new Runnable() { Looking ...
4 years, 3 months ago (2016-09-13 02:26:51 UTC) #21
aelias_OOO_until_Jul13
https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java File content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java (right): https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java#newcode151 content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java:151: mLastInBatchEditMode = inBatchEditMode; On 2016/09/13 at 02:26:51, aelias wrote: ...
4 years, 3 months ago (2016-09-13 02:29:59 UTC) #22
Changwan Ryu
PTAL https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java File content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java (right): https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java#newcode77 content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java:77: private final Runnable mBeginBatchEdit = new Runnable() { ...
4 years, 3 months ago (2016-09-19 01:51:27 UTC) #25
aelias_OOO_until_Jul13
https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java File content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java (right): https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java#newcode77 content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java:77: private final Runnable mBeginBatchEdit = new Runnable() { On ...
4 years, 3 months ago (2016-09-19 19:29:27 UTC) #26
Changwan Ryu
https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java File content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java (right): https://codereview.chromium.org/2309983002/diff/60001/content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java#newcode77 content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java:77: private final Runnable mBeginBatchEdit = new Runnable() { Actually, ...
4 years, 3 months ago (2016-09-20 00:22:00 UTC) #27
aelias_OOO_until_Jul13
Thanks, this patch lgtm.
4 years, 3 months ago (2016-09-20 03:49:51 UTC) #28
aelias_OOO_until_Jul13
Adding avi@ for content/ OWNERS.
4 years, 3 months ago (2016-09-20 04:03:07 UTC) #30
Avi (use Gerrit)
LGTM stamp for content, but you'll need an ipc reviewer.
4 years, 3 months ago (2016-09-20 14:08:18 UTC) #32
Changwan Ryu
dcheng@, could you take a look at IPC / messages?
4 years, 3 months ago (2016-09-20 23:49:35 UTC) #34
dcheng
ipc lgtm
4 years, 3 months ago (2016-09-21 01:04:12 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2309983002/100001
4 years, 3 months ago (2016-09-21 01:11:21 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2309983002/120001
4 years, 3 months ago (2016-09-21 02:11:39 UTC) #41
commit-bot: I haz the power
Committed patchset #7 (id:120001)
4 years, 3 months ago (2016-09-21 03:06:29 UTC) #43
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/4662007a92a92b016ef3f05fb4cbbd6904825cc0 Cr-Commit-Position: refs/heads/master@{#419959}
4 years, 3 months ago (2016-09-21 03:07:15 UTC) #45
Changwan Ryu
A revert of this CL (patchset #7 id:120001) has been created in https://codereview.chromium.org/2462853002/ by changwan@chromium.org. ...
4 years, 1 month ago (2016-10-29 16:54:38 UTC) #46
Changwan Ryu
4 years, 1 month ago (2016-11-04 06:40:31 UTC) #47
Message was sent while issue was closed.
A revert of this CL (patchset #7 id:120001) has been created in
https://codereview.chromium.org/2476883003/ by changwan@chromium.org.

The reason for reverting is: This led to crbug.com/659934 because FROM_IME
message created for endBatchEdit() was consumed by get* method. In this case
state update does not get sent out to InputMethodManager. (really reverting it
for M56 as the fix is taking longer).

Powered by Google App Engine
This is Rietveld 408576698