| Index: third_party/WebKit/Source/core/events/WheelEvent.cpp
|
| diff --git a/third_party/WebKit/Source/core/events/WheelEvent.cpp b/third_party/WebKit/Source/core/events/WheelEvent.cpp
|
| index 5f45e07a19c925feead29f776e10a61b9d5672ad..2d23921d8361523c34697fb0d943c77e2c06f68b 100644
|
| --- a/third_party/WebKit/Source/core/events/WheelEvent.cpp
|
| +++ b/third_party/WebKit/Source/core/events/WheelEvent.cpp
|
| @@ -42,7 +42,11 @@ WheelEvent* WheelEvent::create(const PlatformWheelEvent& event, AbstractView* vi
|
| MouseEvent::platformModifiersToButtons(event.getModifiers()), event.timestamp(),
|
| event.resendingPluginId(), event.hasPreciseScrollingDeltas(),
|
| static_cast<Event::RailsMode>(event.getRailsMode()),
|
| - event.cancelable());
|
| + event.cancelable()
|
| +#if OS(MACOSX)
|
| + , static_cast<WheelEventPhase>(event.phase()), static_cast<WheelEventPhase>(event.momentumPhase())
|
| +#endif
|
| + );
|
| }
|
|
|
| WheelEvent::WheelEvent()
|
| @@ -66,6 +70,10 @@ WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializ
|
| , m_resendingPluginId(-1)
|
| , m_hasPreciseScrollingDeltas(false)
|
| , m_railsMode(RailsModeFree)
|
| +#if OS(MACOSX)
|
| + , m_phase(WheelEventPhaseNone)
|
| + , m_momentumPhase(WheelEventPhaseNone)
|
| +#endif
|
| {
|
| }
|
|
|
| @@ -87,9 +95,39 @@ WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
|
| , m_resendingPluginId(resendingPluginId)
|
| , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
|
| , m_railsMode(railsMode)
|
| +#if OS(MACOSX)
|
| + , m_phase(WheelEventPhaseNone)
|
| + , m_momentumPhase(WheelEventPhaseNone)
|
| +#endif
|
| {
|
| }
|
|
|
| +#if OS(MACOSX)
|
| +WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta, unsigned deltaMode,
|
| + AbstractView* view, const IntPoint& screenLocation, const IntPoint& windowLocation,
|
| + PlatformEvent::Modifiers modifiers, unsigned short buttons, double platformTimeStamp,
|
| + int resendingPluginId, bool hasPreciseScrollingDeltas, RailsMode railsMode, bool cancelable,
|
| + WheelEventPhase phase, WheelEventPhase momentumPhase)
|
| + : MouseEvent(EventTypeNames::wheel, true, cancelable, view, 0, screenLocation.x(), screenLocation.y(),
|
| + windowLocation.x(), windowLocation.y(), 0, 0, modifiers, 0, buttons,
|
| + nullptr, platformTimeStamp, PlatformMouseEvent::RealOrIndistinguishable,
|
| + // TODO(zino): Should support canvas hit region because the wheel event
|
| + // is a kind of mouse event. Please see http://crbug.com/594075
|
| + String())
|
| + , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultiplier)
|
| + , m_deltaX(-rawDelta.x())
|
| + , m_deltaY(-rawDelta.y())
|
| + , m_deltaZ(0)
|
| + , m_deltaMode(deltaMode)
|
| + , m_resendingPluginId(resendingPluginId)
|
| + , m_hasPreciseScrollingDeltas(hasPreciseScrollingDeltas)
|
| + , m_railsMode(railsMode)
|
| + , m_phase(phase)
|
| + , m_momentumPhase(momentumPhase)
|
| +{
|
| +}
|
| +#endif
|
| +
|
| const AtomicString& WheelEvent::interfaceName() const
|
| {
|
| return EventNames::WheelEvent;
|
|
|