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

Unified Diff: Source/platform/scroll/ScrollAnimator.cpp

Issue 1018183002: Add rails to input wheel events. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/platform/scroll/ScrollAnimator.cpp
diff --git a/Source/platform/scroll/ScrollAnimator.cpp b/Source/platform/scroll/ScrollAnimator.cpp
index 02a42413630d94ca11128bb8c406a6b4512975f3..16fde2c497a4cdfdcc1c88e218abe089094e6eb5 100644
--- a/Source/platform/scroll/ScrollAnimator.cpp
+++ b/Source/platform/scroll/ScrollAnimator.cpp
@@ -74,8 +74,10 @@ void ScrollAnimator::scrollToOffsetWithoutAnimation(const FloatPoint& offset)
ScrollResult ScrollAnimator::handleWheelEvent(const PlatformWheelEvent& e)
{
- bool canScrollX = m_scrollableArea->userInputScrollable(HorizontalScrollbar);
- bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar);
+ bool canScrollX = m_scrollableArea->userInputScrollable(HorizontalScrollbar)
+ && e.railMode() != PlatformWheelEventRailModeVertical;
+ bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar)
+ && e.railMode() != PlatformWheelEventRailModeHorizontal;
// Accept the event if we are scrollable in that direction and can still
// scroll any further.

Powered by Google App Engine
This is Rietveld 408576698