[chromium] Halt in progress flings on receipt of key events
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 01:54:09 +0000 (01:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Mar 2012 01:54:09 +0000 (01:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=81988

Patch by Robert Kroeger <rjkroege@chromium.org> on 2012-03-22
Reviewed by Adrienne Walker.

* src/WebCompositorInputHandlerImpl.cpp:
(WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
* src/WebViewImpl.cpp:
(WebKit::WebViewImpl::keyEvent):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@111806 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp
Source/WebKit/chromium/src/WebViewImpl.cpp

index 328297d..a87400a 100644 (file)
@@ -1,3 +1,15 @@
+2012-03-22  Robert Kroeger  <rjkroege@chromium.org>
+
+        [chromium] Halt in progress flings on receipt of key events
+        https://bugs.webkit.org/show_bug.cgi?id=81988
+
+        Reviewed by Adrienne Walker.
+
+        * src/WebCompositorInputHandlerImpl.cpp:
+        (WebKit::WebCompositorInputHandlerImpl::handleInputEventInternal):
+        * src/WebViewImpl.cpp:
+        (WebKit::WebViewImpl::keyEvent):
+
 2012-03-22  Dana Jansens  <danakj@chromium.org>
 
         [chromium] Skip frames when checkerboarding an animation
index 205cd25..b4e2675 100644 (file)
@@ -248,6 +248,8 @@ WebCompositorInputHandlerImpl::EventDisposition WebCompositorInputHandlerImpl::h
     } else if (event.type == WebInputEvent::GestureFlingCancel) {
         if (cancelCurrentFling())
             return DidHandle;
+    } else if (WebInputEvent::isKeyboardEventType(event.type)) {
+         cancelCurrentFling();
     }
 
     return DidNotHandle;
index 554b7b7..c47fdda 100644 (file)
@@ -690,6 +690,10 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
         || (event.type == WebInputEvent::KeyDown)
         || (event.type == WebInputEvent::KeyUp));
 
+    // Halt an in-progress fling on a key event.
+    if (m_gestureAnimation)
+        m_gestureAnimation.clear();
+
     // Please refer to the comments explaining the m_suppressNextKeypressEvent
     // member.
     // The m_suppressNextKeypressEvent is set if the KeyDown is handled by