Title: [186148] trunk/Source/WebKit2
Revision
186148
Author
[email protected]
Date
2015-06-30 17:08:12 -0700 (Tue, 30 Jun 2015)

Log Message

<rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category

Reviewed by Benjamin Poulain.

* Platform/spi/ios/UIKitSPI.h:
* Shared/WebEvent.h:
(WebKit::WebTouchEvent::WebTouchEvent):
(WebKit::WebTouchEvent::position):
(WebKit::WebTouchEvent::isPotentialTap):
(WebKit::WebTouchEvent::isGesture):
(WebKit::WebTouchEvent::gestureScale):
(WebKit::WebTouchEvent::gestureRotation):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* Shared/ios/WebTouchEventIOS.cpp:
(WebKit::WebTouchEvent::encode):
(WebKit::WebTouchEvent::decode):
Pipe isPotentialTap through.

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (186147 => 186148)


--- trunk/Source/WebKit2/ChangeLog	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/ChangeLog	2015-07-01 00:08:12 UTC (rev 186148)
@@ -1,3 +1,26 @@
+2015-06-30  Enrica Casucci  <[email protected]>
+
+        <rdar://problem/20655729> WebKit should heuristically exclude scrolling touch events from the user gesture category
+
+        Reviewed by Benjamin Poulain.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * Shared/WebEvent.h:
+        (WebKit::WebTouchEvent::WebTouchEvent):
+        (WebKit::WebTouchEvent::position):
+        (WebKit::WebTouchEvent::isPotentialTap):
+        (WebKit::WebTouchEvent::isGesture):
+        (WebKit::WebTouchEvent::gestureScale):
+        (WebKit::WebTouchEvent::gestureRotation):
+        * Shared/WebEventConversion.cpp:
+        (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
+        * Shared/ios/NativeWebTouchEventIOS.mm:
+        (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
+        * Shared/ios/WebTouchEventIOS.cpp:
+        (WebKit::WebTouchEvent::encode):
+        (WebKit::WebTouchEvent::decode):
+        Pipe isPotentialTap through.
+
 2015-06-30  Carlos Alberto Lopez Perez  <[email protected]>
 
         [GTK] [EFL] Unreviewed build fix after r186118.

Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (186147 => 186148)


--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h	2015-07-01 00:08:12 UTC (rev 186148)
@@ -586,6 +586,10 @@
 
     struct _UIWebTouchPoint* touchPoints;
     unsigned touchPointCount;
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+    bool isPotentialTap;
+#endif
 };
 
 @protocol UIWebTouchEventsGestureRecognizerDelegate

Modified: trunk/Source/WebKit2/Shared/WebEvent.h (186147 => 186148)


--- trunk/Source/WebKit2/Shared/WebEvent.h	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/Shared/WebEvent.h	2015-07-01 00:08:12 UTC (rev 186148)
@@ -325,11 +325,12 @@
 class WebTouchEvent : public WebEvent {
 public:
     WebTouchEvent() { }
-    WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isGesture, float gestureScale, float gestureRotation)
+    WebTouchEvent(WebEvent::Type type, Modifiers modifiers, double timestamp, const Vector<WebPlatformTouchPoint>& touchPoints, WebCore::IntPoint position, bool isPotentialTap, bool isGesture, float gestureScale, float gestureRotation)
         : WebEvent(type, modifiers, timestamp)
         , m_touchPoints(touchPoints)
         , m_position(position)
         , m_canPreventNativeGestures(true)
+        , m_isPotentialTap(isPotentialTap)
         , m_isGesture(isGesture)
         , m_gestureScale(gestureScale)
         , m_gestureRotation(gestureRotation)
@@ -341,6 +342,8 @@
 
     WebCore::IntPoint position() const { return m_position; }
 
+    bool isPotentialTap() const { return m_isPotentialTap; }
+
     bool isGesture() const { return m_isGesture; }
     float gestureScale() const { return m_gestureScale; }
     float gestureRotation() const { return m_gestureRotation; }
@@ -358,6 +361,7 @@
     
     WebCore::IntPoint m_position;
     bool m_canPreventNativeGestures;
+    bool m_isPotentialTap;
     bool m_isGesture;
     float m_gestureScale;
     float m_gestureRotation;

Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (186147 => 186148)


--- trunk/Source/WebKit2/Shared/WebEventConversion.cpp	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp	2015-07-01 00:08:12 UTC (rev 186148)
@@ -332,6 +332,7 @@
         m_gestureRotation = webEvent.gestureRotation();
         m_canPreventNativeGestures = webEvent.canPreventNativeGestures();
         m_isGesture = webEvent.isGesture();
+        m_isPotentialTap = webEvent.isPotentialTap();
         m_position = webEvent.position();
         m_globalPosition = webEvent.position();
 #else

Modified: trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm (186147 => 186148)


--- trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm	2015-07-01 00:08:12 UTC (rev 186148)
@@ -96,7 +96,20 @@
 #endif
 
 NativeWebTouchEvent::NativeWebTouchEvent(const _UIWebTouchEvent* event)
-    : WebTouchEvent(webEventTypeForUIWebTouchEventType(event->type), static_cast<Modifiers>(0), event->timestamp, extractWebTouchPoint(event), positionForCGPoint(event->locationInDocumentCoordinates), event->inJavaScriptGesture, event->scale, event->rotation)
+    : WebTouchEvent(
+        webEventTypeForUIWebTouchEventType(event->type),
+        static_cast<Modifiers>(0),
+        event->timestamp,
+        extractWebTouchPoint(event),
+        positionForCGPoint(event->locationInDocumentCoordinates),
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+        event->isPotentialTap,
+#else
+        true,
+#endif
+        event->inJavaScriptGesture,
+        event->scale,
+        event->rotation)
 {
 }
 

Modified: trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp (186147 => 186148)


--- trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp	2015-06-30 23:33:44 UTC (rev 186147)
+++ trunk/Source/WebKit2/Shared/ios/WebTouchEventIOS.cpp	2015-07-01 00:08:12 UTC (rev 186148)
@@ -41,6 +41,7 @@
     encoder << m_touchPoints;
     encoder << m_position;
     encoder << m_canPreventNativeGestures;
+    encoder << m_isPotentialTap;
     encoder << m_isGesture;
     encoder << m_gestureScale;
     encoder << m_gestureRotation;
@@ -57,6 +58,8 @@
         return false;
     if (!decoder.decode(result.m_canPreventNativeGestures))
         return false;
+    if (!decoder.decode(result.m_isPotentialTap))
+        return false;
     if (!decoder.decode(result.m_isGesture))
         return false;
     if (!decoder.decode(result.m_gestureScale))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to