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

Issue 1087893003: Support longpress drag selection (Closed)

Created:
5 years, 8 months ago by jdduke (slow)
Modified:
5 years, 6 months ago
CC:
chromium-reviews, yusukes+watch_chromium.org, shuchen+watch_chromium.org, jam, penghuang+watch_chromium.org, nona+watch_chromium.org, darin-cc_chromium.org, James Su, mohsen
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Support longpress drag selection Allow users to extend a longpress-triggered selection by dragging their finger continuously after the longpress. Enabled using the "--enable-longpress-drag-selection" flag on Android. BUG=466749 Committed: https://crrev.com/3f2a3abd4acdd336e4c76ce963663507bd05e7bd Cr-Commit-Position: refs/heads/master@{#332439}

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 14

Patch Set 3 : Factor out logic #

Total comments: 24

Patch Set 4 : Code review #

Total comments: 3

Patch Set 5 : Cleanup #

Total comments: 2

Patch Set 6 : Remove unnecessary function #

Patch Set 7 : Unit tests #

Patch Set 8 : Add TSC smoke test #

Patch Set 9 : Rebase #

Patch Set 10 : Rebase #

Total comments: 16

Patch Set 11 : Code review #

Total comments: 6

Patch Set 12 : Rebase #

Patch Set 13 : Rebase #

Patch Set 14 : Rebase #

Patch Set 15 : Add switch #

Patch Set 16 : Rebase #

Patch Set 17 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1026 lines, -140 lines) Patch
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 15 2 chunks +29 lines, -15 lines 0 comments Download
M content/public/common/content_switches.h 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/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +3 lines, -0 lines 0 comments Download
M ui/events/test/motion_event_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +8 lines, -8 lines 0 comments Download
M ui/events/test/motion_event_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 5 chunks +18 lines, -8 lines 0 comments Download
M ui/touch_selection/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +4 lines, -0 lines 0 comments Download
A ui/touch_selection/longpress_drag_selector.h View 1 2 3 4 5 6 1 chunk +72 lines, -0 lines 0 comments Download
A ui/touch_selection/longpress_drag_selector.cc View 1 2 3 4 5 6 7 8 1 chunk +141 lines, -0 lines 0 comments Download
A ui/touch_selection/longpress_drag_selector_unittest.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +333 lines, -0 lines 0 comments Download
M ui/touch_selection/touch_handle.h View 1 2 3 4 5 chunks +11 lines, -15 lines 0 comments Download
M ui/touch_selection/touch_handle.cc View 1 2 3 4 4 chunks +10 lines, -11 lines 0 comments Download
M ui/touch_selection/touch_handle_unittest.cc View 1 2 3 3 chunks +11 lines, -8 lines 0 comments Download
M ui/touch_selection/touch_selection_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +54 lines, -16 lines 0 comments Download
M ui/touch_selection/touch_selection_controller.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 15 chunks +99 lines, -41 lines 0 comments Download
M ui/touch_selection/touch_selection_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 8 chunks +185 lines, -18 lines 0 comments Download
A ui/touch_selection/touch_selection_draggable.h View 1 2 3 4 1 chunk +43 lines, -0 lines 0 comments Download
M ui/touch_selection/ui_touch_selection.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 3 chunks +4 lines, -0 lines 0 comments Download

Messages

Total messages: 58 (13 generated)
mfomitchev
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode166 ui/touch_selection/touch_selection_controller.cc:166: ((touch_sequence_start_position_ - position).LengthSquared() < I must be missing something, ...
5 years, 8 months ago (2015-04-18 16:09:08 UTC) #2
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode166 ui/touch_selection/touch_selection_controller.cc:166: ((touch_sequence_start_position_ - position).LengthSquared() < On 2015/04/18 16:09:08, mfomitchev wrote: ...
5 years, 8 months ago (2015-04-21 19:25:57 UTC) #3
jdduke (slow)
On 2015/04/21 19:25:57, jdduke wrote: > |StylusSelectionController| into this class and have it serve a ...
5 years, 8 months ago (2015-04-21 19:30:47 UTC) #4
mfomitchev
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode166 ui/touch_selection/touch_selection_controller.cc:166: ((touch_sequence_start_position_ - position).LengthSquared() < On 2015/04/21 19:25:57, jdduke wrote: ...
5 years, 8 months ago (2015-04-21 21:08:57 UTC) #5
mfomitchev
On 2015/04/21 19:30:47, jdduke wrote: > On 2015/04/21 19:25:57, jdduke wrote: > > |StylusSelectionController| into ...
5 years, 8 months ago (2015-04-21 21:09:33 UTC) #6
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode166 ui/touch_selection/touch_selection_controller.cc:166: ((touch_sequence_start_position_ - position).LengthSquared() < On 2015/04/21 21:08:57, mfomitchev wrote: ...
5 years, 8 months ago (2015-04-21 21:28:33 UTC) #7
mfomitchev
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode166 ui/touch_selection/touch_selection_controller.cc:166: ((touch_sequence_start_position_ - position).LengthSquared() < On 2015/04/21 21:28:33, jdduke wrote: ...
5 years, 8 months ago (2015-04-21 22:20:29 UTC) #8
jdduke (slow)
On 2015/04/21 22:20:29, mfomitchev wrote: > Agreed. > So.. it seems like we could get ...
5 years, 8 months ago (2015-04-21 22:29:34 UTC) #9
mfomitchev
On 2015/04/21 22:29:34, jdduke wrote: > On 2015/04/21 22:20:29, mfomitchev wrote: > > Agreed. > ...
5 years, 8 months ago (2015-04-22 19:19:43 UTC) #10
mfomitchev
https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1087893003/diff/20001/ui/touch_selection/touch_selection_controller.cc#newcode501 ui/touch_selection/touch_selection_controller.cc:501: consume_remaining_motion_for_longpress_drag_ = false; On 2015/04/21 22:29:34, jdduke wrote: > ...
5 years, 8 months ago (2015-04-22 19:19:50 UTC) #11
jdduke (slow)
I pulled out the logic into a standalone class that shares a concept of "draggable ...
5 years, 8 months ago (2015-04-22 22:39:29 UTC) #13
mfomitchev
https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode71 ui/touch_selection/longpress_drag_selector.cc:71: // If initial motion is upward, extend the starting ...
5 years, 8 months ago (2015-04-23 21:05:53 UTC) #14
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode71 ui/touch_selection/longpress_drag_selector.cc:71: // If initial motion is upward, extend the starting ...
5 years, 7 months ago (2015-04-27 20:24:25 UTC) #16
mfomitchev
https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode71 ui/touch_selection/longpress_drag_selector.cc:71: // If initial motion is upward, extend the starting ...
5 years, 7 months ago (2015-04-28 02:17:30 UTC) #17
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1087893003/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode82 ui/touch_selection/longpress_drag_selector.cc:82: if (gfx::DotProduct(start_delta, delta) > On 2015/04/28 02:17:30, mfomitchev wrote: ...
5 years, 7 months ago (2015-04-28 20:37:49 UTC) #18
mfomitchev
Do you think there is there any chance we can break some web content with ...
5 years, 7 months ago (2015-04-29 00:34:28 UTC) #19
jdduke (slow)
Thanks for review. I'll add some tests and let you know when they're ready. On ...
5 years, 7 months ago (2015-04-29 16:39:15 UTC) #20
jdduke (slow)
Hmm, so one subtle issue here is that the TSC on Android gets a shot ...
5 years, 7 months ago (2015-04-29 20:30:33 UTC) #21
mfomitchev
On 2015/04/29 20:30:33, jdduke wrote: > Hmm, so one subtle issue here is that the ...
5 years, 7 months ago (2015-04-29 20:42:15 UTC) #22
jdduke (slow)
On 2015/04/29 20:42:15, mfomitchev wrote: > On 2015/04/29 20:30:33, jdduke wrote: > > Hmm, so ...
5 years, 7 months ago (2015-04-29 20:47:26 UTC) #23
jdduke (slow)
Tests added.
5 years, 7 months ago (2015-05-01 21:33:48 UTC) #24
chromium-reviews
Hey Jared, Sorry, I probably won't be able to review it today and I am ...
5 years, 7 months ago (2015-05-01 21:45:50 UTC) #25
jdduke (slow)
On 2015/05/01 21:45:50, chromium-reviews wrote: > Hey Jared, > > Sorry, I probably won't be ...
5 years, 7 months ago (2015-05-01 21:49:21 UTC) #26
jdduke (slow)
On 2015/05/01 21:49:21, jdduke wrote: > On 2015/05/01 21:45:50, chromium-reviews wrote: > > Hey Jared, ...
5 years, 7 months ago (2015-05-12 19:59:01 UTC) #27
mfomitchev
What about sending ACTION_CANCEL upon entering DRAG_PENDING and consuming ACTION_UP/ACTION_CANCEL as per the discussion above?
5 years, 7 months ago (2015-05-13 17:32:58 UTC) #28
jdduke (slow)
On 2015/05/13 17:32:58, mfomitchev wrote: > What about sending ACTION_CANCEL upon entering DRAG_PENDING and consuming ...
5 years, 7 months ago (2015-05-13 17:40:13 UTC) #29
mfomitchev
https://codereview.chromium.org/1087893003/diff/220001/ui/touch_selection/longpress_drag_selector_unittest.cc File ui/touch_selection/longpress_drag_selector_unittest.cc (right): https://codereview.chromium.org/1087893003/diff/220001/ui/touch_selection/longpress_drag_selector_unittest.cc#newcode27 ui/touch_selection/longpress_drag_selector_unittest.cc:27: // LongPressDragSelectorClient implementation. Can we put the LongPressDragSelectorClient methods ...
5 years, 7 months ago (2015-05-13 20:52:25 UTC) #30
jdduke (slow)
Also switched back to cancelling the downstream touch sequence when we observe SELECTION_SHOWN. https://codereview.chromium.org/1087893003/diff/220001/ui/touch_selection/longpress_drag_selector_unittest.cc File ...
5 years, 7 months ago (2015-05-14 18:29:27 UTC) #32
mfomitchev
Looks good, just one question.
5 years, 7 months ago (2015-05-14 21:55:28 UTC) #33
mfomitchev
https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc File ui/touch_selection/longpress_drag_selector_unittest.cc (right): https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc#newcode153 ui/touch_selection/longpress_drag_selector_unittest.cc:153: EXPECT_EQ(selection_start + gfx::Vector2dF(kSlop, -kSlop), DragPosition()); Sorry, I don't get ...
5 years, 7 months ago (2015-05-14 21:58:32 UTC) #34
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc File ui/touch_selection/longpress_drag_selector_unittest.cc (right): https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc#newcode153 ui/touch_selection/longpress_drag_selector_unittest.cc:153: EXPECT_EQ(selection_start + gfx::Vector2dF(kSlop, -kSlop), DragPosition()); On 2015/05/14 21:58:32, mfomitchev ...
5 years, 7 months ago (2015-05-14 22:19:29 UTC) #35
mfomitchev
LGTM https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc File ui/touch_selection/longpress_drag_selector_unittest.cc (right): https://codereview.chromium.org/1087893003/diff/260001/ui/touch_selection/longpress_drag_selector_unittest.cc#newcode153 ui/touch_selection/longpress_drag_selector_unittest.cc:153: EXPECT_EQ(selection_start + gfx::Vector2dF(kSlop, -kSlop), DragPosition()); On 2015/05/14 22:19:28, ...
5 years, 7 months ago (2015-05-14 22:33:57 UTC) #36
jdduke (slow)
On 2015/05/14 22:33:57, mfomitchev wrote: > AH, right. For some reason I was reading this ...
5 years, 7 months ago (2015-05-14 22:38:42 UTC) #37
jdduke (slow)
+sadrul for ui/events/test/
5 years, 7 months ago (2015-05-14 22:39:37 UTC) #39
sadrul
LGTM https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h File ui/events/test/motion_event_test_utils.h (right): https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h#newcode55 ui/events/test/motion_event_test_utils.h:55: Interesting. I haven't seen this pattern used elsewhere ...
5 years, 7 months ago (2015-05-14 22:44:36 UTC) #40
jdduke (slow)
https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h File ui/events/test/motion_event_test_utils.h (right): https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h#newcode55 ui/events/test/motion_event_test_utils.h:55: On 2015/05/14 22:44:36, sadrul wrote: > Interesting. I haven't ...
5 years, 7 months ago (2015-05-14 22:49:47 UTC) #41
sadrul
https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h File ui/events/test/motion_event_test_utils.h (right): https://codereview.chromium.org/1087893003/diff/260001/ui/events/test/motion_event_test_utils.h#newcode55 ui/events/test/motion_event_test_utils.h:55: On 2015/05/14 22:49:46, jdduke wrote: > On 2015/05/14 22:44:36, ...
5 years, 7 months ago (2015-05-14 22:55:33 UTC) #42
jdduke (slow)
Just a heads up, I'm going to land this small fix first: https://codereview.chromium.org/1140693004. It addresses ...
5 years, 7 months ago (2015-05-18 18:51:05 UTC) #43
jdduke (slow)
+sievers for content/public/common
5 years, 7 months ago (2015-05-20 18:49:01 UTC) #45
no sievers
On 2015/05/20 18:49:01, jdduke wrote: > +sievers for content/public/common sorry, missed this. lgtm.
5 years, 7 months ago (2015-05-21 18:09:24 UTC) #46
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1087893003/360001
5 years, 7 months ago (2015-05-21 18:26:31 UTC) #49
jdduke (slow)
On 2015/05/21 18:26:31, commit-bot: I haz the power wrote: > CQ is trying da patch. ...
5 years, 6 months ago (2015-05-27 19:56:12 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1087893003/420001
5 years, 6 months ago (2015-06-02 16:59:17 UTC) #56
commit-bot: I haz the power
Committed patchset #17 (id:420001)
5 years, 6 months ago (2015-06-02 19:01:13 UTC) #57
commit-bot: I haz the power
5 years, 6 months ago (2015-06-02 19:02:04 UTC) #58
Message was sent while issue was closed.
Patchset 17 (id:??) landed as
https://crrev.com/3f2a3abd4acdd336e4c76ce963663507bd05e7bd
Cr-Commit-Position: refs/heads/master@{#332439}

Powered by Google App Engine
This is Rietveld 408576698