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

Issue 151483008: Re-add snap-back behavior (Blink side) (Closed)

Created:
6 years, 10 months ago by Peter Kasting
Modified:
6 years, 9 months ago
Reviewers:
sky, abarth-chromium
CC:
blink-reviews, Dirk Pranke
Visibility:
Public.

Description

After Aura copied the original Linux scrollbar behavior, it never got updated with Windows-specific native behaviors from ScrollbarThemeWin.cpp: * Snap the scrollbar back to its drag origin when dragged too far off the track. This code matches the old code we had for years and also matches my Win 7 native scrollbars pixel-for-pixel. * Don't jump the scroll thumb to the mouse cursor on a middle-click, only on a shift-click. Middle-click must be a GTK-ism. This is the Blink side of the changes to re-add this behavior. BUG=337919 TEST=Drag a scroll thumb to somewhere in the track, then without releasing, move the mouse far away from the track. The scroll thumb should snap back to the scroll origin. R=abarth@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=168177

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+85 lines, -98 lines) Patch
M Source/core/rendering/RenderScrollbarTheme.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M Source/platform/scroll/ScrollbarTheme.h View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarTheme.cpp View 1 2 3 6 chunks +77 lines, -62 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeGtkOrAura.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp View 1 2 3 1 chunk +0 lines, -5 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMacCommon.h View 1 2 3 2 chunks +1 line, -2 lines 0 comments Download
M Source/platform/scroll/ScrollbarThemeMacCommon.mm View 1 2 3 3 chunks +1 line, -12 lines 0 comments Download
M Source/web/mac/WebScrollbarTheme.mm View 1 2 3 2 chunks +2 lines, -2 lines 0 comments Download
M public/web/WebInputEvent.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M public/web/mac/WebScrollbarTheme.h View 1 2 3 1 chunk +1 line, -11 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Peter Kasting
I assumed that the correct way to add non-GTK behavior to ScrollbarThemeGtkOrAura.cpp was to use ...
6 years, 10 months ago (2014-02-08 00:28:24 UTC) #1
Dirk Pranke
I am unqualified to weigh in here, and defer to sky or erg.
6 years, 10 months ago (2014-02-08 01:21:21 UTC) #2
sky
https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp File Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp (right): https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp#newcode157 Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp:157: #if defined(TOOLKIT_GTK) Don't you want !win here? Otherwise won't ...
6 years, 10 months ago (2014-02-10 15:14:29 UTC) #3
Peter Kasting
https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp File Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp (right): https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp#newcode157 Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp:157: #if defined(TOOLKIT_GTK) On 2014/02/10 15:14:30, sky wrote: > Don't ...
6 years, 10 months ago (2014-02-10 23:09:16 UTC) #4
sky
I don't think you can make a general statement about the two. Look at the ...
6 years, 10 months ago (2014-02-11 00:35:24 UTC) #5
Peter Kasting
On 2014/02/11 00:35:24, sky wrote: > I don't think you can make a general statement ...
6 years, 10 months ago (2014-02-11 18:16:12 UTC) #6
Elliot Glaysher
https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp File Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp (right): https://codereview.chromium.org/151483008/diff/1/Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp#newcode148 Source/platform/scroll/ScrollbarThemeGtkOrAura.cpp:148: #if defined(TOOLKIT_GTK) You probably want defined(TOOLKIT_GTK) || (defined(OS_LINUX) && ...
6 years, 10 months ago (2014-02-11 18:36:56 UTC) #7
sky
LGTM
6 years, 10 months ago (2014-02-11 18:52:59 UTC) #8
Peter Kasting
I tried to make Elliot's suggested change, but got this presubmit warning: Found use of ...
6 years, 10 months ago (2014-02-12 03:17:58 UTC) #9
Peter Kasting
Adam: This compiles and seems to work (on Windows at least) now, so if you ...
6 years, 10 months ago (2014-02-24 23:58:44 UTC) #10
Peter Kasting
Here are a few explanatory comments. https://codereview.chromium.org/151483008/diff/230001/Source/core/rendering/RenderScrollbarTheme.h File Source/core/rendering/RenderScrollbarTheme.h (right): https://codereview.chromium.org/151483008/diff/230001/Source/core/rendering/RenderScrollbarTheme.h#newcode49 Source/core/rendering/RenderScrollbarTheme.h:49: virtual bool shouldSnapBackToDragOrigin(ScrollbarThemeClient* ...
6 years, 10 months ago (2014-02-25 00:01:57 UTC) #11
abarth-chromium
LGTM assuming you add the COMPILE_ASSERTS https://codereview.chromium.org/151483008/diff/230001/public/platform/WebScrollbarBehavior.h File public/platform/WebScrollbarBehavior.h (right): https://codereview.chromium.org/151483008/diff/230001/public/platform/WebScrollbarBehavior.h#newcode15 public/platform/WebScrollbarBehavior.h:15: // These match ...
6 years, 10 months ago (2014-02-25 07:18:37 UTC) #12
Peter Kasting
6 years, 9 months ago (2014-03-01 01:21:17 UTC) #13
Message was sent while issue was closed.
Committed patchset #4 manually as r168177 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698