[Webkit-unassigned] [Bug 163161] Extend event stream to include interpolated events and add a force press test that uses that interpolation
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Oct 10 18:18:57 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=163161
Simon Fraser (smfr) <simon.fraser at apple.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #291198|review? |review+, commit-queue-
Flags| |
--- Comment #11 from Simon Fraser (smfr) <simon.fraser at apple.com> ---
Comment on attachment 291198
--> https://bugs.webkit.org/attachment.cgi?id=291198
Patch
View in context: https://bugs.webkit.org/attachment.cgi?id=291198&action=review
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:987
> + double t = (time - startTime) / (endTime - startTime);
I would call 't' something like 'progress'. 't' makes me think it's a time.
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:997
> + endTouch = [endEnumerator nextObject];
Declare endTouch here.
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:998
> + while (endTouch && ([endTouch[HIDEventTouchIDKey] integerValue] != [startTouch[HIDEventTouchIDKey] integerValue]))
Pull [startTouch[HIDEventTouchIDKey] integerValue] into a local variable.
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:999
> + endTouch = [endEnumerator nextObject];
Indent this line.
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1011
> + if (newTouch[HIDEventXKey] != startTouch[HIDEventXKey])
> + newTouch[HIDEventXKey] = @(interpolations[interpolationType]([startTouch[HIDEventXKey] doubleValue], [endTouch[HIDEventXKey] doubleValue], t));
> +
> + if (newTouch[HIDEventYKey] != startTouch[HIDEventYKey])
> + newTouch[HIDEventYKey] = @(interpolations[interpolationType]([startTouch[HIDEventYKey] doubleValue], [endTouch[HIDEventYKey] doubleValue], t));
> +
> + if (newTouch[HIDEventPressureKey] != startTouch[HIDEventPressureKey])
> + newTouch[HIDEventPressureKey] = @(interpolations[interpolationType]([startTouch[HIDEventPressureKey] doubleValue], [endTouch[HIDEventPressureKey] doubleValue], t));
Indentation is off in each if block.
> Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1028
> +- (NSArray *)expandEvents:(NSArray *)events withStartTime:(CFAbsoluteTime)startTime
Blank line above please.
> LayoutTests/fast/events/touch/ios/iphone7/force-press-event.html:76
> + output += 'PASS: Generated increasing force<br>';
remove the <br>
> LayoutTests/fast/events/touch/ios/iphone7/force-press-event.html:78
> + output += result;
result is just "Done": I don't think that adds any useful information.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161011/363b6838/attachment-0001.html>
More information about the webkit-unassigned
mailing list