Title: [111850] trunk/Source/WebKit2
Revision
111850
Author
abe...@webkit.org
Date
2012-03-23 05:17:39 -0700 (Fri, 23 Mar 2012)

Log Message

[Qt][WK2] Disable the flickable when pinching.

Reviewed by Kenneth Rohde Christiansen.

Set the interactivity of the internal flickable to false
when pinching so that it does not react to mouse events
which might break pinch zoom.
This is a temporal workaround and needed until the event
propagation in QtQuick is fixed.

* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):
(WebKit::QtViewportInteractionEngine::pinchGestureEnded):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (111849 => 111850)


--- trunk/Source/WebKit2/ChangeLog	2012-03-23 12:07:06 UTC (rev 111849)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-23 12:17:39 UTC (rev 111850)
@@ -1,3 +1,20 @@
+2012-03-23  Andras Becsi  <andras.be...@nokia.com>
+
+        [Qt][WK2] Disable the flickable when pinching.
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        Set the interactivity of the internal flickable to false
+        when pinching so that it does not react to mouse events
+        which might break pinch zoom.
+        This is a temporal workaround and needed until the event
+        propagation in QtQuick is fixed.
+
+        * UIProcess/qt/QtViewportInteractionEngine.cpp:
+        (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged):
+        (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
+        (WebKit::QtViewportInteractionEngine::pinchGestureEnded):
+
 2012-03-23  Ryosuke Niwa  <rn...@webkit.org>
 
         REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms

Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp (111849 => 111850)


--- trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp	2012-03-23 12:07:06 UTC (rev 111849)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp	2012-03-23 12:17:39 UTC (rev 111850)
@@ -231,11 +231,13 @@
 {
     switch (newState) {
     case QAbstractAnimation::Running:
+        m_flickProvider->cancelFlick();
         if (!m_scaleUpdateDeferrer)
             m_scaleUpdateDeferrer = adoptPtr(new ViewportUpdateDeferrer(this, ViewportUpdateDeferrer::DeferUpdateAndSuspendContent));
         break;
     case QAbstractAnimation::Stopped:
         m_scaleUpdateDeferrer.clear();
+        m_flickProvider->contentItem()->parentItem()->setProperty("interactive", true);
         break;
     default:
         break;
@@ -534,6 +536,9 @@
 
     m_hadUserInteraction = true;
 
+    m_flickProvider->cancelFlick();
+    m_flickProvider->contentItem()->parentItem()->setProperty("interactive", false);
+
     m_scaleUpdateDeferrer = adoptPtr(new ViewportUpdateDeferrer(this, ViewportUpdateDeferrer::DeferUpdateAndSuspendContent));
 
     m_lastPinchCenterInViewportCoordinates = pinchCenterInViewportCoordinates;
@@ -574,8 +579,12 @@
 
     m_pinchStartScale = -1;
     // Clear the update deferrer now if we're in our final position and there won't be any animation to clear it later.
+    if (ensureContentWithinViewportBoundary()) {
     if (ensureContentWithinViewportBoundary())
         m_scaleUpdateDeferrer.clear();
+        m_flickProvider->cancelFlick();
+        m_flickProvider->contentItem()->parentItem()->setProperty("interactive", true);
+    }
 }
 
 void QtViewportInteractionEngine::itemSizeChanged()
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to