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

Issue 342633003: [Android] Select text when stylus first button is pressed. (Closed)

Created:
6 years, 6 months ago by Changwan Ryu
Modified:
6 years, 5 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, yukishiino+watch_chromium.org, tdresser+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, jdduke+watch_chromium.org, miu+watch_chromium.org, jdduke (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

[Android] Select text when stylus first button is pressed. BUG=384803 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=279991

Patch Set 1 #

Total comments: 8

Patch Set 2 : Polished up for review, addressed review comments #

Patch Set 3 : fixed TODO comment #

Patch Set 4 : https://codereview.chromium.org/348813002/ #

Patch Set 5 : check this patch against patch set 4 #

Patch Set 6 : removed predefined namespace #

Total comments: 9

Patch Set 7 : Not sending mouse events, handling long press #

Patch Set 8 : removed unnecessary changes for webinputeventutil #

Patch Set 9 : rebased #

Total comments: 15

Patch Set 10 : refactored into a class, added unit tests #

Patch Set 11 : fixed one line in unit test #

Patch Set 12 : do not select text when two buttons are pressed #

Total comments: 32

Patch Set 13 : removed long press, addressed jared's comments #

Total comments: 11

Patch Set 14 : fixed nits and moved mock_motion_event #

Total comments: 10

Patch Set 15 : fixed nits and moved ShowSelectionHandlesAutomatically to SCROLL_BEGIN #

Patch Set 16 : rebased #

Patch Set 17 : fixed test build #

Patch Set 18 : added test/mock_motion_event.* which I had forgotten to add #

Patch Set 19 : fixed signed unsigned comparison error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+413 lines, -318 lines) Patch
M content/browser/android/content_view_core_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 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 1 chunk +8 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/gesture_text_selector.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +62 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/gesture_text_selector.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +74 lines, -0 lines 0 comments Download
A content/browser/renderer_host/input/gesture_text_selector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 1 chunk +165 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_android.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +11 lines, -1 line 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 14 4 chunks +26 lines, -0 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +2 lines, -0 lines 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 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 1 chunk +6 lines, -0 lines 0 comments Download
M ui/events/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/events.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M ui/events/gesture_detection/gesture_provider_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
M ui/events/gesture_detection/mock_motion_event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -88 lines 0 comments Download
M ui/events/gesture_detection/mock_motion_event.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +0 lines, -212 lines 0 comments Download
M ui/events/gesture_detection/touch_disposition_gesture_filter_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -1 line 0 comments Download
M ui/events/gesture_detection/velocity_tracker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -1 line 0 comments Download
A + ui/events/test/mock_motion_event.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 3 chunks +7 lines, -0 lines 0 comments Download
A + ui/events/test/mock_motion_event.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 8 chunks +38 lines, -10 lines 0 comments Download

Messages

Total messages: 37 (0 generated)
jdduke (slow)
https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc#newcode559 content/browser/renderer_host/render_widget_host_view_android.cc:559: if (ShouldConvertToMouseEvent(event)) { Ah, yeah, so we would definitely ...
6 years, 6 months ago (2014-06-19 15:10:11 UTC) #1
jdduke (slow)
https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc#newcode559 content/browser/renderer_host/render_widget_host_view_android.cc:559: if (ShouldConvertToMouseEvent(event)) { We'll probably want logic along the ...
6 years, 6 months ago (2014-06-20 02:14:27 UTC) #2
jdduke (slow)
https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc#newcode559 content/browser/renderer_host/render_widget_host_view_android.cc:559: if (ShouldConvertToMouseEvent(event)) { On 2014/06/20 02:14:27, jdduke wrote: > ...
6 years, 6 months ago (2014-06-20 02:23:39 UTC) #3
Changwan Ryu
PTAL https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/1/content/browser/renderer_host/render_widget_host_view_android.cc#newcode559 content/browser/renderer_host/render_widget_host_view_android.cc:559: if (ShouldConvertToMouseEvent(event)) { On 2014/06/19 15:10:11, jdduke wrote: ...
6 years, 6 months ago (2014-06-20 08:19:54 UTC) #4
Changwan Ryu
FYI, this is based off of https://codereview.chromium.org/348813002/, and you can check the diff by comparing ...
6 years, 6 months ago (2014-06-20 08:32:06 UTC) #5
jdduke (slow)
https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode552 content/browser/renderer_host/render_widget_host_view_android.cc:552: convert_touch_sequence_to_mouse_ = Sorry, my previous comment was confusing. You'll ...
6 years, 6 months ago (2014-06-20 16:52:49 UTC) #6
jdduke (slow)
https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1298 content/browser/renderer_host/render_widget_host_view_android.cc:1298: SendGestureEvent(CreateWebGestureEventFromGestureEventData(gesture)); On 2014/06/20 16:52:49, jdduke wrote: > By using ...
6 years, 6 months ago (2014-06-20 21:57:59 UTC) #7
Changwan Ryu
https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/100001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode552 content/browser/renderer_host/render_widget_host_view_android.cc:552: convert_touch_sequence_to_mouse_ = On 2014/06/20 16:52:49, jdduke wrote: > Sorry, ...
6 years, 6 months ago (2014-06-23 06:39:22 UTC) #8
jdduke (slow)
My biggest question here is testing. We should definitely have tests for this logic, unfortunately ...
6 years, 6 months ago (2014-06-23 15:09:59 UTC) #9
jdduke (slow)
https://codereview.chromium.org/342633003/diff/160001/content/browser/android/content_view_core_impl.cc File content/browser/android/content_view_core_impl.cc (right): https://codereview.chromium.org/342633003/diff/160001/content/browser/android/content_view_core_impl.cc#newcode989 content/browser/android/content_view_core_impl.cc:989: mouse_drag_start_x_ = pos_x_0; On 2014/06/23 15:09:59, jdduke wrote: > ...
6 years, 6 months ago (2014-06-23 15:24:50 UTC) #10
Changwan Ryu
PTAL. As you suggested, I've refactored the code into a class, and added 2 unit ...
6 years, 6 months ago (2014-06-24 09:29:48 UTC) #11
benm (inactive)
https://codereview.chromium.org/342633003/diff/220001/content/browser/renderer_host/input/gesture_text_selector.h File content/browser/renderer_host/input/gesture_text_selector.h (right): https://codereview.chromium.org/342633003/diff/220001/content/browser/renderer_host/input/gesture_text_selector.h#newcode14 content/browser/renderer_host/input/gesture_text_selector.h:14: class GestureEventData; s/class/struct/
6 years, 6 months ago (2014-06-24 15:15:23 UTC) #12
jdduke (slow)
Thanks, this is a very nice refactoring. tdresser@: Do you have any opinions about adding ...
6 years, 6 months ago (2014-06-24 15:38:37 UTC) #13
benm (inactive)
Changwan, can you share how you've been testing this? I tried applying it into a ...
6 years, 6 months ago (2014-06-24 15:57:11 UTC) #14
Changwan Ryu
On 2014/06/24 15:57:11, benm wrote: > Changwan, can you share how you've been testing this? ...
6 years, 6 months ago (2014-06-24 23:52:12 UTC) #15
Changwan Ryu
PTAL Please note that long press handling has been removed for now as our partner ...
6 years, 6 months ago (2014-06-25 07:26:21 UTC) #16
tdresser
On 2014/06/25 07:26:21, Changwan Ryu wrote: > PTAL > > Please note that long press ...
6 years, 5 months ago (2014-06-25 12:25:41 UTC) #17
jdduke (slow)
Hmm, that's a shame about tap/long press, as that's where most of the complexity is ...
6 years, 5 months ago (2014-06-25 14:54:19 UTC) #18
tdresser
https://codereview.chromium.org/342633003/diff/240001/ui/events/events.gyp File ui/events/events.gyp (right): https://codereview.chromium.org/342633003/diff/240001/ui/events/events.gyp#newcode275 ui/events/events.gyp:275: 'gesture_detection/mock_motion_event.cc', On 2014/06/25 14:54:19, jdduke wrote: > What if ...
6 years, 5 months ago (2014-06-25 15:20:54 UTC) #19
Changwan Ryu
Adding sadrul@ for ui/events/BUILD.gn approval https://codereview.chromium.org/342633003/diff/240001/content/browser/renderer_host/input/gesture_text_selector.cc File content/browser/renderer_host/input/gesture_text_selector.cc (right): https://codereview.chromium.org/342633003/diff/240001/content/browser/renderer_host/input/gesture_text_selector.cc#newcode25 content/browser/renderer_host/input/gesture_text_selector.cc:25: text_selection_triggered_ = ShouldStartTextSelection(event); On ...
6 years, 5 months ago (2014-06-26 00:05:27 UTC) #20
jdduke (slow)
content/browser/android, content/browser/renderer_host/input and ui/events/gesture_detection lgtm with one question. https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/input/gesture_text_selector.cc File content/browser/renderer_host/input/gesture_text_selector.cc (right): https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/input/gesture_text_selector.cc#newcode48 content/browser/renderer_host/input/gesture_text_selector.cc:48: client_->ShowSelectionHandlesAutomatically(); ...
6 years, 5 months ago (2014-06-26 00:33:21 UTC) #21
aelias_OOO_until_Jul13
lgtm for render_widget_host_view_android https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/render_widget_host_view_android.cc File content/browser/renderer_host/render_widget_host_view_android.cc (right): https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/render_widget_host_view_android.cc#newcode1453 content/browser/renderer_host/render_widget_host_view_android.cc:1453: // TODO(changwan): check if we'd want ...
6 years, 5 months ago (2014-06-26 01:12:39 UTC) #22
Changwan Ryu
https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/input/gesture_text_selector.cc File content/browser/renderer_host/input/gesture_text_selector.cc (right): https://codereview.chromium.org/342633003/diff/260001/content/browser/renderer_host/input/gesture_text_selector.cc#newcode48 content/browser/renderer_host/input/gesture_text_selector.cc:48: client_->ShowSelectionHandlesAutomatically(); On 2014/06/26 00:33:21, jdduke wrote: > I'm curious ...
6 years, 5 months ago (2014-06-26 02:54:11 UTC) #23
Changwan Ryu
The CQ bit was checked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 02:54:30 UTC) #24
Changwan Ryu
The CQ bit was unchecked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 02:54:32 UTC) #25
Changwan Ryu
The CQ bit was checked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 04:19:36 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/changwan@chromium.org/342633003/280001
6 years, 5 months ago (2014-06-26 04:20:34 UTC) #27
Changwan Ryu
The CQ bit was checked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 04:44:06 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/changwan@chromium.org/342633003/320001
6 years, 5 months ago (2014-06-26 04:45:33 UTC) #29
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium ...
6 years, 5 months ago (2014-06-26 05:33:17 UTC) #30
Changwan Ryu
The CQ bit was checked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 05:34:47 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/changwan@chromium.org/342633003/340001
6 years, 5 months ago (2014-06-26 05:35:24 UTC) #32
Changwan Ryu
The CQ bit was checked by changwan@chromium.org
6 years, 5 months ago (2014-06-26 06:07:15 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/changwan@chromium.org/342633003/360001
6 years, 5 months ago (2014-06-26 06:10:17 UTC) #34
Changwan Ryu
Sadrul, could you approve the changes around mock_motion_event (build and moving)?
6 years, 5 months ago (2014-06-26 06:43:48 UTC) #35
sadrul
lgtm
6 years, 5 months ago (2014-06-26 09:26:29 UTC) #36
commit-bot: I haz the power
6 years, 5 months ago (2014-06-26 13:04:15 UTC) #37
Message was sent while issue was closed.
Change committed as 279991

Powered by Google App Engine
This is Rietveld 408576698