Title: [110048] trunk/Source/WebKit2
Revision
110048
Author
[email protected]
Date
2012-03-07 05:30:47 -0800 (Wed, 07 Mar 2012)

Log Message

Pinch zoom acts weirdly on nytimes.com while loading https://webkit.org/b/80508

Reviewed by Simon Hausmann.

Make sure to suspend the page while doing pinch zooming.
If the page is suspended (which happens while pinch zooming)
then do not send touch events to the page, even if it has
listeners.

* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEvent):
* UIProcess/qt/QtViewportInteractionEngine.cpp:
(WebKit::QtViewportInteractionEngine::pinchGestureStarted):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (110047 => 110048)


--- trunk/Source/WebKit2/ChangeLog	2012-03-07 12:28:55 UTC (rev 110047)
+++ trunk/Source/WebKit2/ChangeLog	2012-03-07 13:30:47 UTC (rev 110048)
@@ -1,3 +1,20 @@
+2012-03-07  Kenneth Rohde Christiansen  <[email protected]>
+
+        Pinch zoom acts weirdly on nytimes.com while loading
+        https://webkit.org/b/80508
+
+        Reviewed by Simon Hausmann.
+
+        Make sure to suspend the page while doing pinch zooming.
+        If the page is suspended (which happens while pinch zooming)
+        then do not send touch events to the page, even if it has
+        listeners.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::WebPageProxy::handleTouchEvent):
+        * UIProcess/qt/QtViewportInteractionEngine.cpp:
+        (WebKit::QtViewportInteractionEngine::pinchGestureStarted):
+
 2012-03-05  Caio Marcelo de Oliveira Filho  <[email protected]>
 
         [Qt] QWebNavigationRequest 'action' property should have an enum type instead of int

Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp (110047 => 110048)


--- trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-03-07 12:28:55 UTC (rev 110047)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp	2012-03-07 13:30:47 UTC (rev 110048)
@@ -1010,7 +1010,10 @@
     if (!isValid())
         return;
 
-    if (m_needTouchEvents) {
+    // If the page is suspended, which should be the case during panning, pinching
+    // and animation on the page itself (kinetic scrolling, tap to zoom) etc, then
+    // we do not send any of the events to the page even if is has listeners.
+    if (m_needTouchEvents && !m_isPageSuspended) {
         m_touchEventQueue.append(event);
         process()->responsivenessTimer()->start();
         if (m_shouldSendEventsSynchronously) {

Modified: trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp (110047 => 110048)


--- trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp	2012-03-07 12:28:55 UTC (rev 110047)
+++ trunk/Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp	2012-03-07 13:30:47 UTC (rev 110048)
@@ -509,7 +509,7 @@
 
     m_hadUserInteraction = true;
 
-    m_scaleUpdateDeferrer = adoptPtr(new ViewportUpdateDeferrer(this));
+    m_scaleUpdateDeferrer = adoptPtr(new ViewportUpdateDeferrer(this, ViewportUpdateDeferrer::DeferUpdateAndSuspendContent));
 
     m_lastPinchCenterInViewportCoordinates = pinchCenterInViewportCoordinates;
     m_pinchStartScale = m_content->contentsScale();
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to