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

Issue 1537493006: Allow scrolling a page with selection after long-press on whitespace (Closed)

Created:
5 years ago by mohsen
Modified:
4 years, 11 months ago
Reviewers:
sadrul, mfomitchev
CC:
chromium-reviews, darin-cc_chromium.org, dcheng, jam, nona+watch_chromium.org, shuchen+watch_chromium.org, James Su, 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

Allow scrolling a page with selection after long-press on whitespace Currently, if there is a selection on a page and you try long-press and drag on an empty area, it will start longpress-drag gesture for selecting text, starting at the current selection which might be far from where the finger is. Better behavior would be to just scroll the page. BUG=557034 Committed: https://crrev.com/91e3c85091d54ff42c06fad73c49a414dad3a29e Cr-Commit-Position: refs/heads/master@{#367646}

Patch Set 1 #

Patch Set 2 : Fixed existing tests #

Patch Set 3 : Added tests #

Total comments: 2

Patch Set 4 : Added a comment #

Total comments: 2

Patch Set 5 : Updated comments #

Total comments: 4

Patch Set 6 : Updated comments #

Total comments: 2

Patch Set 7 : Addressed review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+114 lines, -10 lines) Patch
M content/browser/renderer_host/render_widget_host_view_android.cc View 1 chunk +4 lines, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.cc View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/touch_selection/longpress_drag_selector.h View 4 1 chunk +3 lines, -0 lines 0 comments Download
M ui/touch_selection/longpress_drag_selector.cc View 2 chunks +5 lines, -1 line 0 comments Download
M ui/touch_selection/longpress_drag_selector_unittest.cc View 1 2 8 chunks +39 lines, -9 lines 0 comments Download
M ui/touch_selection/touch_selection_controller.h View 1 chunk +4 lines, -0 lines 0 comments Download
M ui/touch_selection/touch_selection_controller.cc View 1 2 3 4 5 1 chunk +18 lines, -0 lines 0 comments Download
M ui/touch_selection/touch_selection_controller_unittest.cc View 1 2 1 chunk +40 lines, -0 lines 0 comments Download

Depends on Patchset:

Messages

Total messages: 20 (7 generated)
mohsen
Please take a look...
5 years ago (2015-12-21 18:28:05 UTC) #4
mfomitchev
https://codereview.chromium.org/1537493006/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1537493006/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode130 ui/touch_selection/longpress_drag_selector.cc:130: SetState(INACTIVE); As discussed, lets create a bug describing the ...
5 years ago (2015-12-22 21:55:54 UTC) #6
mohsen
https://codereview.chromium.org/1537493006/diff/60001/ui/touch_selection/longpress_drag_selector.cc File ui/touch_selection/longpress_drag_selector.cc (right): https://codereview.chromium.org/1537493006/diff/60001/ui/touch_selection/longpress_drag_selector.cc#newcode130 ui/touch_selection/longpress_drag_selector.cc:130: SetState(INACTIVE); On 2015/12/22 at 21:55:54, mfomitchev wrote: > As ...
4 years, 12 months ago (2015-12-24 02:35:45 UTC) #7
mfomitchev
https://codereview.chromium.org/1537493006/diff/80001/ui/touch_selection/longpress_drag_selector.h File ui/touch_selection/longpress_drag_selector.h (right): https://codereview.chromium.org/1537493006/diff/80001/ui/touch_selection/longpress_drag_selector.h#newcode44 ui/touch_selection/longpress_drag_selector.h:44: // TODO(mohsen): This is a workaround to avoid starting ...
4 years, 11 months ago (2016-01-04 17:07:55 UTC) #8
mohsen
https://codereview.chromium.org/1537493006/diff/80001/ui/touch_selection/longpress_drag_selector.h File ui/touch_selection/longpress_drag_selector.h (right): https://codereview.chromium.org/1537493006/diff/80001/ui/touch_selection/longpress_drag_selector.h#newcode44 ui/touch_selection/longpress_drag_selector.h:44: // TODO(mohsen): This is a workaround to avoid starting ...
4 years, 11 months ago (2016-01-04 18:45:59 UTC) #9
mfomitchev
Looks good, thanks! LGTM with a nit (I think it would be good to make ...
4 years, 11 months ago (2016-01-04 18:58:44 UTC) #10
mohsen
https://codereview.chromium.org/1537493006/diff/100001/ui/touch_selection/touch_selection_controller.cc File ui/touch_selection/touch_selection_controller.cc (right): https://codereview.chromium.org/1537493006/diff/100001/ui/touch_selection/touch_selection_controller.cc#newcode235 ui/touch_selection/touch_selection_controller.cc:235: // If a scroll happens after a long-press on ...
4 years, 11 months ago (2016-01-04 19:23:05 UTC) #11
sadrul
https://codereview.chromium.org/1537493006/diff/120001/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc File content/browser/renderer_host/input/touch_selection_controller_client_aura.cc (right): https://codereview.chromium.org/1537493006/diff/120001/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc#newcode145 content/browser/renderer_host/input/touch_selection_controller_client_aura.cc:145: rwhva_->selection_controller()->OnScrollBeginEvent(); I think this should go in RenderWidgetHostViewAura::HandleGestureForTouchSelection() instead. ...
4 years, 11 months ago (2016-01-04 21:00:42 UTC) #12
mohsen
https://codereview.chromium.org/1537493006/diff/120001/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc File content/browser/renderer_host/input/touch_selection_controller_client_aura.cc (right): https://codereview.chromium.org/1537493006/diff/120001/content/browser/renderer_host/input/touch_selection_controller_client_aura.cc#newcode145 content/browser/renderer_host/input/touch_selection_controller_client_aura.cc:145: rwhva_->selection_controller()->OnScrollBeginEvent(); On 2016/01/04 at 21:00:42, sadrul wrote: > I ...
4 years, 11 months ago (2016-01-05 19:46:17 UTC) #13
sadrul
lgtm
4 years, 11 months ago (2016-01-05 19:59:30 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1537493006/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1537493006/140001
4 years, 11 months ago (2016-01-05 20:06:19 UTC) #17
commit-bot: I haz the power
Committed patchset #7 (id:140001)
4 years, 11 months ago (2016-01-05 21:08:41 UTC) #18
commit-bot: I haz the power
4 years, 11 months ago (2016-01-05 21:09:37 UTC) #20
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/91e3c85091d54ff42c06fad73c49a414dad3a29e
Cr-Commit-Position: refs/heads/master@{#367646}

Powered by Google App Engine
This is Rietveld 408576698