<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add long press selection test"
   href="https://bugs.webkit.org/show_bug.cgi?id=162367#c2">Comment # 2</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Add long press selection test"
   href="https://bugs.webkit.org/show_bug.cgi?id=162367">bug 162367</a>
              from <span class="vcard"><a class="email" href="mailto:thorton&#64;apple.com" title="Tim Horton &lt;thorton&#64;apple.com&gt;"> <span class="fn">Tim Horton</span></a>
</span></b>
        <pre>Comment on <span class=""><a href="attachment.cgi?id=289495&amp;action=diff" name="attach_289495" title="Patch">attachment 289495</a> <a href="attachment.cgi?id=289495&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt; Tools/ChangeLog:31
&gt; +        * DumpRenderTree/ios/UIScriptControllerIOS.mm:
&gt; +        (WTR::UIScriptController::longPressAtPoint):
&gt; +        (WTR::UIScriptController::forcePressAtPoint):
&gt; +        (WTR::UIScriptController::dragFromPointToPoint): Deleted.
&gt; +        * Scripts/webkitpy/common/config/contributors.json:
&gt; +        * TestRunnerShared/UIScriptContext/Bindings/UIScriptController.idl:
&gt; +        * TestRunnerShared/UIScriptContext/UIScriptController.cpp:
&gt; +        (WTR::UIScriptController::longPressAtPoint):
&gt; +        (WTR::UIScriptController::forcePressAtPoint):
&gt; +        (WTR::UIScriptController::dragFromPointToPoint): Deleted.
&gt; +        * TestRunnerShared/UIScriptContext/UIScriptController.h:
&gt; +        * WebKitTestRunner/ios/HIDEventGenerator.h:
&gt; +        * WebKitTestRunner/ios/HIDEventGenerator.mm:
&gt; +        (-[HIDEventGenerator _createIOHIDEventType:]):
&gt; +        (-[HIDEventGenerator sendTaps:location:withNumberOfTouches:completionBlock:]):
&gt; +        (-[HIDEventGenerator clearTap:]):
&gt; +        (-[HIDEventGenerator longPressTimerCall:]):
&gt; +        (-[HIDEventGenerator longPressFinish:completionBlock:]):
&gt; +        (-[HIDEventGenerator longPress:completionBlock:]):
&gt; +        (-[HIDEventGenerator forcePress:completionBlock:]):
&gt; +        * WebKitTestRunner/ios/UIScriptControllerIOS.mm:
&gt; +        (WTR::UIScriptController::longPressAtPoint):
&gt; +        (WTR::UIScriptController::forcePressAtPoint):
&gt; +        (WTR::UIScriptController::dragFromPointToPoint): Deleted.</span >

This region is for explaining why/what you did in each of these places, making it easier to review and making it possible for me to ask less questions below!

<span class="quote">&gt; Tools/Scripts/webkitpy/common/config/contributors.json:3500
&gt; +          &quot;Megan Gardner&quot; : {</span >

This should happen in a different patch.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:40
&gt; -static const NSTimeInterval fingerLiftDelay = 5e7;
&gt; -static const NSTimeInterval multiTapInterval = 15e7;
&gt; +static const long fingerLiftDelay = 5e7;
&gt; +static const long multiTapInterval = 15e7;</span >

Why?

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:548
&gt; +    [self longPressFinish:[[userInfo valueForKey:&#64;&quot;location&quot;] CGPointValue] completionBlock:[userInfo objectForKey:&#64;&quot;block&quot;]];</span >

I think we can userInfo[&#64;&quot;location&quot;] and such.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:549
&gt; +    [timer invalidate];</span >

No need to invalidate a non-repeating timer.

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:558
&gt; +    [self clearTap:CGPointMake(50, 50)];</span >

Why the random hardcoded 50, 50?

<span class="quote">&gt; Tools/WebKitTestRunner/ios/HIDEventGenerator.mm:569
&gt; +    NSTimer *timer = [[NSTimer timerWithTimeInterval:longPressHoldDelay target:self selector:&#64;selector(longPressTimerCall:) userInfo:info repeats:NO] retain];</span >

Probably better to use scheduledTimerWith... and not have to explicitly add it, no? Also, I think the runloop will retain it in that case, so you don't have to (and don't have to release it when it fires).

<span class="quote">&gt; LayoutTests/fast/events/touch/ios/long-press-to-select-text.html:33
&gt; +                                        var selection = document.getSelection().toString();</span >

Spaces, not tabs, please.</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>