Chromium Code Reviews
DescriptionFix endBatchEdit
If we call endBatchEdit() and then call getExtractedText() immediately,
then sometimes InputMethodManager#updateSelection() is not called.
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. In the above scenario, the update from endBatchEdit() gets
consumed by getExtractedText(), and there is no separate updateSelection().
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.
Since state updates in batch mode got ignored in ThreadedInputConnection,
We still need to force-update text input state at the end of a batch
edit. This ensures InputMethodManager#updateSelection() is called at the
end of a batch edit when there was a change.
BUG=659934
Patch Set 1 #Patch Set 2 : fix testBatchEdit_NoOp #
Total comments: 5
Messages
Total messages: 11 (7 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||