From 1eb2f305b2f4679e59b734f2f6b4890aa17a7d20 Mon Sep 17 00:00:00 2001 From: "jocelyn.turcotte@digia.com" Date: Thu, 29 Nov 2012 11:14:51 +0000 Subject: [PATCH] [Qt] The WebView should be flickable only using touch events https://bugs.webkit.org/show_bug.cgi?id=100964 Reviewed by Kenneth Rohde Christiansen. Let a user interacting with the WebView using a mouse the same way that a desktop browser would. This allows normal behaviors like text selecting, hover events, mouse cursors as well as avoid touch highlighting and touch adjustment. To do so we let all mouse events to be handled by the page directly instead of sending them to QtWebPageEventHandler. Since unhandled mouse events aren't pushed back to the PageClient like touch events does, this have the intended behavior of not letting mouse events affect QQuickFlickable. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewFlickablePrivate): git-svn-id: https://svn.webkit.org/repository/webkit/trunk@136119 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 21 +++++++++++++++++++++ Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp | 9 --------- Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h | 1 - 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 627d0be..b805594 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,24 @@ +2012-11-28 Jocelyn Turcotte + + [Qt] The WebView should be flickable only using touch events + https://bugs.webkit.org/show_bug.cgi?id=100964 + + Reviewed by Kenneth Rohde Christiansen. + + Let a user interacting with the WebView using a mouse the same way that a + desktop browser would. + This allows normal behaviors like text selecting, hover events, mouse cursors + as well as avoid touch highlighting and touch adjustment. + + To do so we let all mouse events to be handled by the page directly instead + of sending them to QtWebPageEventHandler. Since unhandled mouse events aren't + pushed back to the PageClient like touch events does, this have the intended + behavior of not letting mouse events affect QQuickFlickable. + + * UIProcess/API/qt/qquickwebview.cpp: + * UIProcess/API/qt/qquickwebview_p_p.h: + (QQuickWebViewFlickablePrivate): + 2012-11-29 Andras Becsi [Qt] Fix installation of QtWebProcess binary diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp index 5dd16cc..a45636a 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview.cpp @@ -890,15 +890,6 @@ void QQuickWebViewFlickablePrivate::pageDidRequestScroll(const QPoint& pos) m_pageViewportController->pageDidRequestScroll(pos); } -void QQuickWebViewFlickablePrivate::handleMouseEvent(QMouseEvent* event) -{ - if (!pageView->eventHandler()) - return; - - // FIXME: Update the axis locker for mouse events as well. - pageView->eventHandler()->handleInputEvent(event); -} - QQuickWebViewExperimental::QQuickWebViewExperimental(QQuickWebView *webView, QQuickWebViewPrivate* webViewPrivate) : QObject(webView) , q_ptr(webView) diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h index adedb6a..8445fe2 100644 --- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h +++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h @@ -223,7 +223,6 @@ public: virtual void updateViewportSize(); virtual void pageDidRequestScroll(const QPoint& pos); - virtual void handleMouseEvent(QMouseEvent*); private: QScopedPointer m_pageViewportController; -- 1.8.3.1