summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-09-10 19:10:20 +0200
commit284837daa07b29d6a63a748544a90b1f5842ac5c (patch)
treeecd258180bde91fe741e0cfd2638beb3c6da7e8e /Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
parent2e2ba8ff45915f40ed3e014101269c175f2a89a0 (diff)
downloadqtwebkit-284837daa07b29d6a63a748544a90b1f5842ac5c.tar.gz
Imported WebKit commit 68645295d2e3e09af2c942f092556f06aa5f8b0d (http://svn.webkit.org/repository/webkit/trunk@128073)
New snapshot
Diffstat (limited to 'Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp')
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp b/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
index 75d4d23b0..a10367a40 100644
--- a/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
@@ -26,7 +26,8 @@
#include "config.h"
#include "QtPinchGestureRecognizer.h"
-#include "QtViewportHandler.h"
+
+#include "PageViewportControllerClientQt.h"
#include "QtWebPageEventHandler.h"
#include <QtCore/QLineF>
@@ -47,7 +48,7 @@ QtPinchGestureRecognizer::QtPinchGestureRecognizer(QtWebPageEventHandler* eventH
bool QtPinchGestureRecognizer::update(const QTouchEvent::TouchPoint& point1, const QTouchEvent::TouchPoint& point2)
{
- ASSERT(viewportHandler());
+ ASSERT(viewportController());
const qreal currentFingerDistance = QLineF(point1.screenPos(), point2.screenPos()).length();
switch (m_state) {
case NoGesture:
@@ -59,7 +60,7 @@ bool QtPinchGestureRecognizer::update(const QTouchEvent::TouchPoint& point1, con
if (pinchDistance < pinchInitialTriggerDistanceThreshold)
return false;
m_state = GestureRecognized;
- viewportHandler()->pinchGestureStarted(computePinchCenter(point1, point2));
+ viewportController()->pinchGestureStarted(computePinchCenter(point1, point2));
// We reset the initial span distance to the current distance of the
// touch points in order to avoid the jump caused by the events which
@@ -71,7 +72,7 @@ bool QtPinchGestureRecognizer::update(const QTouchEvent::TouchPoint& point1, con
case GestureRecognized:
const qreal totalScaleFactor = currentFingerDistance / m_initialFingerDistance;
const QPointF touchCenterInViewCoordinates = computePinchCenter(point1, point2);
- viewportHandler()->pinchGestureRequestUpdate(touchCenterInViewCoordinates, totalScaleFactor);
+ viewportController()->pinchGestureRequestUpdate(touchCenterInViewCoordinates, totalScaleFactor);
return true;
break;
}
@@ -85,8 +86,8 @@ void QtPinchGestureRecognizer::finish()
if (m_state == NoGesture)
return;
- ASSERT(viewportHandler());
- viewportHandler()->pinchGestureEnded();
+ ASSERT(viewportController());
+ viewportController()->pinchGestureEnded();
reset();
}
@@ -95,8 +96,8 @@ void QtPinchGestureRecognizer::cancel()
if (m_state == NoGesture)
return;
- ASSERT(viewportHandler());
- viewportHandler()->pinchGestureCancelled();
+ ASSERT(viewportController());
+ viewportController()->pinchGestureCancelled();
reset();
}