Do not ASSERT on TouchStationary TouchPoint state.
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2012 12:49:14 +0000 (12:49 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Feb 2012 12:49:14 +0000 (12:49 +0000)
https://bugs.webkit.org/show_bug.cgi?id=77620

Patch by Allan Sandfeld Jensen <allan.jensen@nokia.com> on 2012-02-03
Reviewed by Kenneth Rohde Christiansen.

* page/EventHandler.cpp:
(WebCore::eventNameForTouchPointState): Explicitly show that TouchStationary is asserted.
(WebCore::EventHandler::handleTouchEvent):
    Remove TouchStationary from ASSERT. The value of HitTestRequest is restored to the
    value it should have if hittested, but is not used.

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

Source/WebCore/ChangeLog
Source/WebCore/page/EventHandler.cpp

index 74da2f1cc912cee44c71abb675b2eac4bdc6d40e..bb735c5eb6baf4f679d04f907a8cf98cc9b2441f 100644 (file)
@@ -1,3 +1,16 @@
+2012-02-03  Allan Sandfeld Jensen  <allan.jensen@nokia.com>
+
+        Do not ASSERT on TouchStationary TouchPoint state.
+        https://bugs.webkit.org/show_bug.cgi?id=77620
+
+        Reviewed by Kenneth Rohde Christiansen.
+
+        * page/EventHandler.cpp:
+        (WebCore::eventNameForTouchPointState): Explicitly show that TouchStationary is asserted.
+        (WebCore::EventHandler::handleTouchEvent):
+            Remove TouchStationary from ASSERT. The value of HitTestRequest is restored to the
+            value it should have if hittested, but is not used.
+
 2012-02-03  Kentaro Hara  <haraken@chromium.org>
 
         Add the "ObjC" prefix to ObjC specific IDL attributes
index f3baea2c9bbdf7d737e832bd453369e20af78bc5..6651e76a88c1ae280ecd25d067fd5dc37b787c36 100644 (file)
@@ -3281,6 +3281,8 @@ static const AtomicString& eventNameForTouchPointState(PlatformTouchPoint::State
         return eventNames().touchstartEvent;
     case PlatformTouchPoint::TouchMoved:
         return eventNames().touchmoveEvent;
+    case PlatformTouchPoint::TouchStationary:
+        // TouchStationary state is not converted to touch events, so fall through to assert.
     default:
         ASSERT_NOT_REACHED();
         return emptyAtom;
@@ -3336,6 +3338,9 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
         case PlatformTouchPoint::TouchCancelled:
             hitType |= HitTestRequest::Release;
             break;
+        case PlatformTouchPoint::TouchStationary:
+            hitType |= HitTestRequest::Active | HitTestRequest::ReadOnly;
+            break;
         default:
             ASSERT_NOT_REACHED();
             break;
@@ -3368,7 +3373,7 @@ bool EventHandler::handleTouchEvent(const PlatformTouchEvent& event)
             // we also remove it from the map.
             touchTarget = m_originatingTouchPointTargets.take(touchPointTargetKey);
         } else
-            // No hittest is performed on move, since the target is not allowed to change anyway.
+            // No hittest is performed on move or stationary, since the target is not allowed to change anyway.
             touchTarget = m_originatingTouchPointTargets.get(touchPointTargetKey);
 
         if (!touchTarget.get())