diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/platform/win/WheelEventWin.cpp | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/platform/win/WheelEventWin.cpp')
-rw-r--r-- | WebCore/platform/win/WheelEventWin.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/WebCore/platform/win/WheelEventWin.cpp b/WebCore/platform/win/WheelEventWin.cpp index e6670a4..3fb8118 100644 --- a/WebCore/platform/win/WheelEventWin.cpp +++ b/WebCore/platform/win/WheelEventWin.cpp @@ -23,8 +23,11 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#include "config.h" #include "PlatformWheelEvent.h" +#include "FloatPoint.h" +#include "FloatSize.h" #include <windows.h> #include <windowsx.h> @@ -62,6 +65,28 @@ static int verticalScrollLines() return scrollLines; } +PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, const FloatSize& delta, const FloatPoint& location) + : m_isAccepted(false) + , m_shiftKey(false) + , m_ctrlKey(false) + , m_altKey(false) + , m_metaKey(false) +{ + m_deltaX = delta.width(); + m_deltaY = delta.height(); + + m_wheelTicksX = m_deltaX; + m_wheelTicksY = m_deltaY; + + // Global Position is just x, y location of event + POINT point = {location.x(), location.y()}; + m_globalPosition = point; + + // Position needs to be translated to our client + ScreenToClient(hWnd, &point); + m_position = point; +} + PlatformWheelEvent::PlatformWheelEvent(HWND hWnd, WPARAM wParam, LPARAM lParam, bool isMouseHWheel) : m_position(positionForEvent(hWnd, lParam)) , m_globalPosition(globalPositionForEvent(hWnd, lParam)) |