Chromium Code Reviews
DescriptionAllow some InputConnection methods to be called on UI thread
Assertions are removed from some of the InputConnection methods that
merely post on UI thread. In doing so, mPendingAccent was changed to be
accessed only on UI thread.
However, beginBatchEdit() / endBatchEdit() implementations are quite
complicated and no evidence calling those on UI thread was found so far.
Also, for get* methods we return cached results.
BUG=643477
Review-Url: https://codereview.chromium.org/2299913003
Cr-Commit-Position: refs/heads/master@{#417499}
(cherry picked from commit c8a5f86ac17908905756c36a9d4ff87439401994)
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
Review-Url: https://codereview.chromium.org/2309983002
Cr-Commit-Position: refs/heads/master@{#419959}
(cherry picked from commit 4662007a92a92b016ef3f05fb4cbbd6904825cc0)
Also fix build error in ImeTest
Committed: https://chromium.googlesource.com/chromium/src/+/2664606198e8a32b9f5f2464311cfa4663bbc676
Patch Set 1 #Messages
Total messages: 2 (1 generated)
|