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

Issue 2681833006: [Android] Restart input only once on focus change (Closed)

Created:
3 years, 10 months ago by Changwan Ryu
Modified:
3 years, 10 months ago
CC:
agrieve+watch_chromium.org, blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, dtapuska+chromiumwatch_chromium.org, jam, kinuko+watch, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Android] Restart input only once on focus change Even when finishComposingText() returns false in InputMethodController::willChangeFocus(), we do not need to reset input because RenderFrameImpl::focusedNodeChanged() will reset input in the later part of focus change process. Also, currently updateKeyboardVisibility() and updateState() in ImeAdapter may each restart input which is another source of redundant restart input. By merging the code path and changing some order of execution, we can reduce additional restart input. Lastly, we defer restartInput until the next state update. By the time we send FocusedNodeChanged, selection is not created for the newly focused input because of the reason mentioned in http://crbug.com/650204#c17, so we want to defer it in order to provide correct initial sel values for View#onCreateInputConnection(). BUG=650204 Review-Url: https://codereview.chromium.org/2681833006 Cr-Commit-Position: refs/heads/master@{#451269} Committed: https://chromium.googlesource.com/chromium/src/+/62f5729e30dc50465f85419949564cb6e786dd49

Patch Set 1 #

Total comments: 6

Patch Set 2 : addressed aelias@'s comments #

Total comments: 2

Patch Set 3 : fixed nit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -77 lines) Patch
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 1 chunk +3 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 1 2 6 chunks +35 lines, -39 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 chunks +37 lines, -7 lines 0 comments Download
M content/renderer/input/render_widget_input_handler_delegate.h View 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/render_view_impl.h View 1 chunk +0 lines, -1 line 0 comments Download
M content/renderer/render_view_impl.cc View 1 1 chunk +0 lines, -4 lines 0 comments Download
M content/renderer/render_widget.h View 1 2 chunks +1 line, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 1 chunk +1 line, -3 lines 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.h View 1 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/ChromeClientImpl.cpp View 1 2 1 chunk +0 lines, -5 lines 0 comments Download
M third_party/WebKit/public/web/WebViewClient.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebWidgetClient.h View 1 chunk +0 lines, -4 lines 0 comments Download

Messages

Total messages: 23 (14 generated)
Changwan Ryu
PTAL
3 years, 10 months ago (2017-02-09 07:29:21 UTC) #4
Changwan Ryu
A gentle ping - could you take a look?
3 years, 10 months ago (2017-02-16 00:31:14 UTC) #7
aelias_OOO_until_Jul13
lgtm modulo minor comments. Sorry this fell off my radar last week. https://codereview.chromium.org/2681833006/diff/1/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java File content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java ...
3 years, 10 months ago (2017-02-16 04:19:04 UTC) #8
Changwan Ryu
https://codereview.chromium.org/2681833006/diff/1/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java File content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java (right): https://codereview.chromium.org/2681833006/diff/1/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java#newcode280 content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java:280: Log.w(TAG, "updateKeyboardVisibility: type [%d->%d], flags [%d], show [%b], ", ...
3 years, 10 months ago (2017-02-16 07:17:13 UTC) #10
Changwan Ryu
adding yosin@ for InputMethodController.cpp. PTAL.
3 years, 10 months ago (2017-02-16 07:17:54 UTC) #13
yosin_UTC9
lgtm for core/editing Thanks for removing Blink/Content API! https://codereview.chromium.org/2681833006/diff/20001/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java File content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java (right): https://codereview.chromium.org/2681833006/diff/20001/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java#newcode311 content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java:311: if ...
3 years, 10 months ago (2017-02-16 10:00:46 UTC) #14
Changwan Ryu
https://codereview.chromium.org/2681833006/diff/20001/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java File content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java (right): https://codereview.chromium.org/2681833006/diff/20001/content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java#newcode311 content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java:311: if (textInputType != TextInputType.NONE) { On 2017/02/16 10:00:45, yosin_UTC9 ...
3 years, 10 months ago (2017-02-17 06:48:37 UTC) #17
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/2681833006/40001
3 years, 10 months ago (2017-02-17 06:49:10 UTC) #20
commit-bot: I haz the power
3 years, 10 months ago (2017-02-17 08:29:22 UTC) #23
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://chromium.googlesource.com/chromium/src/+/62f5729e30dc50465f8541994956...

Powered by Google App Engine
This is Rietveld 408576698