Title: [192115] branches/safari-601.1.46-branch/Source/WebKit2

Diff

Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (192114 => 192115)


--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-11-06 19:57:10 UTC (rev 192114)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog	2015-11-06 19:58:31 UTC (rev 192115)
@@ -1,3 +1,25 @@
+2015-11-06  Babak Shafiei  <[email protected]>
+
+        Merge r189753.
+
+    2015-09-14  Dan Bernstein  <[email protected]>
+
+            Consolidate touch event code dealing with force.
+
+            Reviewed by Beth Dakin.
+
+            * Shared/WebEvent.h:
+            (WebKit::WebPlatformTouchPoint::state):
+            (WebKit::WebPlatformTouchPoint::setForce):
+            (WebKit::WebPlatformTouchPoint::force):
+            * Shared/ios/NativeWebTouchEventIOS.mm:
+            (WebKit::positionForCGPoint):
+            (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
+            (WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
+            * Shared/ios/WebPlatformTouchPointIOS.cpp:
+            (WebKit::WebPlatformTouchPoint::encode):
+            (WebKit::WebPlatformTouchPoint::decode):
+
 2015-10-23  Matthew Hanson  <[email protected]>
 
         Merge r191487. rdar://problem/22811325

Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebEvent.h (192114 => 192115)


--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebEvent.h	2015-11-06 19:57:10 UTC (rev 192114)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/WebEvent.h	2015-11-06 19:58:31 UTC (rev 192115)
@@ -310,7 +310,8 @@
     TouchPointState state() const { return phase(); }
 
 #if ENABLE(IOS_TOUCH_EVENTS)
-#include <WebKitAdditions/WebEventIOS.h>
+    void setForce(double force) { m_force = force; }
+    double force() const { return m_force; }
 #endif
 
     void encode(IPC::ArgumentEncoder&) const;
@@ -320,6 +321,9 @@
     unsigned m_identifier;
     WebCore::IntPoint m_location;
     uint32_t m_phase;
+#if ENABLE(IOS_TOUCH_EVENTS)
+    double m_force { 0 };
+#endif
 };
 
 class WebTouchEvent : public WebEvent {

Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm (192114 => 192115)


--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm	2015-11-06 19:57:10 UTC (rev 192114)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm	2015-11-06 19:58:31 UTC (rev 192115)
@@ -75,9 +75,6 @@
     return WebCore::IntPoint(position);
 }
 
-#if ENABLE(IOS_TOUCH_EVENTS)
-#import <WebKitAdditions/NativeWebTouchEventIOS.mm>
-#else
 Vector<WebPlatformTouchPoint> NativeWebTouchEvent::extractWebTouchPoint(const _UIWebTouchEvent* event)
 {
     unsigned touchCount = event->touchPointCount;
@@ -89,11 +86,14 @@
         unsigned identifier = touchPoint.identifier;
         WebCore::IntPoint location = positionForCGPoint(touchPoint.locationInDocumentCoordinates);
         WebPlatformTouchPoint::TouchPointState phase = convertTouchPhase(touchPoint.phase);
-        touchPointList.uncheckedAppend(WebPlatformTouchPoint(identifier, location, phase));
+        WebPlatformTouchPoint platformTouchPoint = WebPlatformTouchPoint(identifier, location, phase);
+#if ENABLE(IOS_TOUCH_EVENTS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+        platformTouchPoint.setForce(touchPoint.force);
+#endif
+        touchPointList.uncheckedAppend(platformTouchPoint);
     }
     return touchPointList;
 }
-#endif
 
 NativeWebTouchEvent::NativeWebTouchEvent(const _UIWebTouchEvent* event)
     : WebTouchEvent(

Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp (192114 => 192115)


--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp	2015-11-06 19:57:10 UTC (rev 192114)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp	2015-11-06 19:58:31 UTC (rev 192115)
@@ -35,14 +35,14 @@
 
 namespace WebKit {
 
-#if ENABLE(IOS_TOUCH_EVENTS)
-#import <WebKitAdditions/WebPlatformTouchPointIOS.cpp>
-#else
 void WebPlatformTouchPoint::encode(IPC::ArgumentEncoder& encoder) const
 {
     encoder << m_identifier;
     encoder << m_location;
     encoder << m_phase;
+#if ENABLE(IOS_TOUCH_EVENTS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+    encoder << m_force;
+#endif
 }
 
 bool WebPlatformTouchPoint::decode(IPC::ArgumentDecoder& decoder, WebPlatformTouchPoint& result)
@@ -53,9 +53,12 @@
         return false;
     if (!decoder.decode(result.m_phase))
         return false;
+#if ENABLE(IOS_TOUCH_EVENTS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+    if (!decoder.decode(result.m_force))
+        return false;
+#endif
     return true;
 }
-#endif // ENABLE(IOS_TOUCH_EVENTS)
 
 } // namespace WebKit
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to