<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><span class="vcard"><a class="email" href="mailto:thorton@apple.com" title="Tim Horton <thorton@apple.com>"> <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@apple.com" title="Tim Horton <thorton@apple.com>"> <span class="fn">Tim Horton</span></a>
</span></b>
<pre>Comment on <span class=""><a href="attachment.cgi?id=261439&action=diff" name="attach_261439" title="Patch">attachment 261439</a> <a href="attachment.cgi?id=261439&action=edit" title="Patch">[details]</a></span>
Patch
View in context: <a href="https://bugs.webkit.org/attachment.cgi?id=261439&action=review">https://bugs.webkit.org/attachment.cgi?id=261439&action=review</a>
<span class="quote">>> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h:162
>> + double _lastPreviewStartTime;
>
> 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 "std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now() - _lastPreviewStartTime)" and compare to the literal 250_ms
<span class="quote">>> Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm:3386
>> +static const double gMaximumAccidentalPreviewTime = 250;
>
> 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>