summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/qt/QtPinchGestureRecognizer.cpp
diff options
context:
space:
mode:
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();
}