<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><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> changed
              <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Heavy taps on links are sometimes interpreted as the preview gesture"
   href="https://bugs.webkit.org/show_bug.cgi?id=149304">bug 149304</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 #261439 Flags</td>
           <td>review?
           </td>
           <td>review+
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Heavy taps on links are sometimes interpreted as the preview gesture"
   href="https://bugs.webkit.org/show_bug.cgi?id=149304#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Heavy taps on links are sometimes interpreted as the preview gesture"
   href="https://bugs.webkit.org/show_bug.cgi?id=149304">bug 149304</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=261439&amp;action=diff" name="attach_261439" title="Patch">attachment 261439</a> <a href="attachment.cgi?id=261439&amp;action=edit" title="Patch">[details]</a></span>
Patch

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

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h:162
&gt;&gt; +    double _lastPreviewStartTime;
&gt; 
&gt; Is there a way to use std::chrono types for this instead of a mix of doubles and floats?</span >

Chrono would be good (at the very least, using double everywhere). You can store the time from std::chrono::steady_clock::now() and do something like &quot;std::chrono::duration_cast&lt;std::chrono::milliseconds&gt;(
            std::chrono::steady_clock::now() - _lastPreviewStartTime)&quot; and compare to the literal 250_ms

<span class="quote">&gt;&gt; Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3386
&gt;&gt; +static const double gMaximumAccidentalPreviewTime = 250;
&gt; 
&gt; Probably no need for a named constant for this quantity if it’s only being used once. Definitely no need to use the “g” prefix.</span >

Agreed about the g. Don't care if you keep the named constant, but it should at least be inside the function, I guess?</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>