diff options
author | Ben Murdoch <benm@google.com> | 2010-06-15 19:36:43 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2010-06-16 14:52:28 +0100 |
commit | 545e470e52f0ac6a3a072bf559c796b42c6066b6 (patch) | |
tree | c0c14763654d84d37577dde512c3d3b4699a9e86 /WebCore/platform/mac/WheelEventMac.mm | |
parent | 719298a66237d38ea5c05f1547123ad8aacbc237 (diff) | |
download | external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.zip external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.gz external_webkit-545e470e52f0ac6a3a072bf559c796b42c6066b6.tar.bz2 |
Merge webkit.org at r61121: Initial merge by git.
Change-Id: Icd6db395c62285be384d137164d95d7466c98760
Diffstat (limited to 'WebCore/platform/mac/WheelEventMac.mm')
-rw-r--r-- | WebCore/platform/mac/WheelEventMac.mm | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/WebCore/platform/mac/WheelEventMac.mm b/WebCore/platform/mac/WheelEventMac.mm index d7e2934..d9663b9 100644 --- a/WebCore/platform/mac/WheelEventMac.mm +++ b/WebCore/platform/mac/WheelEventMac.mm @@ -43,9 +43,14 @@ PlatformWheelEvent::PlatformWheelEvent(NSEvent* event, NSView *windowView) , m_metaKey([event modifierFlags] & NSCommandKeyMask) { BOOL continuous; - wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &m_wheelTicksX, &m_wheelTicksY, &continuous); - - if (!continuous) { + + wkGetWheelEventDeltas(event, &m_deltaX, &m_deltaY, &continuous); + if (continuous) { + m_wheelTicksX = m_deltaX / static_cast<float>(Scrollbar::pixelsPerLineStep()); + m_wheelTicksY = m_deltaY / static_cast<float>(Scrollbar::pixelsPerLineStep()); + } else { + m_wheelTicksX = m_deltaX; + m_wheelTicksY = m_deltaY; m_deltaX *= static_cast<float>(Scrollbar::pixelsPerLineStep()); m_deltaY *= static_cast<float>(Scrollbar::pixelsPerLineStep()); } |