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

Issue 2339793002: Handle newCursorPosition correctly for Android's commitText() (Closed)

Created:
4 years, 3 months ago by aelias_OOO_until_Jul13
Modified:
4 years, 3 months ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, blink-reviews-api_chromium.org, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, dcheng, dglazkov+blink, einbinder+watch-test-runner_chromium.org, jam, jbauman+watch_chromium.org, jochen+watch_chromium.org, kalyank, kinuko+watch, mlamouri+watch-blink_chromium.org, mlamouri+watch-test-runner_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, nona+watch_chromium.org, piman+watch_chromium.org, shuchen+watch_chromium.org, sievers+watch_chromium.org, James Su, yusukes+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle newCursorPosition correctly for Android's commitText() Android’s InputConnection API specifies a way to commit (confirm) the current composition and move the cursor at the same time: https://developer.android.com/reference/android/view/inputmethod/ InputConnection.html#commitText(java.lang.CharSequence, int) Currently, commitText doesn't conform to the documentation nor to Android TextView's behavior when newCursorPosition is not 1. newCursorPosition is a relative value that depends on the location of the text being committed. When |newCursorPosition| < 1, the cursor should move to the left of the committing text by |newCursorPosition| characters. If the cursor exceeds the left boundary, it will clamp to the left boundary. When |newCursorPosition| >= 1, the cursor will move to the right of the committing text by |newCursorPosition - 1| characters. If the cursor exceeds the right boundary, it will clamp to the right boundary. (Rebased version of yabinh@'s http://crrev.com/1995333002 which received lgt'ms from TBRed reviewers below, I'm landing this on his behalf.) TBR=tkent,yosin,changwan,sievers,yabinh NOTRY=true BUG=570920 Committed: https://crrev.com/87b8f7c3fc3e5bbcc9601023df0fe79cb79234e8 Cr-Commit-Position: refs/heads/master@{#418475}

Patch Set 1 #

Patch Set 2 : Rebase and remove Optional<> #

Patch Set 3 : Fix compile error (rebased on r418371) #

Unified diffs Side-by-side diffs Delta from patch set Stats (+818 lines, -372 lines) Patch
M components/test_runner/text_input_controller.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M components/test_runner/web_widget_test_client.cc View 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.h View 1 chunk +4 lines, -4 lines 0 comments Download
M content/browser/browser_plugin/browser_plugin_guest.cc View 2 chunks +15 lines, -10 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/renderer_host/ime_adapter_android.cc View 3 chunks +18 lines, -9 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.h View 1 chunk +14 lines, -5 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_impl.cc View 1 chunk +9 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 4 chunks +21 lines, -8 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.h View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac.mm View 8 chunks +11 lines, -15 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_mac_unittest.mm View 5 chunks +20 lines, -21 lines 0 comments Download
M content/common/browser_plugin/browser_plugin_messages.h View 1 chunk +7 lines, -2 lines 0 comments Download
M content/common/input_messages.h View 1 chunk +7 lines, -3 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 2 chunks +3 lines, -2 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 3 chunks +59 lines, -1 line 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 chunk +5 lines, -3 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 chunk +15 lines, -8 lines 0 comments Download
M content/renderer/pepper/pepper_plugin_instance_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 2 chunks +8 lines, -5 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 chunks +52 lines, -23 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 7 chunks +52 lines, -53 lines 0 comments Download
M content/renderer/render_widget.h View 1 chunk +5 lines, -3 lines 0 comments Download
M content/renderer/render_widget.cc View 4 chunks +30 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.h View 2 chunks +25 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodController.cpp View 1 5 chunks +82 lines, -31 lines 0 comments Download
M third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp View 8 chunks +26 lines, -26 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 2 chunks +12 lines, -15 lines 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.h View 1 chunk +0 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebLocalFrameImpl.cpp View 1 chunk +0 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.h View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.cpp View 1 chunk +4 lines, -9 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 2 chunks +2 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 2 chunks +12 lines, -14 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 15 chunks +262 lines, -15 lines 0 comments Download
M third_party/WebKit/public/web/WebLocalFrame.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/public/web/WebPlugin.h View 2 chunks +10 lines, -4 lines 0 comments Download
M third_party/WebKit/public/web/WebView.h View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/public/web/WebWidget.h View 1 chunk +6 lines, -12 lines 0 comments Download

Messages

Total messages: 22 (18 generated)
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/2339793002/40001
4 years, 3 months ago (2016-09-14 03:13:37 UTC) #17
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 3 months ago (2016-09-14 03:20:15 UTC) #18
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/87b8f7c3fc3e5bbcc9601023df0fe79cb79234e8 Cr-Commit-Position: refs/heads/master@{#418475}
4 years, 3 months ago (2016-09-14 03:24:49 UTC) #20
yosin_UTC9
4 years, 3 months ago (2016-09-14 05:15:33 UTC) #22
Message was sent while issue was closed.
lgtm

Thanks for landing!

Powered by Google App Engine
This is Rietveld 408576698