Chromium Code Reviews
DescriptionFix 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 #
Messages
Total messages: 13 (7 generated)
|
||||||||||||||||||||||||||||