<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[206651] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/206651">206651</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2016-09-30 12:19:44 -0700 (Fri, 30 Sep 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
https://bugs.webkit.org/show_bug.cgi?id=162787
<rdar://problem/28554292>
Reviewed by Benjamin Poulain.
Source/WebKit2:
Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint.
* Platform/spi/ios/UIKitSPI.h:
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::setRadiusX):
(WebKit::WebPlatformTouchPoint::radiusX):
(WebKit::WebPlatformTouchPoint::setRadiusY):
(WebKit::WebPlatformTouchPoint::radiusY):
(WebKit::WebPlatformTouchPoint::setRotationAngle):
(WebKit::WebPlatformTouchPoint::rotationAngle):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::extractWebTouchPoint):
* Shared/ios/WebPlatformTouchPointIOS.cpp:
(WebKit::WebPlatformTouchPoint::encode):
(WebKit::WebPlatformTouchPoint::decode):
LayoutTests:
Extend Touch constructor test coverage to cover radiusX / radiusY / rotationAngle
attributes.
* fast/events/touch/touch-constructor.html:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasteventstouchtouchconstructorhtml">trunk/LayoutTests/fast/events/touch/touch-constructor.html</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2PlatformspiiosUIKitSPIh">trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventh">trunk/Source/WebKit2/Shared/WebEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventConversioncpp">trunk/Source/WebKit2/Shared/WebEventConversion.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharediosNativeWebTouchEventIOSmm">trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2SharediosWebPlatformTouchPointIOScpp">trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/LayoutTests/ChangeLog        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-09-30 Chris Dumez <cdumez@apple.com>
+
+ [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
+ https://bugs.webkit.org/show_bug.cgi?id=162787
+ <rdar://problem/28554292>
+
+ Reviewed by Benjamin Poulain.
+
+ Extend Touch constructor test coverage to cover radiusX / radiusY / rotationAngle
+ attributes.
+
+ * fast/events/touch/touch-constructor.html:
+
</ins><span class="cx"> 2016-09-30 Saam Barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> Arrow functions should not allow duplicate parameter names
</span></span></pre></div>
<a id="trunkLayoutTestsfasteventstouchtouchconstructorhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/events/touch/touch-constructor.html (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/events/touch/touch-constructor.html        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/LayoutTests/fast/events/touch/touch-constructor.html        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -25,14 +25,6 @@
</span><span class="cx"> shouldBe("createdTouch.screenX", "init.screenX");
</span><span class="cx"> else
</span><span class="cx"> shouldBe("createdTouch.screenX", "0");
</span><del>- if (init.hasOwnProperty("screenX"))
- shouldBe("createdTouch.screenX", "init.screenX");
- else
- shouldBe("createdTouch.screenX", "0");
- if (init.hasOwnProperty("screenX"))
- shouldBe("createdTouch.screenX", "init.screenX");
- else
- shouldBe("createdTouch.screenX", "0");
</del><span class="cx"> if (init.hasOwnProperty("screenY"))
</span><span class="cx"> shouldBe("createdTouch.screenY", "init.screenY");
</span><span class="cx"> else
</span><span class="lines">@@ -53,6 +45,18 @@
</span><span class="cx"> shouldBe("createdTouch.clientY", "init.clientY");
</span><span class="cx"> else
</span><span class="cx"> shouldBe("createdTouch.clientY", "0");
</span><ins>+ if (init.hasOwnProperty("radiusX"))
+ shouldBe("createdTouch.radiusX", "init.radiusX");
+ else
+ shouldBe("createdTouch.radiusX", "0");
+ if (init.hasOwnProperty("radiusY"))
+ shouldBe("createdTouch.radiusY", "init.radiusY");
+ else
+ shouldBe("createdTouch.radiusY", "0");
+ if (init.hasOwnProperty("rotationAngle"))
+ shouldBe("createdTouch.rotationAngle", "init.rotationAngle");
+ else
+ shouldBe("createdTouch.rotationAngle", "0");
</ins><span class="cx"> if (init.hasOwnProperty("force"))
</span><span class="cx"> shouldBe("createdTouch.force", "init.force");
</span><span class="cx"> else
</span><span class="lines">@@ -64,12 +68,12 @@
</span><span class="cx"> validateTouch(touch, { identifier: 1, target: document.body });
</span><span class="cx">
</span><span class="cx"> debug("");
</span><del>-shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1, clientY: 2, screenX: 3, screenY: 4, pageX: 5, pageY: 6, force: 7 })");
-validateTouch(touch, { identifier: 1, target: document.body, clientX: 1, clientY: 2, screenX: 3, screenY: 4, pageX: 5, pageY: 6, force: 7 });
</del><ins>+shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1, clientY: 2, screenX: 3, screenY: 4, pageX: 5, pageY: 6, force: 7, radiusX: 8, radiusY: 9, rotationAngle: 10 })");
+validateTouch(touch, { identifier: 1, target: document.body, clientX: 1, clientY: 2, screenX: 3, screenY: 4, pageX: 5, pageY: 6, force: 7, radiusX: 8, radiusY: 9, rotationAngle: 10 });
</ins><span class="cx">
</span><span class="cx"> debug("");
</span><del>-shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, clientX: 8.5, clientY: 9.5 })");
-validateTouch(touch, { identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, clientX: 8.5, clientY: 9.5 });
</del><ins>+shouldNotThrow("touch = new Touch({ identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, radiusX: 8.5, radiusY: 9.5, rotationAngle: 10.5 })");
+validateTouch(touch, { identifier: 1, target: document.body, clientX: 1.5, clientY: 2.5, screenX: 3.5, screenY: 4.5, pageX: 5.5, pageY: 6.5, force: 7.5, radiusX: 8.5, radiusY: 9.5, rotationAngle: 10.5 });
</ins><span class="cx"> </script>
</span><span class="cx"> <script src="../../../resources/js-test-post.js"></script>
</span><span class="cx"> </body>
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/ChangeLog        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2016-09-30 Chris Dumez <cdumez@apple.com>
+
+ [WK2][iOS] Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint
+ https://bugs.webkit.org/show_bug.cgi?id=162787
+ <rdar://problem/28554292>
+
+ Reviewed by Benjamin Poulain.
+
+ Add radiusX / radiusY / rotationAngle to WebPlatformTouchPoint.
+
+ * Platform/spi/ios/UIKitSPI.h:
+ * Shared/WebEvent.h:
+ (WebKit::WebPlatformTouchPoint::setRadiusX):
+ (WebKit::WebPlatformTouchPoint::radiusX):
+ (WebKit::WebPlatformTouchPoint::setRadiusY):
+ (WebKit::WebPlatformTouchPoint::radiusY):
+ (WebKit::WebPlatformTouchPoint::setRotationAngle):
+ (WebKit::WebPlatformTouchPoint::rotationAngle):
+ * Shared/WebEventConversion.cpp:
+ (WebKit::WebKit2PlatformTouchPoint::WebKit2PlatformTouchPoint):
+ * Shared/ios/NativeWebTouchEventIOS.mm:
+ (WebKit::NativeWebTouchEvent::extractWebTouchPoint):
+ * Shared/ios/WebPlatformTouchPointIOS.cpp:
+ (WebKit::WebPlatformTouchPoint::encode):
+ (WebKit::WebPlatformTouchPoint::decode):
+
</ins><span class="cx"> 2016-09-30 Megan Gardner <megan_gardner@apple.com>
</span><span class="cx">
</span><span class="cx"> Make it possible to test web-related user-interface features
</span></span></pre></div>
<a id="trunkSourceWebKit2PlatformspiiosUIKitSPIh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -654,6 +654,8 @@
</span><span class="cx"> unsigned identifier;
</span><span class="cx"> UITouchPhase phase;
</span><span class="cx"> #if __IPHONE_OS_VERSION_MIN_REQUIRED > 100000
</span><ins>+ // FIXME: Uncomment this once UIKit is updated (rdar://problem/28555313).
+ // CGFloat majorRadiusInScreenCoordinates;
</ins><span class="cx"> CGFloat force;
</span><span class="cx"> CGFloat altitudeAngle;
</span><span class="cx"> CGFloat azimuthAngle;
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEvent.h (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEvent.h        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/Shared/WebEvent.h        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -325,6 +325,12 @@
</span><span class="cx"> TouchPointState state() const { return phase(); }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+ void setRadiusX(double radiusX) { m_radiusX = radiusX; }
+ double radiusX() const { return m_radiusX; }
+ void setRadiusY(double radiusY) { m_radiusY = radiusY; }
+ double radiusY() const { return m_radiusY; }
+ void setRotationAngle(double rotationAngle) { m_rotationAngle = rotationAngle; }
+ double rotationAngle() const { return m_rotationAngle; }
</ins><span class="cx"> void setForce(double force) { m_force = force; }
</span><span class="cx"> double force() const { return m_force; }
</span><span class="cx"> void setAltitudeAngle(double altitudeAngle) { m_altitudeAngle = altitudeAngle; }
</span><span class="lines">@@ -343,6 +349,9 @@
</span><span class="cx"> WebCore::IntPoint m_location;
</span><span class="cx"> uint32_t m_phase;
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+ double m_radiusX { 0 };
+ double m_radiusY { 0 };
+ double m_rotationAngle { 0 };
</ins><span class="cx"> double m_force { 0 };
</span><span class="cx"> double m_altitudeAngle { 0 };
</span><span class="cx"> double m_azimuthAngle { 0 };
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventConversioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEventConversion.cpp (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEventConversion.cpp        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/Shared/WebEventConversion.cpp        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -243,7 +243,7 @@
</span><span class="cx"> WebKit2PlatformTouchPoint(const WebPlatformTouchPoint& webTouchPoint)
</span><span class="cx"> : PlatformTouchPoint(webTouchPoint.identifier(), webTouchPoint.location(), touchEventType(webTouchPoint)
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><del>- , webTouchPoint.force(), webTouchPoint.altitudeAngle(), webTouchPoint.azimuthAngle(), webPlatformTouchTypeToPlatform(webTouchPoint.touchType())
</del><ins>+ , webTouchPoint.radiusX(), webTouchPoint.radiusY(), webTouchPoint.rotationAngle(), webTouchPoint.force(), webTouchPoint.altitudeAngle(), webTouchPoint.azimuthAngle(), webPlatformTouchTypeToPlatform(webTouchPoint.touchType())
</ins><span class="cx"> #endif
</span><span class="cx"> )
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2SharediosNativeWebTouchEventIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/Shared/ios/NativeWebTouchEventIOS.mm        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -103,6 +103,10 @@
</span><span class="cx"> WebPlatformTouchPoint::TouchPointState phase = convertTouchPhase(touchPoint.phase);
</span><span class="cx"> WebPlatformTouchPoint platformTouchPoint = WebPlatformTouchPoint(identifier, location, phase);
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+ // FIXME: We should use touchPoint.majorRadiusInScreenCoordinates for radiusX / radiusY once it is available (rdar://problem/28555313).
+ platformTouchPoint.setRadiusX(0);
+ platformTouchPoint.setRadiusY(0);
+ platformTouchPoint.setRotationAngle(0); // Not available in _UIWebTouchEvent yet.
</ins><span class="cx"> platformTouchPoint.setForce(touchPoint.force);
</span><span class="cx"> #if defined UI_WEB_TOUCH_EVENT_HAS_STYLUS_DATA && UI_WEB_TOUCH_EVENT_HAS_STYLUS_DATA
</span><span class="cx"> platformTouchPoint.setAltitudeAngle(touchPoint.altitudeAngle);
</span></span></pre></div>
<a id="trunkSourceWebKit2SharediosWebPlatformTouchPointIOScpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp (206650 => 206651)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp        2016-09-30 18:50:49 UTC (rev 206650)
+++ trunk/Source/WebKit2/Shared/ios/WebPlatformTouchPointIOS.cpp        2016-09-30 19:19:44 UTC (rev 206651)
</span><span class="lines">@@ -40,6 +40,9 @@
</span><span class="cx"> encoder << m_location;
</span><span class="cx"> encoder << m_phase;
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+ encoder << m_radiusX;
+ encoder << m_radiusY;
+ encoder << m_rotationAngle;
</ins><span class="cx"> encoder << m_force;
</span><span class="cx"> encoder << m_altitudeAngle;
</span><span class="cx"> encoder << m_azimuthAngle;
</span><span class="lines">@@ -56,6 +59,12 @@
</span><span class="cx"> if (!decoder.decode(result.m_phase))
</span><span class="cx"> return false;
</span><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><ins>+ if (!decoder.decode(result.m_radiusX))
+ return false;
+ if (!decoder.decode(result.m_radiusY))
+ return false;
+ if (!decoder.decode(result.m_rotationAngle))
+ return false;
</ins><span class="cx"> if (!decoder.decode(result.m_force))
</span><span class="cx"> return false;
</span><span class="cx"> if (!decoder.decode(result.m_altitudeAngle))
</span></span></pre>
</div>
</div>
</body>
</html>