| Index: Source/core/dom/WheelEvent.cpp
|
| diff --git a/Source/core/dom/WheelEvent.cpp b/Source/core/dom/WheelEvent.cpp
|
| index bcb3d69d1169a71cc6a9463c752cebf1e3c38cb9..f2b71f6c8488607a0c80b71b87564b45f5b3019b 100644
|
| --- a/Source/core/dom/WheelEvent.cpp
|
| +++ b/Source/core/dom/WheelEvent.cpp
|
| @@ -30,14 +30,6 @@
|
|
|
| namespace WebCore {
|
|
|
| -static inline double wheelTicksToPixels(double ticks)
|
| -{
|
| - // Make sure we use +0 for all zeros.
|
| - if (!ticks)
|
| - return 0;
|
| - return -ticks * WheelEvent::TickMultiplier;
|
| -}
|
| -
|
| WheelEventInit::WheelEventInit()
|
| : deltaX(0)
|
| , deltaY(0)
|
| @@ -60,6 +52,7 @@ WheelEvent::WheelEvent()
|
|
|
| WheelEvent::WheelEvent(const AtomicString& type, const WheelEventInit& initializer)
|
| : MouseEvent(type, initializer)
|
| + , m_wheelDelta(initializer.wheelDeltaX ? initializer.wheelDeltaX : -initializer.deltaX, initializer.wheelDeltaY ? initializer.wheelDeltaY : -initializer.deltaY)
|
| , m_deltaX(initializer.deltaX ? initializer.deltaX : -initializer.wheelDeltaX)
|
| , m_deltaY(initializer.deltaY ? initializer.deltaY : -initializer.wheelDeltaY)
|
| , m_deltaZ(initializer.deltaZ)
|
| @@ -76,10 +69,10 @@ WheelEvent::WheelEvent(const FloatPoint& wheelTicks, const FloatPoint& rawDelta,
|
| pageLocation.x(), pageLocation.y(),
|
| 0, 0,
|
| ctrlKey, altKey, shiftKey, metaKey, 0, 0, 0, false)
|
| - , m_deltaX(wheelTicksToPixels(wheelTicks.x()))
|
| - , m_deltaY(wheelTicksToPixels(wheelTicks.y()))
|
| - , m_deltaZ(0) // FIXME: Not supported.
|
| - , m_rawDelta(roundedIntPoint(rawDelta))
|
| + , m_wheelDelta(wheelTicks.x() * TickMultiplier, wheelTicks.y() * TickMultiplier)
|
| + , m_deltaX(-rawDelta.x())
|
| + , m_deltaY(-rawDelta.y())
|
| + , m_deltaZ(0)
|
| , m_deltaMode(deltaMode)
|
| , m_directionInvertedFromDevice(directionInvertedFromDevice)
|
| {
|
| @@ -101,9 +94,9 @@ void WheelEvent::initWheelEvent(int rawDeltaX, int rawDeltaY, PassRefPtr<Abstrac
|
| m_shiftKey = shiftKey;
|
| m_metaKey = metaKey;
|
|
|
| - m_deltaX = wheelTicksToPixels(rawDeltaX);
|
| - m_deltaY = wheelTicksToPixels(rawDeltaY);
|
| - m_rawDelta = IntPoint(rawDeltaX, rawDeltaY);
|
| + m_wheelDelta = IntPoint(rawDeltaX * TickMultiplier, rawDeltaY * TickMultiplier);
|
| + m_deltaX = -rawDeltaX;
|
| + m_deltaY = -rawDeltaY;
|
| m_deltaMode = DOM_DELTA_PIXEL;
|
| m_directionInvertedFromDevice = false;
|
|
|
|
|