Extend event stream to include interpolated events and add a force press test that...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 18:38:49 +0000 (18:38 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Oct 2016 18:38:49 +0000 (18:38 +0000)
commitf899d7957282dedfbf39d9854510ca483a0064e7
tree889f22be8f2781e3a445e0005ed0e032c72b5b60
parent0ff040d7d04bee7c25c97f63e1d482733732104c
Extend event stream to include interpolated events and add a force press test that uses that interpolation
https://bugs.webkit.org/show_bug.cgi?id=163161

Patch by Megan Gardner <megan_gardner@apple.com> on 2016-10-11
Reviewed by Simon Fraser.

Added functionality to the event stream to allow for interpolated events.
Can now do long press, as well as a better way to do drag and other time-based
events that require a large stream of descrete HID events.
Added a basic force touch test to demostrate this interpolation.
Also updated the script to allow for iPhone 7 specific tests, as force touch
needs to be on a device that had force touch.

* Scripts/webkitpy/port/ios.py:
(IOSSimulatorPort):
* TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
* WebKitTestRunner/ios/HIDEventGenerator.mm:
(linearInterpolation):
(simpleCurveInterpolation):
(calculateNextCurveLocation):
(phaseFromString):
(interpolationFromString):
(-[HIDEventGenerator eventMaskFromEventInfo:]):
(-[HIDEventGenerator _createIOHIDEventWithInfo:]):
(-[HIDEventGenerator moveToPoints:touchCount:duration:]):
(-[HIDEventGenerator interpolatedEvents:]):
(-[HIDEventGenerator processEventsArray:withStartTime:]):
(-[HIDEventGenerator eventDispatchThreadEntry:]):
(simpleDragCurve): Deleted.
(calculateNextLocation): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@207153 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/fast/events/touch/ios/iphone7/force-press-event-expected.txt [new file with mode: 0644]
LayoutTests/fast/events/touch/ios/iphone7/force-press-event.html [new file with mode: 0644]
Tools/ChangeLog
Tools/Scripts/webkitpy/port/ios.py
Tools/TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl
Tools/WebKitTestRunner/ios/HIDEventGenerator.mm