Title: [124877] trunk/Tools
Revision
124877
Author
[email protected]
Date
2012-08-07 04:34:46 -0700 (Tue, 07 Aug 2012)

Log Message

[Qt][WK2] MiniBrowser should only synthesize multiple touch points if Ctrl is pressed
https://bugs.webkit.org/show_bug.cgi?id=93277

Reviewed by Jocelyn Turcotte.

MiniBrowser's multi-touch mocking does not check if Ctrl is pressed
when registering multiple touch points based on pressed mouse buttons
and sends inconsistent touch events to the WebView which triggers an
assert in the pinch gesture recognizer.
MiniBrowserApplication::updateTouchPoint should only register multiple
touch points if the Ctrl button is pressed else it should ignore the
update request.

* MiniBrowser/qt/MiniBrowserApplication.cpp:
(MiniBrowserApplication::updateTouchPoint):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (124876 => 124877)


--- trunk/Tools/ChangeLog	2012-08-07 11:28:24 UTC (rev 124876)
+++ trunk/Tools/ChangeLog	2012-08-07 11:34:46 UTC (rev 124877)
@@ -1,3 +1,21 @@
+2012-08-07  Andras Becsi  <[email protected]>
+
+        [Qt][WK2] MiniBrowser should only synthesize multiple touch points if Ctrl is pressed
+        https://bugs.webkit.org/show_bug.cgi?id=93277
+
+        Reviewed by Jocelyn Turcotte.
+
+        MiniBrowser's multi-touch mocking does not check if Ctrl is pressed
+        when registering multiple touch points based on pressed mouse buttons
+        and sends inconsistent touch events to the WebView which triggers an
+        assert in the pinch gesture recognizer.
+        MiniBrowserApplication::updateTouchPoint should only register multiple
+        touch points if the Ctrl button is pressed else it should ignore the
+        update request.
+
+        * MiniBrowser/qt/MiniBrowserApplication.cpp:
+        (MiniBrowserApplication::updateTouchPoint):
+
 2012-08-07  Csaba Osztrogonác  <[email protected]>
 
         REGRESSION(r124800): It broke NRWT result parsing of build.webkit.org

Modified: trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp (124876 => 124877)


--- trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2012-08-07 11:28:24 UTC (rev 124876)
+++ trunk/Tools/MiniBrowser/qt/MiniBrowserApplication.cpp	2012-08-07 11:34:46 UTC (rev 124877)
@@ -216,10 +216,16 @@
 
 void MiniBrowserApplication::updateTouchPoint(const QMouseEvent* mouseEvent, QTouchEvent::TouchPoint touchPoint, Qt::MouseButton mouseButton)
 {
+    // Ignore inserting additional touch points if Ctrl isn't held because it produces
+    // inconsistent touch events and results in assers in the gesture recognizers.
+    if (!m_holdingControl && m_touchPoints.size() && !m_touchPoints.contains(mouseButton))
+        return;
+
     if (m_holdingControl && touchPoint.state() == Qt::TouchPointReleased) {
         m_heldTouchPoints.insert(mouseButton);
         return;
     }
+
     // Gesture recognition uses the screen position for the initial threshold
     // but since the canvas translates touch events we actually need to pass
     // the screen position as the scene position to deliver the appropriate
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to