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

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: More plumbing and tests 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
« no previous file with comments | « Source/platform/PlatformWheelEvent.h ('k') | Source/web/WebInputEvent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollAnimator.cpp
diff --git a/Source/platform/scroll/ScrollAnimator.cpp b/Source/platform/scroll/ScrollAnimator.cpp
index 02a42413630d94ca11128bb8c406a6b4512975f3..dca16c9d5506a3d91869e6f9799e34db5d1247b7 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.railsMode() != PlatformEvent::RailsModeVertical;
+ bool canScrollY = m_scrollableArea->userInputScrollable(VerticalScrollbar)
+ && e.railsMode() != PlatformEvent::RailsModeHorizontal;
// Accept the event if we are scrollable in that direction and can still
// scroll any further.
« no previous file with comments | « Source/platform/PlatformWheelEvent.h ('k') | Source/web/WebInputEvent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698