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

Issue 2462583004: Fix endBatchEdit() state update order issue (Closed)

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

Description

Fix endBatchEdit() state update order issue If we call endBatchEdit() and then call getExtractedText() immediately, then the order gets reversed. The reason is that getExtractedText() is already block-waiting for a new state, and endBatchEdit() was piggy-backing on FROM_IME to enforce a state update. The more natural change source for a state update at the end of a batch edit is actually FROM_NON_IME, which does not interfere with the block-wait mechanism of get* methods. The state update order in the above scenario is fixed because blockAndGetStateUpdate() handles it correctly when it's FROM_NON_IME. Also, now we bounce state update in RenderWidget instead of doing so in ThreadedInputConnection. This is another way to make sure that we get state update at the end of batch edit: the intermediate state update was already bounced off. Now there is no need to check isInBatchEdit() inside ThreadedInputConnection, and ThreadedInputConnectionTest needs to be updated, but let me handle them in a separate CL. BUG=659934 Committed: https://crrev.com/72381b3189537b4e3c7e2dbff8a2ca398bd3b447 Cr-Commit-Position: refs/heads/master@{#428602}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -8 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java View 2 chunks +2 lines, -7 lines 0 comments Download
M content/renderer/render_widget.cc View 2 chunks +4 lines, -1 line 0 comments Download

Messages

Total messages: 13 (7 generated)
Changwan Ryu
PTAL
4 years, 1 month ago (2016-10-29 03:44:59 UTC) #4
aelias_OOO_until_Jul13
lgtm
4 years, 1 month ago (2016-10-29 04:45:50 UTC) #5
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/2462583004/1
4 years, 1 month ago (2016-10-29 05:03:25 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 1 month ago (2016-10-29 05:08:46 UTC) #10
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/72381b3189537b4e3c7e2dbff8a2ca398bd3b447 Cr-Commit-Position: refs/heads/master@{#428602}
4 years, 1 month ago (2016-10-29 05:10:52 UTC) #12
Changwan Ryu
4 years, 1 month ago (2016-10-29 16:31:51 UTC) #13
Message was sent while issue was closed.
A revert of this CL (patchset #1 id:1) has been created in
https://codereview.chromium.org/2463583002/ by changwan@chromium.org.

The reason for reverting is: As pointed out in
https://bugs.chromium.org/p/chromium/issues/detail?id=659934#c23, keyboard may
not show up when it has to with this patch..

Powered by Google App Engine
This is Rietveld 408576698