[Qt] Fade out tap highlighting when starting to pan
authorkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 14:20:50 +0000 (14:20 +0000)
committerkenneth@webkit.org <kenneth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 27 Jan 2012 14:20:50 +0000 (14:20 +0000)
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
Source/WebKit2/UIProcess/qt/QtTapGestureRecognizer.cpp

index 11c450eee507e79a896045d6763fd3657120e30c..9a6ffb4c26cf00b464552074b4e68271166255d4 100644 (file)
@@ -1,3 +1,22 @@
+2012-01-27  Kenneth Rohde Christiansen  <kenneth@webkit.org>
+
+        [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  <noam.rosenthal@nokia.com> and Jocelyn Turcotte  <jocelyn.turcotte@nokia.com>
 
         [Qt] WKTR: Use a software rendering pipiline when running tests.
index 45a73fbaa2872f5e70d9b7bfa30b2405dcd5722e..7032220d5c6286123ef55988e130db2a2f52ce9e 100644 (file)
@@ -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();