<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Extend event stream to include interpolated events and add a force press test that uses that interpolation"
   href="https://bugs.webkit.org/show_bug.cgi?id=163161">bug 163161</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Attachment #291127 Flags</td>
           <td>review?
           </td>
           <td>review-
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Extend event stream to include interpolated events and add a force press test that uses that interpolation"
   href="https://bugs.webkit.org/show_bug.cgi?id=163161#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Extend event stream to include interpolated events and add a force press test that uses that interpolation"
   href="https://bugs.webkit.org/show_bug.cgi?id=163161">bug 163161</a>
              from <span class="vcard"><a class="email" href="mailto:simon.fraser&#64;apple.com" title="Simon Fraser (smfr) &lt;simon.fraser&#64;apple.com&gt;"> <span class="fn">Simon Fraser (smfr)</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=291127&amp;action=diff" name="attach_291127" title="Patch">attachment 291127</a> <a href="attachment.cgi?id=291127&amp;action=edit" title="Patch">[details]</a></span>
Patch

View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=291127&amp;action=review">https://bugs.webkit.org/attachment.cgi?id=291127&amp;action=review</a>

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:307
&gt; +        if (phase != UITouchPhaseCancelled &amp;&amp; phase != UITouchPhaseBegan &amp;&amp; phase != UITouchPhaseEnded
&gt; +            &amp;&amp; phase != UITouchPhaseStationary)</span >

No need to wrap this.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:977
&gt; +    
&gt; +    </span >

Remove one of the blank lines.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:988
&gt; +        NSMutableDictionary *newEvent = [endEvent mutableCopy];</span >

We're not using ARC, so this is leaked.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:997
&gt; +        while ((startTouch = [startEnumerator nextObject]) &amp;&amp; (endTouch = [endEnumerator nextObject])) {</span >

This assumes that the touches are listed in &quot;id&quot; order. Maybe you should just bail if the start and end events have touches with non-matching ids? At the very least, you need to find matching touches by id.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:999
&gt; +            NSMutableDictionary *newTouch = [[endTouch mutableCopy] autorelease];</span >

Perferable to just explicitly -release after the [newTouches addObject:newTouch] below.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1002
&gt; +                newTouch[HIDEventXKey] = [NSNumber numberWithDouble:interpolations[interpolationType]([startTouch[HIDEventXKey] doubleValue], [endTouch[HIDEventXKey] doubleValue], t)];</span >

I think you can use &#64;() here.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1005
&gt; +                newTouch[HIDEventYKey] = [NSNumber numberWithDouble:interpolations[interpolationType]([startTouch[HIDEventYKey] doubleValue], [endTouch[HIDEventYKey] doubleValue], t)];</span >

Ditto.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1008
&gt; +                newTouch[HIDEventPressureKey] = [NSNumber numberWithDouble:interpolations[interpolationType]([startTouch[HIDEventPressureKey] doubleValue], [endTouch[HIDEventPressureKey] doubleValue], t)];</span >

Ditto.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:1029
&gt; +        if (interpolate) {
&gt; +            NSArray *newEvents = [self interpolatedEvents:eventInfo];
&gt; +            [self processEventsArray:newEvents withStartTime:startTime];
&gt; +        } else {</span >

I don't like here how you generate the interpolated events in the middle of dispatching. I think you should do a first pass over -events and make a new events array with the interpolated events, and then dispatch.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>