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

Issue 2536083002: SelectionAutoscroll should not happen in user-select:none. (Closed)

Created:
4 years ago by sunyunjia
Modified:
4 years ago
Reviewers:
bokan
CC:
chromium-reviews, sof, eae+blinkwatch, blink-reviews-dom_chromium.org, dglazkov+blink, blink-reviews, rwlbuis
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

SelectionAutoscroll should not happen in user-select:none. AutoscrollForSelection is to help users select content outside the current viewport. However, the current implementation starts the autoscroll whenever the mouse-drag event reaches the edge of the viewport, regardless of whether the user is selecting or not. It makes no sense to start the autoscroll when the element was not selectable at all. This patch allows the AutoscrollForSelection fire only when the mouse is dragged across a selectable element. BUG=588448 Committed: https://crrev.com/94c73aebe631326d3d09aed291a6c335040b5447 Cr-Commit-Position: refs/heads/master@{#436317}

Patch Set 1 #

Patch Set 2 : Clean code #

Patch Set 3 : m_mouseDownMayStartAutoscroll #

Patch Set 4 : Work for the tests #

Patch Set 5 : Add test. #

Total comments: 2

Patch Set 6 : To pass the tests. #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+40 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/fast/events/autoscroll-disabled-user-select-none.html View 1 2 3 4 1 chunk +33 lines, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html View 1 2 3 4 5 1 chunk +1 line, -1 line 4 comments Download
M third_party/WebKit/Source/core/input/MouseEventManager.cpp View 1 2 3 4 5 2 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 42 (31 generated)
sunyunjia
PTAL, thanks!
4 years ago (2016-12-01 21:58:56 UTC) #16
bokan
https://codereview.chromium.org/2536083002/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.cpp File third_party/WebKit/Source/core/input/MouseEventManager.cpp (right): https://codereview.chromium.org/2536083002/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.cpp#newcode737 third_party/WebKit/Source/core/input/MouseEventManager.cpp:737: layoutObject->isSelectable()) { Selection is created/added by the call below ...
4 years ago (2016-12-02 17:32:38 UTC) #20
sunyunjia
PTAL, thanks! https://codereview.chromium.org/2536083002/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.cpp File third_party/WebKit/Source/core/input/MouseEventManager.cpp (right): https://codereview.chromium.org/2536083002/diff/80001/third_party/WebKit/Source/core/input/MouseEventManager.cpp#newcode737 third_party/WebKit/Source/core/input/MouseEventManager.cpp:737: layoutObject->isSelectable()) { On 2016/12/02 17:32:38, bokan wrote: ...
4 years ago (2016-12-04 22:46:43 UTC) #30
bokan
Question about change to test but otherwise lgtm. https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html File third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html (right): https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html#newcode20 third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html:20: eventSender.mouseMoveTo(40, ...
4 years ago (2016-12-05 15:39:36 UTC) #31
sunyunjia
https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html File third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html (right): https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html#newcode20 third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html:20: eventSender.mouseMoveTo(40, h); On 2016/12/05 15:39:36, bokan wrote: > Why ...
4 years ago (2016-12-05 15:44:39 UTC) #32
bokan
https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html File third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html (right): https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html#newcode20 third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html:20: eventSender.mouseMoveTo(40, h); On 2016/12/05 15:44:39, sunyunjia wrote: > On ...
4 years ago (2016-12-05 15:45:54 UTC) #33
sunyunjia
https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html File third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html (right): https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html#newcode20 third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html:20: eventSender.mouseMoveTo(40, h); On 2016/12/05 15:45:54, bokan wrote: > On ...
4 years ago (2016-12-05 16:25:53 UTC) #34
bokan
On 2016/12/05 16:25:53, sunyunjia wrote: > https://codereview.chromium.org/2536083002/diff/120001/third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html > File > third_party/WebKit/LayoutTests/fast/forms/text/input-readonly-autoscroll.html > (right): > > ...
4 years ago (2016-12-05 16:26:52 UTC) #35
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/2536083002/120001
4 years ago (2016-12-05 16:28:50 UTC) #37
commit-bot: I haz the power
Committed patchset #6 (id:120001)
4 years ago (2016-12-05 16:33:50 UTC) #40
commit-bot: I haz the power
4 years ago (2016-12-05 16:36:13 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/94c73aebe631326d3d09aed291a6c335040b5447
Cr-Commit-Position: refs/heads/master@{#436317}

Powered by Google App Engine
This is Rietveld 408576698