Fix the iOS buld.
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 17:38:33 +0000 (17:38 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Apr 2014 17:38:33 +0000 (17:38 +0000)
* UIProcess/WebPageProxy.cpp:
(WebKit::areAllTouchPointsReleased):

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

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/WebPageProxy.cpp

index 919a952..02b90d4 100644 (file)
@@ -1,3 +1,10 @@
+2014-04-28  Simon Fraser  <simon.fraser@apple.com>
+
+        Fix the iOS buld.
+
+        * UIProcess/WebPageProxy.cpp:
+        (WebKit::areAllTouchPointsReleased):
+
 2014-04-24  Simon Fraser  <simon.fraser@apple.com>
 
         [iOS WK2] Make subview rebuilding more incremental
index 2e21666..4a26976 100644 (file)
@@ -1493,18 +1493,15 @@ bool WebPageProxy::shouldStartTrackingTouchEvents(const WebTouchEvent& touchStar
     return true;
 }
 
+#endif
+
+#if ENABLE(IOS_TOUCH_EVENTS)
+
 static bool areAllTouchPointsReleased(const WebTouchEvent& event)
 {
-    for (const auto& touchPoint : event.touchPoints()) {
-        if (touchPoint.state() != WebPlatformTouchPoint::TouchReleased && touchPoint.state() != WebPlatformTouchPoint::TouchCancelled)
-            return false;
-    }
-
-    return true;
+    return event.type() == WebEvent::TouchEnd || event.type() != WebEvent::TouchCancel;
 }
-#endif
 
-#if ENABLE(IOS_TOUCH_EVENTS)
 void WebPageProxy::handleTouchEventSynchronously(const NativeWebTouchEvent& event)
 {
     if (!isValid())
@@ -1542,7 +1539,19 @@ void WebPageProxy::handleTouchEventAsynchronously(const NativeWebTouchEvent& eve
     if (areAllTouchPointsReleased(event))
         m_isTrackingTouchEvents = false;
 }
+
 #elif ENABLE(TOUCH_EVENTS)
+
+static bool areAllTouchPointsReleased(const WebTouchEvent& event)
+{
+    for (const auto& touchPoint : event.touchPoints()) {
+        if (touchPoint.state() != WebPlatformTouchPoint::TouchReleased && touchPoint.state() != WebPlatformTouchPoint::TouchCancelled)
+            return false;
+    }
+
+    return true;
+}
+
 void WebPageProxy::handleTouchEvent(const NativeWebTouchEvent& event)
 {
     if (!isValid())