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

Issue 2355483006: Allow some InputConnection methods to be called on UI thread (Closed)

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

Description

Allow 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -93 lines) Patch
M content/browser/android/content_view_core_impl.h View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 2 chunks +4 lines, -2 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.h View 1 chunk +2 lines, -0 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 1 chunk +20 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/common/input_messages.h View 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 chunk +1 line, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 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 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 29 chunks +80 lines, -51 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 2 chunks +36 lines, -8 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/ThreadedInputConnectionTest.java View 11 chunks +99 lines, -17 lines 0 comments Download
M content/renderer/render_widget.h View 2 chunks +8 lines, -0 lines 0 comments Download
M content/renderer/render_widget.cc View 4 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (1 generated)
Changwan Ryu
4 years, 3 months ago (2016-09-21 06:06:52 UTC) #2
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
2664606198e8a32b9f5f2464311cfa4663bbc676.

Powered by Google App Engine
This is Rietveld 408576698