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

Unified Diff: Source/core/events/WheelEvent.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/core/events/WheelEvent.h ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/WheelEvent.cpp
diff --git a/Source/core/events/WheelEvent.cpp b/Source/core/events/WheelEvent.cpp
index 1c665150a296b1e99cc834d26097d6935cc4b2c6..e3ed2cf857a0d8a9276666966eea752888f37a23 100644
--- a/Source/core/events/WheelEvent.cpp
+++ b/Source/core/events/WheelEvent.cpp
@@ -37,6 +37,7 @@ WheelEvent::WheelEvent()
, m_deltaMode(DOM_DELTA_PIXEL)
, m_canScroll(true)
, m_hasPreciseScrollingDeltas(false)
+ , m_railsMode(RailsModeFree)
{
}
@@ -49,12 +50,13 @@ WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ
, m_deltaMode(initializer.deltaMode())
, m_canScroll(true)
, m_hasPreciseScrollingDeltas(false)
+ , m_railsMode(RailsModeFree)
{
}
WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
PassRefPtrWillBeRawPtr<AbstractView> view, const IntPoint& screenLocation, const IntPoint& windowLocation,
- bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short buttons, bool canScroll, bool hasPreciseScrollingDeltas)
+ bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short buttons, bool canScroll, bool hasPreciseScrollingDeltas, RailsMode railsMode)
: MouseEvent(EventTypeNames::wheel, true, true, view, 0, screenLocation.x(), screenLocation.y(),
windowLocation.x(), windowLocation.y(), 0, 0, ctrlKey, altKey, shiftKey, metaKey, 0, buttons,
nullptr, nullptr, false, PlatformMouseEvent::RealOrIndistinguishable)
@@ -65,6 +67,7 @@ WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
, m_deltaMode(deltaMode)
, m_canScroll(canScroll)
, m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
+ , m_railsMode(railsMode)
{
}
@@ -104,7 +107,8 @@ WheelEventDispatchMediator::WheelEventDispatchMediator(const PlatformWheelEvent&
deltaMode(event), view, event.globalPosition(), event.position(),
event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
MouseEvent::platformModifiersToButtons(event.modifiers()),
- event.canScroll(), event.hasPreciseScrollingDeltas()));
+ event.canScroll(), event.hasPreciseScrollingDeltas(),
+ static_cast<Event::RailsMode>(event.railsMode())));
}
WheelEvent& WheelEventDispatchMediator::event() const
« no previous file with comments | « Source/core/events/WheelEvent.h ('k') | Source/core/frame/PinchViewport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698