<!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>[196682] tags/Safari-601.1.46.100.1</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/196682">196682</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2016-02-16 20:04:45 -0800 (Tue, 16 Feb 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge patch for <a href="http://trac.webkit.org/projects/webkit/changeset/192036">r192036</a> and <a href="http://trac.webkit.org/projects/webkit/changeset/196679">r196679</a>. rdar://problem/24355523</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#tagsSafari6011461001LayoutTestsChangeLog">tags/Safari-601.1.46.100.1/LayoutTests/ChangeLog</a></li>
<li><a href="#tagsSafari6011461001LayoutTestscss3touchactiontouchactionmanipulationfastclickshtml">tags/Safari-601.1.46.100.1/LayoutTests/css3/touch-action/touch-action-manipulation-fast-clicks.html</a></li>
<li><a href="#tagsSafari6011461001LayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclickshtml">tags/Safari-601.1.46.100.1/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2ChangeLog">tags/Safari-601.1.46.100.1/Source/WebKit2/ChangeLog</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessPageClienth">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessiosPageClientImplIOSh">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessiosPageClientImplIOSmm">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessiosWKContentViewInteractionh">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessiosWKContentViewInteractionmm">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#tagsSafari6011461001SourceWebKit2UIProcessiosWebPageProxyIOSmm">tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="tagsSafari6011461001LayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/LayoutTests/ChangeLog (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/LayoutTests/ChangeLog        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/LayoutTests/ChangeLog        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -1,3 +1,23 @@
</span><ins>+2016-02-16 Babak Shafiei <bshafiei@apple.com>
+
+ Merge patch for r192036 and r196679.
+
+ 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Fix crashing fast-clicking WK2 tests on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150896
+ <rdar://problem/23344491>
+
+ Reviewed by Simon Fraser.
+
+ Fix the fast-clicking tests by making them fire an exact number of times rather than
+ sending continuously until a minimum number of clicks are fired. This causes us to
+ avoid crashing during the following test when the marker events corresponding to single
+ taps fired after the test has completed have been handled.
+
+ * css3/touch-action/touch-action-manipulation-fast-clicks.html:
+ * fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html:
+
</ins><span class="cx"> 2016-02-12 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r196401.
</span></span></pre></div>
<a id="tagsSafari6011461001LayoutTestscss3touchactiontouchactionmanipulationfastclickshtml"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/LayoutTests/css3/touch-action/touch-action-manipulation-fast-clicks.html (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/LayoutTests/css3/touch-action/touch-action-manipulation-fast-clicks.html        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/LayoutTests/css3/touch-action/touch-action-manipulation-fast-clicks.html        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -7,14 +7,21 @@
</span><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx"> <script id="ui-script" type="text/plain">
</span><span class="cx"> (function() {
</span><del>- function performTap() {
- uiController.singleTapAtPoint(200, 200, performTap);
</del><ins>+ var count = 0;
+ function fireSuccessiveTaps() {
+ if (count < 3)
+ uiController.singleTapAtPoint(200, 200, fireSuccessiveTaps);
+ else
+ uiController.uiScriptComplete("");
+
+ count++;
</ins><span class="cx"> }
</span><del>- performTap();
</del><ins>+ fireSuccessiveTaps();
</ins><span class="cx"> })();
</span><span class="cx"> </script>
</span><span class="cx">
</span><span class="cx"> <script>
</span><ins>+ var scriptCompleted = false;
</ins><span class="cx"> var clickCount = 0;
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="lines">@@ -25,13 +32,17 @@
</span><span class="cx">
</span><span class="cx"> function runTest() {
</span><span class="cx"> if (testRunner.runUIScript)
</span><del>- testRunner.runUIScript(getUIScript(), function(result) { });
</del><ins>+ testRunner.runUIScript(getUIScript(), function(result) {
+ scriptCompleted = true;
+ if (clickCount == 3)
+ testRunner.notifyDone();
+ });
</ins><span class="cx"> }
</span><span class="cx"> function handleClicked() {
</span><span class="cx"> clickCount++;
</span><span class="cx"> document.body.appendChild(document.createTextNode("Click!"));
</span><span class="cx"> document.body.appendChild(document.createElement("br"));
</span><del>- if (clickCount == 3)
</del><ins>+ if (clickCount == 3 && scriptCompleted)
</ins><span class="cx"> testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="tagsSafari6011461001LayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclickshtml"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -7,18 +7,21 @@
</span><span class="cx"> <script src="../../../resources/js-test-pre.js"></script>
</span><span class="cx"> <script id="ui-script" type="text/plain">
</span><span class="cx"> (function() {
</span><del>- uiController.didEndZoomingCallback = function() {
- uiController.uiScriptComplete("FAIL: Zoomed to scale " + uiController.zoomScale + " when we should only be firing fast clicks.");
- };
</del><ins>+ var count = 0;
+ function fireSuccessiveTaps() {
+ if (count < 3)
+ uiController.singleTapAtPoint(200, 200, fireSuccessiveTaps);
+ else
+ uiController.uiScriptComplete("");
</ins><span class="cx">
</span><del>- function fireSuccessiveSingleTaps() {
- uiController.singleTapAtPoint(200, 200, fireSuccessiveSingleTaps);
</del><ins>+ count++;
</ins><span class="cx"> }
</span><del>- fireSuccessiveSingleTaps();
</del><ins>+ fireSuccessiveTaps();
</ins><span class="cx"> })();
</span><span class="cx"> </script>
</span><span class="cx">
</span><span class="cx"> <script>
</span><ins>+ var scriptCompleted = false;
</ins><span class="cx"> var clickCount = 0;
</span><span class="cx"> if (window.testRunner)
</span><span class="cx"> testRunner.waitUntilDone();
</span><span class="lines">@@ -29,13 +32,17 @@
</span><span class="cx">
</span><span class="cx"> function runTest() {
</span><span class="cx"> if (testRunner.runUIScript)
</span><del>- testRunner.runUIScript(getUIScript(), function(result) { });
</del><ins>+ testRunner.runUIScript(getUIScript(), function(result) {
+ scriptCompleted = true;
+ if (clickCount == 3)
+ testRunner.notifyDone();
+ });
</ins><span class="cx"> }
</span><span class="cx"> function handleClicked() {
</span><span class="cx"> clickCount++;
</span><span class="cx"> document.body.appendChild(document.createTextNode("Click!"));
</span><span class="cx"> document.body.appendChild(document.createElement("br"));
</span><del>- if (clickCount == 3)
</del><ins>+ if (clickCount == 3 && scriptCompleted)
</ins><span class="cx"> testRunner.notifyDone();
</span><span class="cx"> }
</span><span class="cx"> </script>
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/ChangeLog (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/ChangeLog        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/ChangeLog        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -1,3 +1,76 @@
</span><ins>+2016-02-16 Babak Shafiei <bshafiei@apple.com>
+
+ Merge patch for r192036 and r196679.
+
+ 2016-02-16 Dean Jackson <dino@apple.com>
+
+ Allow double tap to zoom in fast-click pages
+ https://bugs.webkit.org/show_bug.cgi?id=154318
+ <rdar://problem/24223767>
+
+ 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:]):
+
+ 2015-11-04 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Fix crashing fast-clicking WK2 tests on iOS
+ https://bugs.webkit.org/show_bug.cgi?id=150896
+ <rdar://problem/23344491>
+
+ Reviewed by Simon Fraser.
+
+ In order for the modified fast-clicking tests to pass, we can't allow hit-testing to
+ find the tap highlight view. See the Radar for more UIKit-specific descriptions.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView _showTapHighlight]):
+
</ins><span class="cx"> 2016-01-29 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r195826.
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/PageClient.h (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/PageClient.h        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/PageClient.h        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -260,6 +260,7 @@
</span><span class="cx">
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> virtual void commitPotentialTapFailed() = 0;
</span><ins>+ virtual void didNotHandleTapAsClick() = 0;
</ins><span class="cx"> virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) = 0;
</span><span class="cx">
</span><span class="cx"> virtual void didCommitLayerTree(const RemoteLayerTreeTransaction&) = 0;
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -114,6 +114,7 @@
</span><span class="cx"> virtual void wheelEventWasNotHandledByWebCore(const NativeWebWheelEvent&) override;
</span><span class="cx">
</span><span class="cx"> virtual void commitPotentialTapFailed() override;
</span><ins>+ virtual void didNotHandleTapAsClick() override;
</ins><span class="cx"> virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) override;
</span><span class="cx">
</span><span class="cx"> virtual void didCommitLayerTree(const RemoteLayerTreeTransaction&) override;
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -267,9 +267,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 class="lines">@@ -507,6 +504,11 @@
</span><span class="cx"> [m_contentView _commitPotentialTapFailed];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void PageClientImpl::didNotHandleTapAsClick()
+{
+ [m_contentView _didNotHandleTapAsClick];
+}
+
</ins><span class="cx"> void PageClientImpl::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
</span><span class="cx"> {
</span><span class="cx"> [m_contentView _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius];
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -105,6 +105,7 @@
</span><span class="cx"> RetainPtr<_UIWebHighlightLongPressGestureRecognizer> _highlightLongPressGestureRecognizer;
</span><span class="cx"> RetainPtr<UILongPressGestureRecognizer> _longPressGestureRecognizer;
</span><span class="cx"> RetainPtr<UITapGestureRecognizer> _doubleTapGestureRecognizer;
</span><ins>+ RetainPtr<UITapGestureRecognizer> _fastDoubleTapGestureRecognizer;
</ins><span class="cx"> RetainPtr<UITapGestureRecognizer> _twoFingerDoubleTapGestureRecognizer;
</span><span class="cx"> RetainPtr<WKInspectorNodeSearchGestureRecognizer> _inspectorNodeSearchGestureRecognizer;
</span><span class="cx">
</span><span class="lines">@@ -156,6 +157,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 class="lines">@@ -189,6 +191,7 @@
</span><span class="cx"> - (void)_webTouchEvent:(const WebKit::NativeWebTouchEvent&)touchEvent preventsNativeGestures:(BOOL)preventsDefault;
</span><span class="cx"> #endif
</span><span class="cx"> - (void)_commitPotentialTapFailed;
</span><ins>+- (void)_didNotHandleTapAsClick;
</ins><span class="cx"> - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
</span><span class="cx">
</span><span class="cx"> - (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap;
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -353,6 +353,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>+ _fastDoubleTapGestureRecognizer = adoptNS([[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(_fastDoubleTapRecognized:)]);
+ [_fastDoubleTapGestureRecognizer setNumberOfTapsRequired:2];
+ [_fastDoubleTapGestureRecognizer setDelegate:self];
+ [_fastDoubleTapGestureRecognizer setEnabled:false];
+ [self addGestureRecognizer:_fastDoubleTapGestureRecognizer.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">@@ -389,6 +395,7 @@
</span><span class="cx"> [_actionSheetAssistant setDelegate:self];
</span><span class="cx"> _smartMagnificationController = std::make_unique<SmartMagnificationController>(self);
</span><span class="cx"> _isExpectingFastSingleTapCommit = NO;
</span><ins>+ _isDoubleTapPending = NO;
</ins><span class="cx"> _showDebugTapHighlightsForFastClicking = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitShowFastClickDebugTapHighlights"];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -400,6 +407,7 @@
</span><span class="cx"> _smartMagnificationController = nil;
</span><span class="cx"> _didAccessoryTabInitiateFocus = NO;
</span><span class="cx"> _isExpectingFastSingleTapCommit = NO;
</span><ins>+ _isDoubleTapPending = NO;
</ins><span class="cx"> [_formInputSession invalidate];
</span><span class="cx"> _formInputSession = nil;
</span><span class="cx"> [_highlightView removeFromSuperview];
</span><span class="lines">@@ -427,6 +435,9 @@
</span><span class="cx"> [_doubleTapGestureRecognizer setDelegate:nil];
</span><span class="cx"> [self removeGestureRecognizer:_doubleTapGestureRecognizer.get()];
</span><span class="cx">
</span><ins>+ [_fastDoubleTapGestureRecognizer setDelegate:nil];
+ [self removeGestureRecognizer:_fastDoubleTapGestureRecognizer.get()];
+
</ins><span class="cx"> [_twoFingerDoubleTapGestureRecognizer setDelegate:nil];
</span><span class="cx"> [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx">
</span><span class="lines">@@ -454,6 +465,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:_fastDoubleTapGestureRecognizer.get()];
</ins><span class="cx"> [self removeGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -463,6 +475,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:_fastDoubleTapGestureRecognizer.get()];
</ins><span class="cx"> [self addGestureRecognizer:_twoFingerDoubleTapGestureRecognizer.get()];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -627,6 +640,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">@@ -769,6 +783,7 @@
</span><span class="cx">
</span><span class="cx"> if (!_highlightView) {
</span><span class="cx"> _highlightView = adoptNS([[_UIHighlightView alloc] initWithFrame:CGRectZero]);
</span><ins>+ [_highlightView setUserInteractionEnabled:NO];
</ins><span class="cx"> [_highlightView setOpaque:NO];
</span><span class="cx"> [_highlightView setCornerRadius:minimumTapHighlightRadius];
</span><span class="cx"> }
</span><span class="lines">@@ -814,7 +829,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">@@ -942,6 +957,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(), _fastDoubleTapGestureRecognizer.get()))
+ return YES;
+
+ if (isSamePair(gestureRecognizer, otherGestureRecognizer, _highlightLongPressGestureRecognizer.get(), _fastDoubleTapGestureRecognizer.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">@@ -996,6 +1017,7 @@
</span><span class="cx">
</span><span class="cx"> if (gestureRecognizer == _highlightLongPressGestureRecognizer
</span><span class="cx"> || gestureRecognizer == _doubleTapGestureRecognizer
</span><ins>+ || gestureRecognizer == _fastDoubleTapGestureRecognizer
</ins><span class="cx"> || gestureRecognizer == _twoFingerDoubleTapGestureRecognizer
</span><span class="cx"> || gestureRecognizer == _singleTapGestureRecognizer) {
</span><span class="cx">
</span><span class="lines">@@ -1117,6 +1139,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">@@ -1147,6 +1170,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">@@ -1171,6 +1195,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->potentialTapAtPosition(gestureRecognizer.location, ++_latestTapID);
</span><span class="cx"> _potentialTapInProgress = YES;
</span><span class="lines">@@ -1198,6 +1223,15 @@
</span><span class="cx"> [self _cancelInteraction];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_didNotHandleTapAsClick
+{
+ if (!_isDoubleTapPending)
+ return;
+
+ _smartMagnificationController->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">@@ -1236,13 +1270,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->handleSmartMagnificationGesture(gestureRecognizer.location);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_resetIsDoubleTapPending
+{
+ _isDoubleTapPending = NO;
+}
+
+- (void)_fastDoubleTapRecognized:(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->handleResetMagnificationGesture(gestureRecognizer.location);
</span><span class="lines">@@ -2338,6 +2385,8 @@
</span><span class="cx"> _tapHighlightInformation.color = [self _tapHighlightColorForFastClick:YES];
</span><span class="cx">
</span><span class="cx"> [_doubleTapGestureRecognizer setEnabled:enabled];
</span><ins>+ [_fastDoubleTapGestureRecognizer setEnabled:!enabled];
+ [self _resetIsDoubleTapPending];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)accessoryAutoFill
</span></span></pre></div>
<a id="tagsSafari6011461001SourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (196681 => 196682)</h4>
<pre class="diff"><span>
<span class="info">--- tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-02-17 04:03:02 UTC (rev 196681)
+++ tags/Safari-601.1.46.100.1/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-02-17 04:04:45 UTC (rev 196682)
</span><span class="lines">@@ -912,6 +912,7 @@
</span><span class="cx"> void WebPageProxy::didNotHandleTapAsClick(const WebCore::IntPoint& point)
</span><span class="cx"> {
</span><span class="cx"> m_uiClient->didNotHandleTapAsClick(point);
</span><ins>+ m_pageClient.didNotHandleTapAsClick();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID)
</span></span></pre>
</div>
</div>
</body>
</html>