<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[196679] trunk/Source/WebKit2</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/196679">196679</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2016-02-16 19:27:05 -0800 (Tue, 16 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Allow double tap to zoom in fast-click pages
https://bugs.webkit.org/show_bug.cgi?id=154318
&lt;rdar://problem/24223767&gt;

Reviewed by Simon Fraser and Benjamin Poulain.

Most of the patch comes from Jon Lee.

Our fast-click algorithm exposed a number of cases where
people missed the double-tap-to-zoom behaviour. In particular,
when you double tap on a large body of text, typical in
blogs and articles.

This patch enhances the algorithm to have a parallel
double-tap gesture recognizer in the situations where
fast-click is enabled. This new gesture recongizer does
not cause the single tap to block for 350ms, so clicks
are still dispatched fast. If it fires, we already have
some information about whether we have a pending double
tap, based on the first tap.

* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary): Remove the optimization
that only told the content view to disable on pages that allowed double taps. We now allow
them even on fast click pages.

* UIProcess/ios/WKContentViewInteraction.h: Add the new UITapGestureRecognizer for double taps
in fast click pages. This is called nonBlockingDoubleTapGestureRecognizer because, unlike
the existing DoubleTapGestureRecognizer, this one does not force the singleTapRecognizer
to wait.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]): Set up the new UITapGestureRecognizer.
(-[WKContentView cleanupInteraction]): And remove it when we're done.
(-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
(-[WKContentView _addDefaultGestureRecognizers]):
(-[WKContentView _inspectorNodeSearchRecognized:]): Something happened, we are no longer in
a potential double tap situation.
(-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]): Remove the check
for potential tap in progress.
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _highlightLongPressRecognized:]): Again, something happened, so we are
no longer in a double tap situation.
(-[WKContentView _longPressRecognized:]): Ditto.
(-[WKContentView _singleTapRecognized:]): Ditto.
(-[WKContentView _doubleTapRecognized:]): Ditto.
(-[WKContentView _resetIsDoubleTapPending]):
(-[WKContentView _fastDoubleTapRecognized:]): We're now pending a double tap.
(-[WKContentView _twoFingerDoubleTapRecognized:]):
(-[WKContentView _didNotHandleTapAsClick:]): If we get here and we have a pending
double tap, then trigger a zoom operation.
(-[WKContentView _setDoubleTapGesturesEnabled:]):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosPageClientImplIOSmm">trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionh">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (196678 => 196679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-02-17 02:34:36 UTC (rev 196678)
+++ trunk/Source/WebKit2/ChangeLog        2016-02-17 03:27:05 UTC (rev 196679)
</span><span class="lines">@@ -1,3 +1,58 @@
</span><ins>+2016-02-16  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Allow double tap to zoom in fast-click pages
+        https://bugs.webkit.org/show_bug.cgi?id=154318
+        &lt;rdar://problem/24223767&gt;
+
+        Reviewed by Simon Fraser and Benjamin Poulain.
+        
+        Most of the patch comes from Jon Lee.
+
+        Our fast-click algorithm exposed a number of cases where
+        people missed the double-tap-to-zoom behaviour. In particular,
+        when you double tap on a large body of text, typical in
+        blogs and articles.
+
+        This patch enhances the algorithm to have a parallel
+        double-tap gesture recognizer in the situations where
+        fast-click is enabled. This new gesture recongizer does
+        not cause the single tap to block for 350ms, so clicks
+        are still dispatched fast. If it fires, we already have
+        some information about whether we have a pending double
+        tap, based on the first tap.
+
+        * UIProcess/ios/PageClientImplIOS.mm:
+        (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary): Remove the optimization
+        that only told the content view to disable on pages that allowed double taps. We now allow
+        them even on fast click pages.
+
+        * UIProcess/ios/WKContentViewInteraction.h: Add the new UITapGestureRecognizer for double taps
+        in fast click pages. This is called nonBlockingDoubleTapGestureRecognizer because, unlike
+        the existing DoubleTapGestureRecognizer, this one does not force the singleTapRecognizer
+        to wait.
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView setupInteraction]): Set up the new UITapGestureRecognizer.
+        (-[WKContentView cleanupInteraction]): And remove it when we're done.
+        (-[WKContentView _removeDefaultGestureRecognizers]): Ditto.
+        (-[WKContentView _addDefaultGestureRecognizers]):
+        (-[WKContentView _inspectorNodeSearchRecognized:]): Something happened, we are no longer in
+        a potential double tap situation.
+        (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]): Remove the check
+        for potential tap in progress.
+        (-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
+        (-[WKContentView gestureRecognizerShouldBegin:]):
+        (-[WKContentView _highlightLongPressRecognized:]): Again, something happened, so we are
+        no longer in a double tap situation.
+        (-[WKContentView _longPressRecognized:]): Ditto.
+        (-[WKContentView _singleTapRecognized:]): Ditto.
+        (-[WKContentView _doubleTapRecognized:]): Ditto.
+        (-[WKContentView _resetIsDoubleTapPending]):
+        (-[WKContentView _fastDoubleTapRecognized:]): We're now pending a double tap.
+        (-[WKContentView _twoFingerDoubleTapRecognized:]):
+        (-[WKContentView _didNotHandleTapAsClick:]): If we get here and we have a pending
+        double tap, then trigger a zoom operation.
+        (-[WKContentView _setDoubleTapGesturesEnabled:]):
+
</ins><span class="cx"> 2016-02-16  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         CMake build fix.
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (196678 => 196679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-02-17 02:34:36 UTC (rev 196678)
+++ trunk/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-02-17 03:27:05 UTC (rev 196679)
</span><span class="lines">@@ -261,9 +261,6 @@
</span><span class="cx"> 
</span><span class="cx"> void PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID)
</span><span class="cx"> {
</span><del>-    if (!m_webView._allowsDoubleTapGestures)
-        return;
-
</del><span class="cx">     [m_contentView _disableDoubleTapGesturesDuringTapIfNecessary:requestID];
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (196678 => 196679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-02-17 02:34:36 UTC (rev 196678)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-02-17 03:27:05 UTC (rev 196679)
</span><span class="lines">@@ -102,6 +102,7 @@
</span><span class="cx">     RetainPtr&lt;_UIWebHighlightLongPressGestureRecognizer&gt; _highlightLongPressGestureRecognizer;
</span><span class="cx">     RetainPtr&lt;UILongPressGestureRecognizer&gt; _longPressGestureRecognizer;
</span><span class="cx">     RetainPtr&lt;UITapGestureRecognizer&gt; _doubleTapGestureRecognizer;
</span><ins>+    RetainPtr&lt;UITapGestureRecognizer&gt; _nonBlockingDoubleTapGestureRecognizer;
</ins><span class="cx">     RetainPtr&lt;UITapGestureRecognizer&gt; _twoFingerDoubleTapGestureRecognizer;
</span><span class="cx">     RetainPtr&lt;WKInspectorNodeSearchGestureRecognizer&gt; _inspectorNodeSearchGestureRecognizer;
</span><span class="cx"> 
</span><span class="lines">@@ -154,6 +155,7 @@
</span><span class="cx">     BOOL _hasValidPositionInformation;
</span><span class="cx">     BOOL _isTapHighlightIDValid;
</span><span class="cx">     BOOL _potentialTapInProgress;
</span><ins>+    BOOL _isDoubleTapPending;
</ins><span class="cx">     BOOL _highlightLongPressCanClick;
</span><span class="cx">     BOOL _hasTapHighlightForPotentialTap;
</span><span class="cx">     BOOL _selectionNeedsUpdate;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (196678 => 196679)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-02-17 02:34:36 UTC (rev 196678)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-02-17 03:27:05 UTC (rev 196679)
</span><span class="lines">@@ -461,6 +461,12 @@
</span><span class="cx">     [_singleTapGestureRecognizer setResetTarget:self action:@selector(_singleTapDidReset:)];
</span><span class="cx">     [self addGestureRecognizer:_singleTapGestureRecognizer.get()];
</span><span class="cx"> 
</span><ins>+    _nonBlockingDoubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_nonBlockingDoubleTapRecognized:)]);
+    [_nonBlockingDoubleTapGestureRecognizer setNumberOfTapsRequired:2];
+    [_nonBlockingDoubleTapGestureRecognizer setDelegate:self];
+    [_nonBlockingDoubleTapGestureRecognizer setEnabled:NO];
+    [self addGestureRecognizer:_nonBlockingDoubleTapGestureRecognizer.get()];
+
</ins><span class="cx">     [self _createAndConfigureDoubleTapGestureRecognizer];
</span><span class="cx"> 
</span><span class="cx">     _twoFingerDoubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_twoFingerDoubleTapRecognized:)]);
</span><span class="lines">@@ -494,6 +500,8 @@
</span><span class="cx">     [_actionSheetAssistant setDelegate:self];
</span><span class="cx">     _smartMagnificationController = std::make_unique&lt;SmartMagnificationController&gt;(self);
</span><span class="cx">     _isExpectingFastSingleTapCommit = NO;
</span><ins>+    _potentialTapInProgress = NO;
+    _isDoubleTapPending = NO;
</ins><span class="cx">     _showDebugTapHighlightsForFastClicking = [[NSUserDefaults standardUserDefaults] boolForKey:@&quot;WebKitShowFastClickDebugTapHighlights&quot;];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -532,6 +540,9 @@
</span><span class="cx">     [_doubleTapGestureRecognizer setDelegate:nil];
</span><span class="cx">     [self removeGestureRecognizer:_doubleTapGestureRecognizer.get()];
</span><span class="cx"> 
</span><ins>+    [_nonBlockingDoubleTapGestureRecognizer setDelegate:nil];
+    [self removeGestureRecognizer:_nonBlockingDoubleTapGestureRecognizer.get()];
+
</ins><span class="cx">     [_twoFingerDoubleTapGestureRecognizer setDelegate:nil];
</span><span class="cx">     [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx"> 
</span><span class="lines">@@ -559,6 +570,7 @@
</span><span class="cx">     [self removeGestureRecognizer:_singleTapGestureRecognizer.get()];
</span><span class="cx">     [self removeGestureRecognizer:_highlightLongPressGestureRecognizer.get()];
</span><span class="cx">     [self removeGestureRecognizer:_doubleTapGestureRecognizer.get()];
</span><ins>+    [self removeGestureRecognizer:_nonBlockingDoubleTapGestureRecognizer.get()];
</ins><span class="cx">     [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -568,6 +580,7 @@
</span><span class="cx">     [self addGestureRecognizer:_singleTapGestureRecognizer.get()];
</span><span class="cx">     [self addGestureRecognizer:_highlightLongPressGestureRecognizer.get()];
</span><span class="cx">     [self addGestureRecognizer:_doubleTapGestureRecognizer.get()];
</span><ins>+    [self addGestureRecognizer:_nonBlockingDoubleTapGestureRecognizer.get()];
</ins><span class="cx">     [self addGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -732,6 +745,7 @@
</span><span class="cx"> - (void)_inspectorNodeSearchRecognized:(UIGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><span class="cx">     ASSERT(_inspectorNodeSearchEnabled);
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx"> 
</span><span class="cx">     CGPoint point = [gestureRecognizer locationInView:self];
</span><span class="cx"> 
</span><span class="lines">@@ -920,7 +934,7 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_disableDoubleTapGesturesDuringTapIfNecessary:(uint64_t)requestID
</span><span class="cx"> {
</span><del>-    if (!_potentialTapInProgress || _latestTapID != requestID)
</del><ins>+    if (_latestTapID != requestID)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     [self _setDoubleTapGesturesEnabled:NO];
</span><span class="lines">@@ -1049,6 +1063,12 @@
</span><span class="cx">     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _singleTapGestureRecognizer.get(), _textSelectionAssistant.get().singleTapGesture))
</span><span class="cx">         return YES;
</span><span class="cx"> 
</span><ins>+    if (isSamePair(gestureRecognizer, otherGestureRecognizer, _singleTapGestureRecognizer.get(), _nonBlockingDoubleTapGestureRecognizer.get()))
+        return YES;
+
+    if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _nonBlockingDoubleTapGestureRecognizer.get()))
+        return YES;
+
</ins><span class="cx">     if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _previewSecondaryGestureRecognizer.get()))
</span><span class="cx">         return YES;
</span><span class="cx"> 
</span><span class="lines">@@ -1112,6 +1132,7 @@
</span><span class="cx"> 
</span><span class="cx">     if (gestureRecognizer == _highlightLongPressGestureRecognizer
</span><span class="cx">         || gestureRecognizer == _doubleTapGestureRecognizer
</span><ins>+        || gestureRecognizer == _nonBlockingDoubleTapGestureRecognizer
</ins><span class="cx">         || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer
</span><span class="cx">         || gestureRecognizer == _singleTapGestureRecognizer) {
</span><span class="cx"> 
</span><span class="lines">@@ -1233,6 +1254,7 @@
</span><span class="cx"> - (void)_highlightLongPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><span class="cx">     ASSERT(gestureRecognizer == _highlightLongPressGestureRecognizer);
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx"> 
</span><span class="cx">     _lastInteractionLocation = gestureRecognizer.startPoint;
</span><span class="cx"> 
</span><span class="lines">@@ -1263,6 +1285,7 @@
</span><span class="cx"> - (void)_longPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><span class="cx">     ASSERT(gestureRecognizer == _longPressGestureRecognizer);
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx"> 
</span><span class="cx">     _lastInteractionLocation = gestureRecognizer.startPoint;
</span><span class="cx"> 
</span><span class="lines">@@ -1287,6 +1310,7 @@
</span><span class="cx"> {
</span><span class="cx">     ASSERT(gestureRecognizer == _singleTapGestureRecognizer);
</span><span class="cx">     ASSERT(!_potentialTapInProgress);
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx"> 
</span><span class="cx">     _page-&gt;potentialTapAtPosition(gestureRecognizer.location, ++_latestTapID);
</span><span class="cx">     _potentialTapInProgress = YES;
</span><span class="lines">@@ -1314,6 +1338,22 @@
</span><span class="cx">     [self _cancelInteraction];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_didNotHandleTapAsClick:(const WebCore::IntPoint&amp;)point
+{
+    // FIXME: we should also take into account whether or not the UI delegate
+    // has handled this notification.
+    if (_hasValidPositionInformation &amp;&amp; point == _positionInformation.point &amp;&amp; _positionInformation.isDataDetectorLink) {
+        [self _showDataDetectorsSheet];
+        return;
+    }
+
+    if (!_isDoubleTapPending)
+        return;
+
+    _smartMagnificationController-&gt;handleSmartMagnificationGesture(_lastInteractionLocation);
+    _isDoubleTapPending = NO;
+}
+
</ins><span class="cx"> - (void)_singleTapCommited:(UITapGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><span class="cx">     ASSERT(gestureRecognizer == _singleTapGestureRecognizer);
</span><span class="lines">@@ -1351,13 +1391,26 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_doubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx">     _lastInteractionLocation = gestureRecognizer.location;
</span><span class="cx"> 
</span><span class="cx">     _smartMagnificationController-&gt;handleSmartMagnificationGesture(gestureRecognizer.location);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (void)_resetIsDoubleTapPending
+{
+    _isDoubleTapPending = NO;
+}
+
+- (void)_nonBlockingDoubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
+{
+    _lastInteractionLocation = gestureRecognizer.location;
+    _isDoubleTapPending = YES;
+}
+
</ins><span class="cx"> - (void)_twoFingerDoubleTapRecognized:(UITapGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><ins>+    [self _resetIsDoubleTapPending];
</ins><span class="cx">     _lastInteractionLocation = gestureRecognizer.location;
</span><span class="cx"> 
</span><span class="cx">     _smartMagnificationController-&gt;handleResetMagnificationGesture(gestureRecognizer.location);
</span><span class="lines">@@ -1401,14 +1454,6 @@
</span><span class="cx">     _page-&gt;clearSelection();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-- (void)_didNotHandleTapAsClick:(const WebCore::IntPoint&amp;)point
-{
-    // FIXME: we should also take into account whether or not the UI delegate
-    // has handled this notification.
-    if (_hasValidPositionInformation &amp;&amp; point == _positionInformation.point &amp;&amp; _positionInformation.isDataDetectorLink)
-        [self _showDataDetectorsSheet];
-}
-
</del><span class="cx"> - (void)_positionInformationDidChange:(const InteractionInformationAtPosition&amp;)info
</span><span class="cx"> {
</span><span class="cx">     _positionInformation = info;
</span><span class="lines">@@ -2460,6 +2505,8 @@
</span><span class="cx">         _tapHighlightInformation.color = [self _tapHighlightColorForFastClick:YES];
</span><span class="cx"> 
</span><span class="cx">     [_doubleTapGestureRecognizer setEnabled:enabled];
</span><ins>+    [_nonBlockingDoubleTapGestureRecognizer setEnabled:!enabled];
+    [self _resetIsDoubleTapPending];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)accessoryAutoFill
</span></span></pre>
</div>
</div>

</body>
</html>