From af7942317b351f1c871ee750c0aa2f4d94a2309e Mon Sep 17 00:00:00 2001 From: "kenneth@webkit.org" Date: Fri, 27 Jan 2012 14:20:50 +0000 Subject: [PATCH] [Qt] Fade out tap highlighting when starting to pan https://bugs.webkit.org/show_bug.cgi?id=77202 Reviewed by Simon Hausmann. Basically we need to fade out the potential tap highlighting when ever the gesture recognition fails or another gesture is recognized. We do that with this change. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer): (WebKit::QtTapGestureRecognizer::recognize): (WebKit::QtTapGestureRecognizer::reset): Remove reset as it does nothing but call code before the event handler is installed. git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106116 268f45cc-cd09-0410-ab3c-d52691b4dbfc --- Source/WebKit2/ChangeLog | 19 +++++++++++++++++++ .../UIProcess/qt/QtTapGestureRecognizer.cpp | 7 +++---- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 11c450eee507..9a6ffb4c26cf 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,22 @@ +2012-01-27 Kenneth Rohde Christiansen + + [Qt] Fade out tap highlighting when starting to pan + https://bugs.webkit.org/show_bug.cgi?id=77202 + + Reviewed by Simon Hausmann. + + Basically we need to fade out the potential tap highlighting + when ever the gesture recognition fails or another gesture + is recognized. We do that with this change. + + * UIProcess/qt/QtTapGestureRecognizer.cpp: + (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer): + (WebKit::QtTapGestureRecognizer::recognize): + (WebKit::QtTapGestureRecognizer::reset): + + Remove reset as it does nothing but call code before the + event handler is installed. + 2012-01-26 No'am Rosenthal and Jocelyn Turcotte [Qt] WKTR: Use a software rendering pipiline when running tests. diff --git a/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp b/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp index 45a73fbaa287..7032220d5c62 100644 --- a/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp +++ b/Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp @@ -35,7 +35,6 @@ QtTapGestureRecognizer::QtTapGestureRecognizer(QtWebPageEventHandler* eventHandl : QtGestureRecognizer(eventHandler) , m_tapState(NoTap) { - reset(); } bool QtTapGestureRecognizer::recognize(const QTouchEvent* event, qint64 eventTimestampMillis) @@ -87,6 +86,7 @@ bool QtTapGestureRecognizer::recognize(const QTouchEvent* event, qint64 eventTim break; case QEvent::TouchEnd: m_tapAndHoldTimer.stop(); + m_eventHandler->handlePotentialSingleTapEvent(QTouchEvent::TouchPoint()); switch (m_tapState) { case DoubleTapCandidate: @@ -117,9 +117,6 @@ bool QtTapGestureRecognizer::recognize(const QTouchEvent* event, qint64 eventTim break; } - if (m_tapState == NoTap) - m_eventHandler->handlePotentialSingleTapEvent(QTouchEvent::TouchPoint()); - return false; } @@ -149,6 +146,8 @@ void QtTapGestureRecognizer::tapAndHoldTimeout() void QtTapGestureRecognizer::reset() { + m_eventHandler->handlePotentialSingleTapEvent(QTouchEvent::TouchPoint()); + m_tapState = NoTap; m_touchBeginEventForTap.clear(); m_tapAndHoldTimer.stop(); -- 2.36.0