[iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadi...
authorcdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2016 17:48:28 +0000 (17:48 +0000)
committercdumez@apple.com <cdumez@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 17 Oct 2016 17:48:28 +0000 (17:48 +0000)
https://bugs.webkit.org/show_bug.cgi?id=163547

Reviewed by Darin Adler.

Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
now that it is available in UIKit.

* Platform/spi/ios/UIKitSPI.h:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):

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

Source/WebKit2/ChangeLog
Source/WebKit2/Platform/spi/ios/UIKitSPI.h
Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm

index f03e9a2..46ace46 100644 (file)
@@ -1,3 +1,17 @@
+2016-10-17  Chris Dumez  <cdumez@apple.com>
+
+        [iOS] Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
+        https://bugs.webkit.org/show_bug.cgi?id=163547
+
+        Reviewed by Darin Adler.
+
+        Hook up WebPlatformTouchPoint's radiusX / radiusY to _UIWebTouchPoint.majorRadiusInScreenCoordinates
+        now that it is available in UIKit.
+
+        * Platform/spi/ios/UIKitSPI.h:
+        * Shared/ios/NativeWebTouchEventIOS.mm:
+        (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
+
 2016-10-17  Konstantin Tokarev  <annulen@yandex.ru>
 
         Eleminate code duplication between ResourceRequest encoding/decoding implementations
index 4a96601..53b2740 100644 (file)
@@ -654,8 +654,7 @@ struct _UIWebTouchPoint {
     unsigned identifier;
     UITouchPhase phase;
 #if __IPHONE_OS_VERSION_MIN_REQUIRED > 100000
-    // FIXME: Uncomment this once UIKit is updated (rdar://problem/28555313).
-    // CGFloat majorRadiusInScreenCoordinates;
+    CGFloat majorRadiusInScreenCoordinates;
     CGFloat force;
     CGFloat altitudeAngle;
     CGFloat azimuthAngle;
index 19dc104..68e0e6c 100644 (file)
@@ -103,9 +103,8 @@ Vector<WebPlatformTouchPoint> NativeWebTouchEvent::extractWebTouchPoint(const _U
         WebPlatformTouchPoint::TouchPointState phase = convertTouchPhase(touchPoint.phase);
         WebPlatformTouchPoint platformTouchPoint = WebPlatformTouchPoint(identifier, location, phase);
 #if ENABLE(IOS_TOUCH_EVENTS)
-        // FIXME: We should use touchPoint.majorRadiusInScreenCoordinates for radiusX / radiusY once it is available (rdar://problem/28555313).
-        platformTouchPoint.setRadiusX(0);
-        platformTouchPoint.setRadiusY(0);
+        platformTouchPoint.setRadiusX(touchPoint.majorRadiusInScreenCoordinates);
+        platformTouchPoint.setRadiusY(touchPoint.majorRadiusInScreenCoordinates);
         platformTouchPoint.setRotationAngle(0); // Not available in _UIWebTouchEvent yet.
         platformTouchPoint.setForce(touchPoint.force);
 #if defined UI_WEB_TOUCH_EVENT_HAS_STYLUS_DATA && UI_WEB_TOUCH_EVENT_HAS_STYLUS_DATA