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

Issue 1589953005: Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 (Closed)

Created:
4 years, 11 months ago by kinaba
Modified:
4 years, 9 months ago
CC:
asvitkine+watch_chromium.org, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nona+watch_chromium.org, shuchen+watch_chromium.org, James Su, vmpstr+watch_chromium.org, yusukes+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support InputMethodManager#updateCursorAnchorInfo for Android 5.0 This is the 6th part of the series of CLs to enable InputMethodManager#updateCursorAnchorInfo support for Android 5.0. - part1 crrev.com/671503005 - part2 crrev.com/679223002 - part3 crrev.com/755853004 - part4 crrev.com/784503002 - part5 crrev.com/757233003 It enables the feature under a flag, with one possible optimization chance (dynamic subscription) not yet implemented. This is based on yukawa@'s original CL (http://crrev.com/699333003), and adds accommodation with recent changes on coordinate systems in Chromium trunk. It also adds a few comments on coordinate systems so that the intention of the code become clearer. This CL consists of the following 3 parts, 1. Adds CursorAnchorInfoController as the central place to control when and how CursorAnchorInfo object should be built and sent to the IME. 2. Adds tests for CursorAnchorInfoController. 3. Modifies renderer_widget_host_view_android and ContentViewCore to wire necessary parameters to CursorAnchorInfoController. Design Doc: https://docs.google.com/a/chromium.org/document/d/1KdnoynGURrJBP1vDHcv2jwUdnsXHzRSxb5v4rK7UgtU/view BUG=424866 TEST=Manually done on Nexus 6 Build/MMB29S, Nexus 4 Build/LMY48T TEST=build/android/test_runner.py instrumentation --release \ --test-apk=ContentShellTest -f '*CursorAnchorInfoControllerTest*' TEST=build/android/test_runner.py instrumentation --release \ --test-apk=ContentShellTest -f '*ImeLollipopTest*' Committed: https://crrev.com/d607fd36000c470d91dd96976698e63beeb87980 Cr-Commit-Position: refs/heads/master@{#380504}

Patch Set 1 #

Patch Set 2 : Rebase (yukawa@'s base CL + fix only build errors) #

Patch Set 3 : Update to reflect coordinate changes. #

Patch Set 4 : Fix tests, add comments #

Patch Set 5 : (WIP for reflecting (#c6): removed KK compatibility layer.) #

Patch Set 6 : (Partially) added ImeTest. Reset on InputConnection creation. #

Patch Set 7 : Fix Findbugs warning / Simplify the state transition. #

Total comments: 33

Patch Set 8 : Address/reply to the comments. (flag is still remaining.) #

Patch Set 9 : Flag removed version. #

Total comments: 1

Patch Set 10 : Removed the renderer side flagging completely. #

Patch Set 11 : Comment remove. #

Total comments: 10

Patch Set 12 : Rebase over ThreadedInputConnnection CL. #

Total comments: 8

Patch Set 13 : Addressed #36. Added ImeLollipopTest for IMMEDIATE case. #

Total comments: 32

Patch Set 14 : (bare rebase) #

Patch Set 15 : Addressed comments in #38 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1197 lines, -18 lines) Patch
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +6 lines, -1 line 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +21 lines, -2 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +26 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +7 lines, -2 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +9 lines, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +14 lines, -0 lines 0 comments Download
A content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +280 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 11 chunks +99 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ReplicaInputConnection.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +11 lines, -0 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +9 lines, -3 lines 0 comments Download
A content/public/android/javatests/src/org/chromium/content/browser/input/CursorAnchorInfoControllerTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +589 lines, -0 lines 0 comments Download
A content/public/android/javatests/src/org/chromium/content/browser/input/ImeLollipopTest.java View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +97 lines, -0 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -3 lines 0 comments Download
M content/public/test/android/javatests/src/org/chromium/content/browser/test/util/TestInputMethodManagerWrapper.java View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +22 lines, -1 line 0 comments Download
M content/renderer/render_widget.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +0 lines, -5 lines 0 comments Download

Messages

Total messages: 48 (16 generated)
Changwan Ryu
Thanks for making this change. Some questions before looking into details. 1) Do we really ...
4 years, 10 months ago (2016-02-02 09:07:48 UTC) #6
kinaba
+yukawa: I delegated one question to you. Thanks for the comments! On 2016/02/02 09:07:48, Changwan ...
4 years, 10 months ago (2016-02-03 05:57:25 UTC) #8
yukawa
On 2016/02/03 05:57:25, kinaba wrote: > > Which option does Google Japanese IME use between ...
4 years, 10 months ago (2016-02-04 02:03:58 UTC) #9
kinaba
Thanks for the inputs. Patch Set 6 includes the following changes: - Limited the tests ...
4 years, 10 months ago (2016-02-09 09:01:13 UTC) #10
aelias_OOO_until_Jul13
The approach looks fine at a high level, below are mostly just comments on implementation ...
4 years, 10 months ago (2016-02-10 08:23:42 UTC) #11
kinaba
Thanks for the comments!! Sorry my belated response (I was on a holidays last Thu-Fri ...
4 years, 10 months ago (2016-02-15 07:59:16 UTC) #12
yukawa
On 2016/02/15 07:59:16, kinaba wrote: > My understanding was: > - onRequestCursorUpdates comes from some ...
4 years, 10 months ago (2016-02-15 08:26:00 UTC) #13
kinaba
On 2016/02/15 08:26:00, yukawa wrote: > internal proxy object that keeps receiving incoming Binder calls ...
4 years, 10 months ago (2016-02-15 10:45:52 UTC) #14
Changwan Ryu
On 2016/02/15 10:45:52, kinaba wrote: > On 2016/02/15 08:26:00, yukawa wrote: > > internal proxy ...
4 years, 10 months ago (2016-02-15 11:53:27 UTC) #15
kinaba
> On the threading concern: OK, that's totally due to my misunderstanding. I read the ...
4 years, 10 months ago (2016-02-16 08:53:22 UTC) #16
yukawa
On 2016/02/16 08:53:22, kinaba wrote: > > could browser simply ask renderer to turn on/off ...
4 years, 10 months ago (2016-02-16 15:41:59 UTC) #18
Changwan Ryu
https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java File content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java (right): https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java#newcode57 content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java:57: private float mScale; On 2016/02/10 08:23:41, aelias wrote: > ...
4 years, 10 months ago (2016-02-17 00:21:05 UTC) #19
kinaba
https://codereview.chromium.org/1589953005/diff/140001/content/browser/renderer_host/ime_adapter_android.h File content/browser/renderer_host/ime_adapter_android.h (right): https://codereview.chromium.org/1589953005/diff/140001/content/browser/renderer_host/ime_adapter_android.h#newcode85 content/browser/renderer_host/ime_adapter_android.h:85: void SetCharacterBounds(const std::vector<gfx::Rect>& rects); On 2016/02/10 08:23:41, aelias_OOO_until_Feb_23 wrote: ...
4 years, 10 months ago (2016-02-19 12:28:29 UTC) #22
kinaba
Inviting +jdduke as a reviewer. Could you kindly take a look? I took over the ...
4 years, 10 months ago (2016-02-19 12:44:08 UTC) #24
jdduke (slow)
On 2016/02/19 12:44:08, kinaba wrote: > Inviting +jdduke as a reviewer. Could you kindly take ...
4 years, 10 months ago (2016-02-19 16:28:07 UTC) #25
aelias_OOO_until_Jul13
https://codereview.chromium.org/1589953005/diff/140001/content/browser/android/content_view_core_impl.h File content/browser/android/content_view_core_impl.h (right): https://codereview.chromium.org/1589953005/diff/140001/content/browser/android/content_view_core_impl.h#newcode312 content/browser/android/content_view_core_impl.h:312: // Selection bounds are in DIP coordinates. > On ...
4 years, 10 months ago (2016-02-24 03:16:39 UTC) #26
jdduke (slow)
https://codereview.chromium.org/1589953005/diff/220001/content/renderer/render_widget.cc File content/renderer/render_widget.cc (right): https://codereview.chromium.org/1589953005/diff/220001/content/renderer/render_widget.cc#newcode1750 content/renderer/render_widget.cc:1750: void RenderWidget::UpdateCompositionInfo(bool should_update_range) { The problem is, this method ...
4 years, 10 months ago (2016-02-24 04:00:45 UTC) #27
aelias_OOO_until_Jul13
On 2016/02/24 at 04:00:45, jdduke wrote: > https://codereview.chromium.org/1589953005/diff/220001/content/renderer/render_widget.cc > File content/renderer/render_widget.cc (right): > > https://codereview.chromium.org/1589953005/diff/220001/content/renderer/render_widget.cc#newcode1750 ...
4 years, 10 months ago (2016-02-24 04:18:49 UTC) #28
kinaba
On 2016/02/24 04:18:49, aelias wrote: > On 2016/02/24 at 04:00:45, jdduke wrote: > > > ...
4 years, 10 months ago (2016-02-25 09:37:25 UTC) #29
aelias_OOO_until_Jul13
https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java File content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java (right): https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java#newcode219 content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java:219: || Math.abs(scale - mScale) > 1e-5 On 2016/02/19 at ...
4 years, 10 months ago (2016-02-26 08:25:33 UTC) #30
kinaba
https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java File content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java (right): https://codereview.chromium.org/1589953005/diff/140001/content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java#newcode219 content/public/android/java/src/org/chromium/content/browser/input/CursorAnchorInfoController.java:219: || Math.abs(scale - mScale) > 1e-5 On 2016/02/26 08:25:32, ...
4 years, 9 months ago (2016-03-01 08:46:46 UTC) #32
aelias_OOO_until_Jul13
lgtm, thanks. Adding tedchoc@ for other browser files OWNERs, sievers@ for small content/renderer change.
4 years, 9 months ago (2016-03-01 18:49:53 UTC) #34
no sievers
On 2016/03/01 18:49:53, aelias wrote: > lgtm, thanks. Adding tedchoc@ for other browser files OWNERs, ...
4 years, 9 months ago (2016-03-01 18:53:53 UTC) #35
Changwan Ryu
lgtm with nits https://codereview.chromium.org/1589953005/diff/280001/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java File content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java (right): https://codereview.chromium.org/1589953005/diff/280001/content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java#newcode80 content/public/android/java/src/org/chromium/content/browser/RenderCoordinates.java:80: * Sets several fields for unit ...
4 years, 9 months ago (2016-03-01 19:11:42 UTC) #36
kinaba
Thanks guys! Reflected comments by Changwan and filled my TODO in ImeLollipopTest. I'll wait for ...
4 years, 9 months ago (2016-03-02 07:46:30 UTC) #37
Ted C
nothing too major and mostly style nits https://codereview.chromium.org/1589953005/diff/300001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1589953005/diff/300001/content/browser/android/content_view_core_impl.cc#newcode437 content/browser/android/content_view_core_impl.cc:437: // Android ...
4 years, 9 months ago (2016-03-07 21:31:45 UTC) #38
kinaba
Thanks! https://codereview.chromium.org/1589953005/diff/300001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/1589953005/diff/300001/content/browser/android/content_view_core_impl.cc#newcode437 content/browser/android/content_view_core_impl.cc:437: // Android Framework as of API Level 21. ...
4 years, 9 months ago (2016-03-10 06:24:12 UTC) #39
Ted C
lgtm
4 years, 9 months ago (2016-03-10 18:14:42 UTC) #40
kinaba
On 2016/03/10 18:14:42, Ted C wrote: > lgtm Thank you, Ted, and all reviewers for ...
4 years, 9 months ago (2016-03-11 01:12:15 UTC) #41
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1589953005/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1589953005/340001
4 years, 9 months ago (2016-03-11 01:13:13 UTC) #44
commit-bot: I haz the power
Committed patchset #15 (id:340001)
4 years, 9 months ago (2016-03-11 01:20:18 UTC) #46
commit-bot: I haz the power
4 years, 9 months ago (2016-03-11 01:21:37 UTC) #48
Message was sent while issue was closed.
Patchset 15 (id:??) landed as
https://crrev.com/d607fd36000c470d91dd96976698e63beeb87980
Cr-Commit-Position: refs/heads/master@{#380504}

Powered by Google App Engine
This is Rietveld 408576698