[Qt][WK2] Move event handling out of QtWebPageProxy
authorjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Nov 2011 12:48:49 +0000 (12:48 +0000)
committerjesus@webkit.org <jesus@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Nov 2011 12:48:49 +0000 (12:48 +0000)
commit15a4f8582d1d7aac7a639ca0db8bbaf156573f54
treeba4d3280d28f00b70e8d27722ae79f30eb9458d2
parent5190109f154d4030708f8031809c1ed74514ac12
[Qt][WK2] Move event handling out of QtWebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=73089

Reviewed by Kenneth Rohde Christiansen.

Move all logic related to event handling, gestures and the
interaction engine out of QtWebPageProxy, creating a separate
class called QtWebPageEventHandler. This handler will be created
by the QQuickWebViewPrivate and will be registered into QtWebPageProxy.
QQuickWebPage will now call handleEvent through this entity.

* Target.pri:
* UIProcess/API/qt/qquickwebpage.cpp:
(QQuickWebPage::event):
* UIProcess/API/qt/qquickwebview.cpp:
(QQuickWebViewPrivate::QQuickWebViewPrivate):
(QQuickWebViewPrivate::initializeDesktop):
(QQuickWebViewPrivate::initializeTouch):
* UIProcess/API/qt/qquickwebview_p_p.h:
* UIProcess/qt/QtTapGestureRecognizer.cpp:
(WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer):
(WebKit::QtTapGestureRecognizer::recognize):
(WebKit::QtTapGestureRecognizer::tapTimeout):
* UIProcess/qt/QtTapGestureRecognizer.h:
* UIProcess/qt/QtWebPageEventHandler.cpp: Added.
(QtWebPageEventHandler::dragOperationToDropAction):
(QtWebPageEventHandler::dragOperationToDropActions):
(QtWebPageEventHandler::dropActionToDragOperation):
(QtWebPageEventHandler::QtWebPageEventHandler):
(QtWebPageEventHandler::~QtWebPageEventHandler):
(QtWebPageEventHandler::handleEvent):
(QtWebPageEventHandler::handleMouseMoveEvent):
(QtWebPageEventHandler::handleMousePressEvent):
(QtWebPageEventHandler::handleMouseReleaseEvent):
(QtWebPageEventHandler::handleMouseDoubleClickEvent):
(QtWebPageEventHandler::handleWheelEvent):
(QtWebPageEventHandler::handleHoverLeaveEvent):
(QtWebPageEventHandler::handleHoverMoveEvent):
(QtWebPageEventHandler::handleDragEnterEvent):
(QtWebPageEventHandler::handleDragLeaveEvent):
(QtWebPageEventHandler::handleDragMoveEvent):
(QtWebPageEventHandler::handleDropEvent):
(QtWebPageEventHandler::handleSingleTapEvent):
(QtWebPageEventHandler::handleDoubleTapEvent):
(QtWebPageEventHandler::timerEvent):
(QtWebPageEventHandler::handleKeyPressEvent):
(QtWebPageEventHandler::handleKeyReleaseEvent):
(QtWebPageEventHandler::handleFocusInEvent):
(QtWebPageEventHandler::handleFocusOutEvent):
(QtWebPageEventHandler::setViewportInteractionEngine):
(QtWebPageEventHandler::touchEvent):
(QtWebPageEventHandler::resetGestureRecognizers):
(QtWebPageEventHandler::doneWithTouchEvent):
(QtWebPageEventHandler::didFindZoomableArea):
* UIProcess/qt/QtWebPageEventHandler.h: Added.
* UIProcess/qt/QtWebPageProxy.cpp:
(QtWebPageProxy::QtWebPageProxy):
(QtWebPageProxy::init):
(QtWebPageProxy::didFindZoomableArea):
(QtWebPageProxy::processDidCrash):
(QtWebPageProxy::startDrag):
(QtWebPageProxy::doneWithTouchEvent):
* UIProcess/qt/QtWebPageProxy.h:
(QtWebPageProxy::eventHandler):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@101164 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/Target.pri
Source/WebKit2/UIProcess/API/qt/qquickwebpage.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp
Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp
Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.h
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.cpp [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtWebPageEventHandler.h [new file with mode: 0644]
Source/WebKit2/UIProcess/qt/QtWebPageProxy.cpp
Source/WebKit2/UIProcess/qt/QtWebPageProxy.h