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

Issue 2734943005: Remove moveCursorToSelectionEnd() (Closed)

Created:
3 years, 9 months ago by yabinh
Modified:
3 years, 9 months ago
CC:
agrieve+watch_chromium.org, amaralp, chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove moveCursorToSelectionEnd() moveCursorToSelectionEnd() blocks the IME thread unnecessarily, which causes back navigation to fail. So this CL removes moveCursorToSelectionEnd() and replaces with mWebContents.unselect(). In RenderFrameImpl::OnUnselect(), the cursor is deleted entirely, which causes text boxes to be unfocused as a side effect. To fix that, this CL collapses the selection to the selection end, and renames the functions to CollapseSelection(). BUG=697756 TEST=run_chrome_public_test_apk --test-filter TabsTest.testTabSwitcherCollapseSelection Review-Url: https://codereview.chromium.org/2734943005 Cr-Commit-Position: refs/heads/master@{#455963} Committed: https://chromium.googlesource.com/chromium/src/+/351e7eca8d363d99a4847df4e750daa07a428440

Patch Set 1 #

Patch Set 2 : Rename and fix tests #

Patch Set 3 : Some comments #

Patch Set 4 : add a test #

Patch Set 5 : RESTRICTION_TYPE_PHONE #

Total comments: 3

Patch Set 6 : Address aelias@'s review #

Patch Set 7 : Fix flaky test #

Total comments: 3

Patch Set 8 : For isherman@'s review #

Total comments: 2

Patch Set 9 : obsolete #

Total comments: 2

Patch Set 10 : For dtrainor@'s review #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -80 lines) Patch
M chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java View 1 2 3 4 5 6 2 chunks +57 lines, -0 lines 0 comments Download
M chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/android/tabstest/tabs_test.html View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M content/browser/renderer_host/render_widget_host_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/web_contents/web_contents_android.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 1 chunk +3 lines, -3 lines 0 comments Download
M content/common/input_messages.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/SelectionPopupController.java View 1 1 chunk +2 lines, -6 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ChromiumBaseInputConnection.java View 1 1 chunk +0 lines, -5 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ImeAdapter.java View 1 2 chunks +1 line, -13 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/input/ThreadedInputConnection.java View 1 2 chunks +0 lines, -18 lines 0 comments Download
M content/public/android/java/src/org/chromium/content/browser/webcontents/WebContentsImpl.java View 1 2 chunks +4 lines, -4 lines 0 comments Download
M content/public/android/java/src/org/chromium/content_public/browser/WebContents.java View 1 2 1 chunk +2 lines, -3 lines 0 comments Download
M content/public/android/javatests/src/org/chromium/content/browser/input/ImeTest.java View 1 2 chunks +5 lines, -6 lines 0 comments Download
M content/public/browser/web_contents.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/input/input_event_filter_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 chunks +9 lines, -4 lines 0 comments Download
M content/renderer/render_view_browsertest.cc View 1 1 chunk +3 lines, -3 lines 0 comments Download
M content/test/test_render_frame.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/test/test_render_frame.cc View 1 1 chunk +2 lines, -2 lines 0 comments Download
M tools/metrics/actions/actions.xml View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 57 (42 generated)
yabinh
PTAL, thanks!
3 years, 9 months ago (2017-03-08 12:21:09 UTC) #20
yabinh
https://codereview.chromium.org/2734943005/diff/80001/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java (right): https://codereview.chromium.org/2734943005/diff/80001/chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java#newcode402 chrome/android/javatests/src/org/chromium/chrome/browser/TabsTest.java:402: assertWaitForKeyboardStatus(true); On a second thought, assertWaitForSelectedText("world") seems better. I'll ...
3 years, 9 months ago (2017-03-08 14:58:23 UTC) #23
aelias_OOO_until_Jul13
lgtm, adding more OWNERS for trivial rename: kenrb@ for input_messages.h avi@ for content/public/browser/web_contents.h https://codereview.chromium.org/2734943005/diff/80001/content/browser/web_contents/web_contents_impl.cc File ...
3 years, 9 months ago (2017-03-08 21:55:23 UTC) #25
Avi (use Gerrit)
lgtm ok
3 years, 9 months ago (2017-03-08 22:00:39 UTC) #26
yabinh
Thanks! Adding dtrainor@ for chrome/android/javatests, and isherman@ for tools/metrics/actions/actions.xml https://codereview.chromium.org/2734943005/diff/80001/content/browser/web_contents/web_contents_impl.cc File content/browser/web_contents/web_contents_impl.cc (right): https://codereview.chromium.org/2734943005/diff/80001/content/browser/web_contents/web_contents_impl.cc#newcode2795 content/browser/web_contents/web_contents_impl.cc:2795: ...
3 years, 9 months ago (2017-03-09 02:12:56 UTC) #30
Ilya Sherman
In general, I would recommend a bit of caution w.r.t. renaming actions. If an action ...
3 years, 9 months ago (2017-03-09 08:17:00 UTC) #35
yabinh
On 2017/03/09 08:17:00, Ilya Sherman wrote: > In general, I would recommend a bit of ...
3 years, 9 months ago (2017-03-09 08:23:45 UTC) #38
Ilya Sherman
https://codereview.chromium.org/2734943005/diff/140001/tools/metrics/actions/actions.xml File tools/metrics/actions/actions.xml (left): https://codereview.chromium.org/2734943005/diff/140001/tools/metrics/actions/actions.xml#oldcode15898 tools/metrics/actions/actions.xml:15898: <action name="Unselect"> Sorry, I should have clarified: Please mark ...
3 years, 9 months ago (2017-03-09 08:30:19 UTC) #39
yabinh
https://codereview.chromium.org/2734943005/diff/140001/tools/metrics/actions/actions.xml File tools/metrics/actions/actions.xml (left): https://codereview.chromium.org/2734943005/diff/140001/tools/metrics/actions/actions.xml#oldcode15898 tools/metrics/actions/actions.xml:15898: <action name="Unselect"> On 2017/03/09 08:30:18, Ilya Sherman wrote: > ...
3 years, 9 months ago (2017-03-09 09:00:39 UTC) #42
kenrb
ipc lgtm
3 years, 9 months ago (2017-03-09 14:41:44 UTC) #45
David Trainor- moved to gerrit
chrome/android/javatests lgtm. https://codereview.chromium.org/2734943005/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java (right): https://codereview.chromium.org/2734943005/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java#newcode1398 chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java:1398: assertTrue(mSelectionController.getSelectedText().equals("")); TextUtils.isEmpty() to handle both null and ...
3 years, 9 months ago (2017-03-09 17:48:04 UTC) #46
Ilya Sherman
actions.xml lgtm, thanks
3 years, 9 months ago (2017-03-09 18:32:32 UTC) #47
yabinh
https://codereview.chromium.org/2734943005/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java File chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java (right): https://codereview.chromium.org/2734943005/diff/160001/chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java#newcode1398 chrome/android/javatests/src/org/chromium/chrome/browser/contextualsearch/ContextualSearchManagerTest.java:1398: assertTrue(mSelectionController.getSelectedText().equals("")); On 2017/03/09 17:48:04, David Trainor-ping if over 24h ...
3 years, 9 months ago (2017-03-10 01:35:36 UTC) #50
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/2734943005/180001
3 years, 9 months ago (2017-03-10 01:36:15 UTC) #54
commit-bot: I haz the power
3 years, 9 months ago (2017-03-10 02:44:35 UTC) #57
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/351e7eca8d363d99a4847df4e750...

Powered by Google App Engine
This is Rietveld 408576698