From 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 Mon Sep 17 00:00:00 2001 From: The Android Open Source Project Date: Wed, 17 Dec 2008 18:05:15 -0800 Subject: Code drop from //branches/cupcake/...@124589 --- WebCore/platform/qt/WheelEventQt.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'WebCore/platform/qt/WheelEventQt.cpp') diff --git a/WebCore/platform/qt/WheelEventQt.cpp b/WebCore/platform/qt/WheelEventQt.cpp index 307e007..135f15a 100644 --- a/WebCore/platform/qt/WheelEventQt.cpp +++ b/WebCore/platform/qt/WheelEventQt.cpp @@ -1,5 +1,5 @@ /* - Copyright (C) 2007 Trolltech ASA + Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -15,9 +15,6 @@ along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - - This class provides all functionality needed for loading images, style sheets and html - pages from the web. It has a memory cache for these objects. */ #include "config.h" @@ -29,15 +26,21 @@ namespace WebCore { + PlatformWheelEvent::PlatformWheelEvent(QWheelEvent* e) +#ifdef QT_NO_WHEELEVENT +{ + Q_UNUSED(e); +} +#else : m_position(e->pos()) , m_globalPosition(e->globalPos()) + , m_granularity(ScrollByLineWheelEvent) , m_isAccepted(false) , m_shiftKey(e->modifiers() & Qt::ShiftModifier) , m_ctrlKey(e->modifiers() & Qt::ControlModifier) , m_altKey(e->modifiers() & Qt::AltModifier) , m_metaKey(e->modifiers() & Qt::MetaModifier) - , m_isContinuous(false) { if (e->orientation() == Qt::Horizontal) { m_deltaX = (e->delta() / 120); @@ -46,6 +49,11 @@ PlatformWheelEvent::PlatformWheelEvent(QWheelEvent* e) m_deltaX = 0; m_deltaY = (e->delta() / 120); } + + // FIXME: retrieve the user setting for the number of lines to scroll on each wheel event + m_deltaX *= horizontalLineMultiplier(); + m_deltaY *= verticalLineMultiplier(); } +#endif // QT_NO_WHEELEVENT } // namespace WebCore -- cgit v1.1