<!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>[193573] branches/safari-601.1.46-branch</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/193573">193573</a></dd>
<dt>Author</dt> <dd>bshafiei@apple.com</dd>
<dt>Date</dt> <dd>2015-12-06 00:09:14 -0800 (Sun, 06 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merged <a href="http://trac.webkit.org/projects/webkit/changeset/191644">r191644</a>. rdar://problem/23766315</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsChangeLog">branches/safari-601.1.46-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2ChangeLog">branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2SharedmacRemoteLayerTreeTransactionh">branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2SharedmacRemoteLayerTreeTransactionmm">branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewInternalh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessPageClienth">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/PageClient.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessWebPageProxymessagesin">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosPageClientImplIOSh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosPageClientImplIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosSmartMagnificationControllerh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosSmartMagnificationControllermm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionh">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagecpp">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm">branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomoutexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomouthtml">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclicksexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclickshtml">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscaleexpectedtxt">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt</a></li>
<li><a href="#branchessafari601146branchLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscalehtml">branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601146branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/LayoutTests/ChangeLog (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/LayoutTests/ChangeLog        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2015-12-06 Babak Shafiei <bshafiei@apple.com>
+
+ Merge r191644.
+
+ 2015-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Implement viewport-width-based fast-click heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=150604
+ <rdar://problem/23267308>
+
+ Reviewed by Simon Fraser.
+
+ Implement a new fast-click heuristic that applies to viewports with width = device-width. Adds
+ new tests to check various fast-clicking behaviors. These three tests check (for pages with width=
+ device-width) that:
+
+ - Double-tapping to zoom still works when the scale is not the initial scale.
+ - If the page is at initial scale, we fire fast-clicks instead of zooming.
+ - When zooming out from element scale, we end up at initial scale instead of minimum scale.
+
+ * fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt: Added.
+ * fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html: Added.
+ * fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt: Added.
+ * fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html: Added.
+ * fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt: Added.
+ * fast/events/ios/viewport-zooms-from-element-to-initial-scale.html: Added.
+
</ins><span class="cx"> 2015-12-05 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r192953.
</span></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomoutexpectedtxtfromrev191644trunkLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomoutexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out-expected.txt        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1,2 @@
</span><ins>+The viewport zoomed to scale: 1.6
+
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomouthtmlfromrev191644trunkLayoutTestsfasteventsiosviewportdevicewidthallowsdoubletapzoomouthtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-allows-double-tap-zoom-out.html        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+
+<html>
+<meta name="viewport" content="initial-scale=1.0, width=device-width">
+<head>
+ <script id="ui-script" type="text/plain">
+ (function() {
+ uiController.didEndZoomingCallback = function() {
+ uiController.uiScriptComplete(uiController.zoomScale);
+ };
+ uiController.doubleTapAtPoint(15, 15, function() {});
+ })();
+ </script>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function getUIScript()
+ {
+ return document.getElementById("ui-script").text;
+ }
+
+ function runTest()
+ {
+ if (!window.eventSender || !testRunner.runUIScript)
+ return;
+
+ eventSender.scalePageBy(3, 3);
+ testRunner.runUIScript(getUIScript(), function(result) {
+ document.getElementById("target").innerText = "The viewport zoomed to scale: " + result;
+ testRunner.notifyDone();
+ });
+ }
+
+ function handleClick()
+ {
+ document.getElementById("target").innerText = "FAIL: Click fired when we should only be zooming.";
+ testRunner.notifyDone();
+ }
+ </script>
+ <style>
+ body {
+ margin: 0;
+ }
+ #target {
+ height: 100px;
+ width: 100px;
+ background-color: silver;
+ }
+ </style>
+</head>
+<body onload="runTest()">
+<div id="target"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclicksexpectedtxtfromrev191644trunkLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclicksexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks-expected.txt        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1,12 @@
</span><ins>+PASS successfullyParsed is true
+
+TEST COMPLETE
+
+Repeatedly tapping on the button should fire click events.
+
+This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping.
+
+Click!
+Click!
+Click!
+
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclickshtmlfromrev191644trunkLayoutTestsfasteventsiosviewportdevicewidthatinitialscalefastclickshtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-device-width-at-initial-scale-fast-clicks.html        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1,62 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+
+<html>
+<meta name="viewport" content="initial-scale=1.0, width=device-width">
+
+<head>
+ <script src="../../../resources/js-test-pre.js"></script>
+ <script id="ui-script" type="text/plain">
+ (function() {
+ uiController.didEndZoomingCallback = function() {
+ uiController.uiScriptComplete("FAIL: Zoomed to scale " + uiController.zoomScale + " when we should only be firing fast clicks.");
+ };
+
+ function fireSuccessiveSingleTaps() {
+ uiController.singleTapAtPoint(200, 200, fireSuccessiveSingleTaps);
+ }
+ fireSuccessiveSingleTaps();
+ })();
+ </script>
+
+ <script>
+ var clickCount = 0;
+ if (window.testRunner)
+ testRunner.waitUntilDone();
+
+ function getUIScript() {
+ return document.getElementById("ui-script").text;
+ }
+
+ function runTest() {
+ if (testRunner.runUIScript)
+ testRunner.runUIScript(getUIScript(), function(result) { });
+ }
+ function handleClicked() {
+ clickCount++;
+ document.body.appendChild(document.createTextNode("Click!"));
+ document.body.appendChild(document.createElement("br"));
+ if (clickCount == 3)
+ testRunner.notifyDone();
+ }
+ </script>
+
+ <style>
+ body {
+ margin: 0;
+ }
+
+ #target {
+ width: 400px;
+ height: 400px;
+ }
+ </style>
+</head>
+
+<body onload="runTest()">
+ <button id="target" onclick="handleClicked()"></button>
+ <p>Repeatedly tapping on the button should fire click events.</p>
+ <p>This test is best run in WebKitTestRunner. If you are running this test manually, verify that tapping the button causes a "Click!" message to appear below, and that click occurred without the regular 350ms delay for double tapping.</p>
+ <script src="../../../resources/js-test-post.js"></script>
+</body>
+
+</html>
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscaleexpectedtxtfromrev191644trunkLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscaleexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale-expected.txt        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1 @@
</span><ins>+The viewport zoomed to scale: 5
</ins></span></pre></div>
<a id="branchessafari601146branchLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscalehtmlfromrev191644trunkLayoutTestsfasteventsiosviewportzoomsfromelementtoinitialscalehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale.html (from rev 191644, trunk/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale.html) (0 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale.html         (rev 0)
+++ branches/safari-601.1.46-branch/LayoutTests/fast/events/ios/viewport-zooms-from-element-to-initial-scale.html        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -0,0 +1,57 @@
</span><ins>+<!DOCTYPE html> <!-- webkit-test-runner [ useFlexibleViewport=true ] -->
+
+<html>
+<meta name="viewport" content="initial-scale=5, width=device-width">
+<head>
+ <script id="ui-script" type="text/plain">
+ (function() {
+ uiController.didEndZoomingCallback = function() {
+ uiController.uiScriptComplete(uiController.zoomScale);
+ };
+ uiController.doubleTapAtPoint(15, 15, function() {});
+ })();
+ </script>
+ <script>
+ if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+ }
+
+ function getUIScript()
+ {
+ return document.getElementById("ui-script").text;
+ }
+
+ function runTest()
+ {
+ if (!window.eventSender || !testRunner.runUIScript)
+ return;
+
+ eventSender.scalePageBy(1.6, 1.6);
+ testRunner.runUIScript(getUIScript(), function(result) {
+ document.getElementById("target").innerText = "The viewport zoomed to scale: " + Number(result);
+ testRunner.notifyDone();
+ });
+ }
+
+ function handleClick()
+ {
+ document.getElementById("target").innerText = "FAIL: Click fired when we should only be zooming.";
+ testRunner.notifyDone();
+ }
+ </script>
+ <style>
+ body {
+ margin: 0;
+ }
+ #target {
+ height: 100px;
+ width: 100px;
+ background-color: silver;
+ }
+ </style>
+</head>
+<body onload="runTest()">
+<div id="target"></div>
+</body>
+</html>
</ins></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/ChangeLog        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -1,3 +1,89 @@
</span><ins>+2015-12-06 Babak Shafiei <bshafiei@apple.com>
+
+ Merge r191644.
+
+ 2015-10-27 Wenson Hsieh <wenson_hsieh@apple.com>
+
+ Implement viewport-width-based fast-click heuristic
+ https://bugs.webkit.org/show_bug.cgi?id=150604
+ <rdar://problem/23267308>
+
+ Reviewed by Simon Fraser.
+
+ Implement a new fast-click heuristic that applies to viewports with width = device-width. The basic rules are
+ as follows: when a page has viewport width = device-width and is at initial zoom scale, we disable double-tapping
+ in favor of fast-clicking. However, if the viewport scale is not the initial scale, we allow double tapping. For
+ fast-clicking to remain useful after the user pinch-zooms, we change our double-tap to zoom out behavior to zoom
+ to the initial scale rather than the minimum scale. For unscalable viewports, we default to fast-clicking behavior,
+ and for all other viewports not at device-width, we double-tap to zoom and scroll as normal.
+
+ This patch removes some logic previously used for our scroll- and zoom-based fast-clicking heuristic, and adds
+ information about the viewport width and initial scale to RemoteLayerTreeTransactions. This information is then
+ used by the UI process to determine whether double tapping should be disabled or enabled.
+
+ The fast-click heuristic can be turned off through user default preferences, and a tap highlight for debugging
+ fast-clicking can also be enabled through a user default preference. A red highlight indicates that a single-
+ tap was slow, whereas a green highlight indicates a fast single-tap.
+
+ * Shared/mac/RemoteLayerTreeTransaction.h:
+ (WebKit::RemoteLayerTreeTransaction::initialScaleFactor):
+ (WebKit::RemoteLayerTreeTransaction::setInitialScaleFactor):
+ (WebKit::RemoteLayerTreeTransaction::viewportMetaTagWidth):
+ (WebKit::RemoteLayerTreeTransaction::setViewportMetaTagWidth):
+ * Shared/mac/RemoteLayerTreeTransaction.mm:
+ (WebKit::RemoteLayerTreeTransaction::encode):
+ (WebKit::RemoteLayerTreeTransaction::decode):
+ * UIProcess/API/Cocoa/WKWebView.mm:
+ (-[WKWebView initWithFrame:configuration:]):
+ (-[WKWebView _processDidExit]):
+ (-[WKWebView _didCommitLayerTree:]):
+ (-[WKWebView _zoomToInitialScaleWithOrigin:animated:]):
+ (-[WKWebView _allowsDoubleTapGestures]):
+ (-[WKWebView _setViewportMetaTagWidth:]): Deleted.
+ (-[WKWebView _contentZoomScale]): Deleted.
+ (-[WKWebView _viewportMetaTagWidth]): Deleted.
+ (-[WKWebView _viewportIsUserScalable]): Deleted.
+ * UIProcess/API/Cocoa/WKWebViewInternal.h:
+ * UIProcess/API/Cocoa/WKWebViewPrivate.h:
+ * UIProcess/PageClient.h:
+ * UIProcess/WebPageProxy.h:
+ * UIProcess/WebPageProxy.messages.in:
+ * UIProcess/ios/PageClientImplIOS.h:
+ * UIProcess/ios/PageClientImplIOS.mm:
+ (WebKit::PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary):
+ (WebKit::PageClientImpl::didChangeViewportMetaTagWidth): Deleted.
+ (WebKit::PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
+ * UIProcess/ios/SmartMagnificationController.h:
+ * UIProcess/ios/SmartMagnificationController.mm:
+ (WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
+ * UIProcess/ios/WKContentView.h:
+ * UIProcess/ios/WKContentView.mm:
+ (-[WKContentView _zoomToInitialScaleWithOrigin:]):
+ * UIProcess/ios/WKContentViewInteraction.h:
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView setupInteraction]):
+ (-[WKContentView _showTapHighlight]):
+ (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
+ (-[WKContentView _mayDisableDoubleTapGesturesDuringSingleTap]):
+ (-[WKContentView _disableDoubleTapGesturesDuringTapIfNecessary:]):
+ (-[WKContentView _finishInteraction]):
+ (-[WKContentView _endPotentialTapAndEnableDoubleTapGesturesIfNecessary]):
+ (-[WKContentView _tapHighlightColorForFastClick:]):
+ (-[WKContentView _setDoubleTapGesturesEnabled:]):
+ (-[WKContentView _fastClickZoomThreshold]): Deleted.
+ (-[WKContentView _allowDoubleTapToZoomForCurrentZoomScale:andTargetZoomScale:]): Deleted.
+ (-[WKContentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:allowsDoubleTapZoom:targetRect:isReplaced:minimumScale:maximumScale:]): Deleted.
+ * UIProcess/ios/WebPageProxyIOS.mm:
+ (WebKit::WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary):
+ (WebKit::WebPageProxy::viewportMetaTagWidthDidChange): Deleted.
+ (WebKit::WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary): Deleted.
+ * WebProcess/WebPage/ViewGestureGeometryCollector.h:
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::willCommitLayerTree):
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::potentialTapAtPosition):
+ (WebKit::WebPage::viewportPropertiesDidChange): Deleted.
+
</ins><span class="cx"> 2015-12-05 Babak Shafiei <bshafiei@apple.com>
</span><span class="cx">
</span><span class="cx"> Merge r191452.
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2SharedmacRemoteLayerTreeTransactionh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -222,6 +222,12 @@
</span><span class="cx"> double maximumScaleFactor() const { return m_maximumScaleFactor; }
</span><span class="cx"> void setMaximumScaleFactor(double scale) { m_maximumScaleFactor = scale; }
</span><span class="cx">
</span><ins>+ double initialScaleFactor() const { return m_initialScaleFactor; }
+ void setInitialScaleFactor(double scale) { m_initialScaleFactor = scale; }
+
+ double viewportMetaTagWidth() const { return m_viewportMetaTagWidth; }
+ void setViewportMetaTagWidth(double width) { m_viewportMetaTagWidth = width; }
+
</ins><span class="cx"> bool allowsUserScaling() const { return m_allowsUserScaling; }
</span><span class="cx"> void setAllowsUserScaling(bool allowsUserScaling) { m_allowsUserScaling = allowsUserScaling; }
</span><span class="cx">
</span><span class="lines">@@ -253,6 +259,8 @@
</span><span class="cx"> double m_pageScaleFactor;
</span><span class="cx"> double m_minimumScaleFactor;
</span><span class="cx"> double m_maximumScaleFactor;
</span><ins>+ double m_initialScaleFactor { 1 };
+ double m_viewportMetaTagWidth { -1 };
</ins><span class="cx"> uint64_t m_renderTreeSize;
</span><span class="cx"> uint64_t m_transactionID;
</span><span class="cx"> bool m_scaleWasSetByUIProcess;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2SharedmacRemoteLayerTreeTransactionmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/Shared/mac/RemoteLayerTreeTransaction.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -524,6 +524,8 @@
</span><span class="cx"> encoder << m_pageScaleFactor;
</span><span class="cx"> encoder << m_minimumScaleFactor;
</span><span class="cx"> encoder << m_maximumScaleFactor;
</span><ins>+ encoder << m_initialScaleFactor;
+ encoder << m_viewportMetaTagWidth;
</ins><span class="cx">
</span><span class="cx"> encoder << m_renderTreeSize;
</span><span class="cx"> encoder << m_transactionID;
</span><span class="lines">@@ -602,6 +604,12 @@
</span><span class="cx"> if (!decoder.decode(result.m_maximumScaleFactor))
</span><span class="cx"> return false;
</span><span class="cx">
</span><ins>+ if (!decoder.decode(result.m_initialScaleFactor))
+ return false;
+
+ if (!decoder.decode(result.m_viewportMetaTagWidth))
+ return false;
+
</ins><span class="cx"> if (!decoder.decode(result.m_renderTreeSize))
</span><span class="cx"> return false;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -171,6 +171,9 @@
</span><span class="cx"> CGSize _maximumUnobscuredSizeOverride;
</span><span class="cx"> CGRect _inputViewBounds;
</span><span class="cx"> CGFloat _viewportMetaTagWidth;
</span><ins>+ CGFloat _initialScaleFactor;
+ BOOL _fastClickingIsDisabled;
+
</ins><span class="cx"> BOOL _allowsLinkPreview;
</span><span class="cx">
</span><span class="cx"> UIEdgeInsets _obscuredInsets;
</span><span class="lines">@@ -350,7 +353,9 @@
</span><span class="cx"> [_scrollView addSubview:[_contentView unscaledView]];
</span><span class="cx"> [self _updateScrollViewBackground];
</span><span class="cx">
</span><del>- _viewportMetaTagWidth = -1;
</del><ins>+ _viewportMetaTagWidth = WebCore::ViewportArguments::ValueAuto;
+ _initialScaleFactor = 1;
+ _fastClickingIsDisabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitFastClickingDisabled"];
</ins><span class="cx">
</span><span class="cx"> [self _frameOrBoundsChanged];
</span><span class="cx">
</span><span class="lines">@@ -795,11 +800,6 @@
</span><span class="cx"> _page->didLayoutForCustomContentProvider();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (void)_setViewportMetaTagWidth:(float)newWidth
-{
- _viewportMetaTagWidth = newWidth;
-}
-
</del><span class="cx"> - (void)_willInvokeUIScrollViewDelegateCallback
</span><span class="cx"> {
</span><span class="cx"> _delayUpdateVisibleContentRects = YES;
</span><span class="lines">@@ -912,7 +912,8 @@
</span><span class="cx"> [_scrollView setContentOffset:[self _adjustedContentOffset:CGPointZero]];
</span><span class="cx"> [_scrollView setZoomScale:1];
</span><span class="cx">
</span><del>- _viewportMetaTagWidth = -1;
</del><ins>+ _viewportMetaTagWidth = WebCore::ViewportArguments::ValueAuto;
+ _initialScaleFactor = 1;
</ins><span class="cx"> _hasCommittedLoadForMainFrame = NO;
</span><span class="cx"> _needsResetViewStateAfterCommitLoadForMainFrame = NO;
</span><span class="cx"> _dynamicViewportUpdateMode = DynamicViewportUpdateMode::NotResizing;
</span><span class="lines">@@ -994,7 +995,10 @@
</span><span class="cx"> if (!layerTreeTransaction.scaleWasSetByUIProcess() && ![_scrollView isZooming] && ![_scrollView isZoomBouncing] && ![_scrollView _isAnimatingZoom])
</span><span class="cx"> [_scrollView setZoomScale:layerTreeTransaction.pageScaleFactor()];
</span><span class="cx">
</span><del>- [_contentView _setDoubleTapGesturesEnabled:self._viewportIsUserScalable];
</del><ins>+ _viewportMetaTagWidth = layerTreeTransaction.viewportMetaTagWidth();
+ _initialScaleFactor = layerTreeTransaction.initialScaleFactor();
+ if (![_contentView _mayDisableDoubleTapGesturesDuringSingleTap])
+ [_contentView _setDoubleTapGesturesEnabled:self._allowsDoubleTapGestures];
</ins><span class="cx">
</span><span class="cx"> [self _updateScrollViewBackground];
</span><span class="cx">
</span><span class="lines">@@ -1276,6 +1280,12 @@
</span><span class="cx"> [self _zoomToPoint:origin atScale:[_scrollView minimumZoomScale] animated:animated];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_zoomToInitialScaleWithOrigin:(WebCore::FloatPoint)origin animated:(BOOL)animated
+{
+ ASSERT(_initialScaleFactor > 0);
+ [self _zoomToPoint:origin atScale:_initialScaleFactor animated:animated];
+}
+
</ins><span class="cx"> // focusedElementRect and selectionRect are both in document coordinates.
</span><span class="cx"> - (void)_zoomToFocusRect:(WebCore::FloatRect)focusedElementRectInDocumentCoordinates selectionRect:(WebCore::FloatRect)selectionRectInDocumentCoordinates fontSize:(float)fontSize minimumScale:(double)minimumScale maximumScale:(double)maximumScale allowScaling:(BOOL)allowScaling forceScroll:(BOOL)forceScroll
</span><span class="cx"> {
</span><span class="lines">@@ -1395,11 +1405,6 @@
</span><span class="cx"> force:YES];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (CGFloat)_contentZoomScale
-{
- return contentZoomScale(self);
-}
-
</del><span class="cx"> - (CGFloat)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale
</span><span class="cx"> {
</span><span class="cx"> WebCore::FloatSize unobscuredContentSize([self _contentRectForUserInteraction].size);
</span><span class="lines">@@ -3076,14 +3081,20 @@
</span><span class="cx"> return [(WKPDFView *)_customContentView.get() suggestedFilename];
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (CGFloat)_viewportMetaTagWidth
</del><ins>+- (BOOL)_allowsDoubleTapGestures
</ins><span class="cx"> {
</span><del>- return _viewportMetaTagWidth;
-}
</del><ins>+ if (_fastClickingIsDisabled)
+ return YES;
</ins><span class="cx">
</span><del>-- (BOOL)_viewportIsUserScalable
-{
- return [_scrollView isZoomEnabled] && [_scrollView minimumZoomScale] < [_scrollView maximumZoomScale];
</del><ins>+ // If the page is not user scalable, we don't allow double tap gestures.
+ if (![_scrollView isZoomEnabled] || [_scrollView minimumZoomScale] >= [_scrollView maximumZoomScale])
+ return NO;
+
+ // For scalable viewports, only disable double tap gestures if the viewport width is device width.
+ if (_viewportMetaTagWidth != WebCore::ViewportArguments::ValueDeviceWidth)
+ return YES;
+
+ return !areEssentiallyEqualAsFloat(contentZoomScale(self), _initialScaleFactor);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (_WKWebViewPrintFormatter *)_webViewPrintFormatter
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewInternalh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewInternal.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -87,10 +87,10 @@
</span><span class="cx"> - (void)_zoomToFocusRect:(WebCore::FloatRect)focusedElementRect selectionRect:(WebCore::FloatRect)selectionRectInDocumentCoordinates fontSize:(float)fontSize minimumScale:(double)minimumScale maximumScale:(double)maximumScale allowScaling:(BOOL)allowScaling forceScroll:(BOOL)forceScroll;
</span><span class="cx"> - (BOOL)_zoomToRect:(WebCore::FloatRect)targetRect withOrigin:(WebCore::FloatPoint)origin fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale minimumScrollDistance:(float)minimumScrollDistance;
</span><span class="cx"> - (void)_zoomOutWithOrigin:(WebCore::FloatPoint)origin animated:(BOOL)animated;
</span><ins>+- (void)_zoomToInitialScaleWithOrigin:(WebCore::FloatPoint)origin animated:(BOOL)animated;
</ins><span class="cx">
</span><span class="cx"> - (void)_setHasCustomContentView:(BOOL)hasCustomContentView loadedMIMEType:(const WTF::String&)mimeType;
</span><span class="cx"> - (void)_didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:(const WTF::String&)suggestedFilename data:(NSData *)data;
</span><del>-- (void)_setViewportMetaTagWidth:(float)newWidth;
</del><span class="cx">
</span><span class="cx"> - (void)_willInvokeUIScrollViewDelegateCallback;
</span><span class="cx"> - (void)_didInvokeUIScrollViewDelegateCallback;
</span><span class="lines">@@ -109,9 +109,7 @@
</span><span class="cx"> - (void)_navigationGestureDidBegin;
</span><span class="cx"> - (void)_navigationGestureDidEnd;
</span><span class="cx">
</span><del>-- (CGFloat)_contentZoomScale;
-- (CGFloat)_targetContentZoomScaleForRect:(const WebCore::FloatRect&)targetRect currentScale:(double)currentScale fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale;
-
</del><ins>+@property (nonatomic, readonly) BOOL _allowsDoubleTapGestures;
</ins><span class="cx"> @property (nonatomic, readonly) UIEdgeInsets _computedContentInset;
</span><span class="cx"> #else
</span><span class="cx"> @property (nonatomic, setter=_setIgnoresNonWheelEvents:) BOOL _ignoresNonWheelEvents;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessAPICocoaWKWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/API/Cocoa/WKWebViewPrivate.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -126,10 +126,6 @@
</span><span class="cx"> // FIXME: This can be removed once WKNavigation's response property is implemented.
</span><span class="cx"> @property (nonatomic, readonly) NSString *_suggestedFilenameForDisplayedPDF;
</span><span class="cx">
</span><del>-// The viewport meta tag width is negative if the value is not defined.
-@property (nonatomic, readonly) CGFloat _viewportMetaTagWidth;
-@property (nonatomic, readonly) BOOL _viewportIsUserScalable;
-
</del><span class="cx"> @property (nonatomic, readonly) _WKWebViewPrintFormatter *_webViewPrintFormatter;
</span><span class="cx">
</span><span class="cx"> - (void)_beginInteractiveObscuredInsetsChange;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessPageClienth"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/PageClient.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/PageClient.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/PageClient.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -277,8 +277,7 @@
</span><span class="cx"> virtual void didUpdateBlockSelectionWithTouch(uint32_t touch, uint32_t flags, float growThreshold, float shrinkThreshold) = 0;
</span><span class="cx"> virtual void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect) = 0;
</span><span class="cx"> virtual void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale) = 0;
</span><del>- virtual void didChangeViewportMetaTagWidth(float) = 0;
- virtual void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale) = 0;
</del><ins>+ virtual void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID) = 0;
</ins><span class="cx"> virtual double minimumZoomScale() const = 0;
</span><span class="cx"> virtual WebCore::FloatRect documentRect() const = 0;
</span><span class="cx"> virtual void overflowScrollViewWillStartPanGesture() = 0;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -519,8 +519,7 @@
</span><span class="cx"> void zoomToRect(WebCore::FloatRect, double minimumScale, double maximumScale);
</span><span class="cx"> void commitPotentialTapFailed();
</span><span class="cx"> void didNotHandleTapAsClick(const WebCore::IntPoint&);
</span><del>- void viewportMetaTagWidthDidChange(float width);
- void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale);
</del><ins>+ void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID);
</ins><span class="cx"> void didFinishDrawingPagesToPDF(const IPC::DataReference&);
</span><span class="cx"> void contentSizeCategoryDidChange(const String& contentSizeCategory);
</span><span class="cx"> void getLookupContextAtPoint(const WebCore::IntPoint&, std::function<void(const String&, CallbackBase::Error)>);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessWebPageProxymessagesin"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/WebPageProxy.messages.in        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -188,8 +188,7 @@
</span><span class="cx"> ZoomToRect(WebCore::FloatRect rect, double minimumScale, double maximumScale)
</span><span class="cx"> CommitPotentialTapFailed()
</span><span class="cx"> DidNotHandleTapAsClick(WebCore::IntPoint point)
</span><del>- ViewportMetaTagWidthDidChange(float width)
- DisableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, WebCore::FloatRect targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
</del><ins>+ DisableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID)
</ins><span class="cx"> DidFinishDrawingPagesToPDF(IPC::DataReference pdfData)
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(GTK)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosPageClientImplIOSh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -133,8 +133,7 @@
</span><span class="cx"> virtual void showPlaybackTargetPicker(bool hasVideo, const WebCore::IntRect& elementRect) override;
</span><span class="cx">
</span><span class="cx"> virtual bool handleRunOpenPanel(WebPageProxy*, WebFrameProxy*, WebOpenPanelParameters*, WebOpenPanelResultListenerProxy*) override;
</span><del>- virtual void didChangeViewportMetaTagWidth(float) override;
- virtual void disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale) override;
</del><ins>+ virtual void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID) override;
</ins><span class="cx"> virtual double minimumZoomScale() const override;
</span><span class="cx"> virtual WebCore::FloatRect documentRect() const override;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosPageClientImplIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/PageClientImplIOS.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -265,17 +265,12 @@
</span><span class="cx"> notImplemented();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void PageClientImpl::didChangeViewportMetaTagWidth(float newWidth)
</del><ins>+void PageClientImpl::disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID)
</ins><span class="cx"> {
</span><del>- [m_webView _setViewportMetaTagWidth:newWidth];
-}
-
-void PageClientImpl::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
-{
- if (!m_webView._viewportIsUserScalable)
</del><ins>+ if (!m_webView._allowsDoubleTapGestures)
</ins><span class="cx"> return;
</span><span class="cx">
</span><del>- [m_contentView _disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:requestID allowsDoubleTapZoom:allowsDoubleTapZoom targetRect:targetRect isReplaced:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale];
</del><ins>+ [m_contentView _disableDoubleTapGesturesDuringTapIfNecessary:requestID];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> double PageClientImpl::minimumZoomScale() const
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosSmartMagnificationControllerh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -48,7 +48,6 @@
</span><span class="cx">
</span><span class="cx"> void handleSmartMagnificationGesture(WebCore::FloatPoint origin);
</span><span class="cx"> void handleResetMagnificationGesture(WebCore::FloatPoint origin);
</span><del>- void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // IPC::MessageReceiver.
</span><span class="lines">@@ -56,6 +55,7 @@
</span><span class="cx">
</span><span class="cx"> void didCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect renderRect, WebCore::FloatRect visibleContentBounds, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
</span><span class="cx"> void magnify(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale);
</span><ins>+ void adjustSmartMagnificationTargetRectAndZoomScales(bool addMagnificationPadding, WebCore::FloatRect& targetRect, double& minimumScale, double& maximumScale);
</ins><span class="cx">
</span><span class="cx"> WebPageProxy& m_webPageProxy;
</span><span class="cx"> WKContentView *m_contentView;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosSmartMagnificationControllermm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/SmartMagnificationController.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -93,7 +93,7 @@
</span><span class="cx"> {
</span><span class="cx"> if (targetRect.isEmpty()) {
</span><span class="cx"> // FIXME: If we don't zoom, send the tap along to text selection (see <rdar://problem/6810344>).
</span><del>- [m_contentView _zoomOutWithOrigin:origin];
</del><ins>+ [m_contentView _zoomToInitialScaleWithOrigin:origin];
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx"> double minimumScale = viewportMinimumScale;
</span><span class="lines">@@ -119,7 +119,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // FIXME: If we still don't zoom, send the tap along to text selection (see <rdar://problem/6810344>).
</span><del>- [m_contentView _zoomOutWithOrigin:origin];
</del><ins>+ [m_contentView _zoomToInitialScaleWithOrigin:origin];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SmartMagnificationController::magnify(FloatPoint origin, FloatRect targetRect, FloatRect visibleContentRect, double viewportMinimumScale, double viewportMaximumScale)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -91,5 +91,6 @@
</span><span class="cx"> - (void)_zoomToFocusRect:(CGRect)rectToFocus selectionRect:(CGRect)selectionRect fontSize:(float)fontSize minimumScale:(double)minimumScale maximumScale:(double)maximumScale allowScaling:(BOOL)allowScaling forceScroll:(BOOL)forceScroll;
</span><span class="cx"> - (BOOL)_zoomToRect:(CGRect)targetRect withOrigin:(CGPoint)origin fitEntireRect:(BOOL)fitEntireRect minimumScale:(double)minimumScale maximumScale:(double)maximumScale minimumScrollDistance:(CGFloat)minimumScrollDistance;
</span><span class="cx"> - (void)_zoomOutWithOrigin:(CGPoint)origin;
</span><ins>+- (void)_zoomToInitialScaleWithOrigin:(CGPoint)origin;
</ins><span class="cx">
</span><span class="cx"> @end
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentView.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -551,6 +551,11 @@
</span><span class="cx"> return [_webView _zoomOutWithOrigin:origin animated:YES];
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (void)_zoomToInitialScaleWithOrigin:(CGPoint)origin
+{
+ return [_webView _zoomToInitialScaleWithOrigin:origin animated:YES];
+}
+
</ins><span class="cx"> - (void)_applicationWillResignActive:(NSNotification*)notification
</span><span class="cx"> {
</span><span class="cx"> _page->applicationWillResignActive();
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -164,6 +164,7 @@
</span><span class="cx"> BOOL _inspectorNodeSearchEnabled;
</span><span class="cx"> BOOL _didAccessoryTabInitiateFocus;
</span><span class="cx"> BOOL _isExpectingFastSingleTapCommit;
</span><ins>+ BOOL _showDebugTapHighlightsForFastClicking;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> @end
</span><span class="lines">@@ -188,7 +189,8 @@
</span><span class="cx"> - (void)_commitPotentialTapFailed;
</span><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><del>-- (void)_disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:(uint64_t)requestID allowsDoubleTapZoom:(bool)allowsDoubleTapZoom targetRect:(WebCore::FloatRect)targetRect isReplaced:(BOOL)isReplacedElement minimumScale:(double)minimumScale maximumScale:(double)maximumScale;
</del><ins>+- (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap;
+- (void)_disableDoubleTapGesturesDuringTapIfNecessary:(uint64_t)requestID;
</ins><span class="cx"> - (void)_startAssistingNode:(const WebKit::AssistedNodeInformation&)information userIsInteracting:(BOOL)userIsInteracting blurPreviousNode:(BOOL)blurPreviousNode userObject:(NSObject <NSSecureCoding> *)userObject;
</span><span class="cx"> - (void)_stopAssistingNode;
</span><span class="cx"> - (void)_selectionChanged;
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -388,6 +388,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>+ _showDebugTapHighlightsForFastClicking = [[NSUserDefaults standardUserDefaults] boolForKey:@"WebKitShowFastClickDebugTapHighlights"];
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> - (void)cleanupInteraction
</span><span class="lines">@@ -752,7 +753,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)_showTapHighlight
</span><span class="cx"> {
</span><del>- if (!highlightedQuadsAreSmallerThanRect(_tapHighlightInformation.quads, _page->unobscuredContentRect()))
</del><ins>+ if (!highlightedQuadsAreSmallerThanRect(_tapHighlightInformation.quads, _page->unobscuredContentRect()) && !_showDebugTapHighlightsForFastClicking)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!_highlightView) {
</span><span class="lines">@@ -772,12 +773,15 @@
</span><span class="cx">
</span><span class="cx"> _isTapHighlightIDValid = NO;
</span><span class="cx">
</span><del>- _tapHighlightInformation.color = color;
</del><span class="cx"> _tapHighlightInformation.quads = highlightedQuads;
</span><span class="cx"> _tapHighlightInformation.topLeftRadius = topLeftRadius;
</span><span class="cx"> _tapHighlightInformation.topRightRadius = topRightRadius;
</span><span class="cx"> _tapHighlightInformation.bottomLeftRadius = bottomLeftRadius;
</span><span class="cx"> _tapHighlightInformation.bottomRightRadius = bottomRightRadius;
</span><ins>+ if (_showDebugTapHighlightsForFastClicking)
+ _tapHighlightInformation.color = [self _tapHighlightColorForFastClick:![_doubleTapGestureRecognizer isEnabled]];
+ else
+ _tapHighlightInformation.color = color;
</ins><span class="cx">
</span><span class="cx"> if (_potentialTapInProgress) {
</span><span class="cx"> _hasTapHighlightForPotentialTap = YES;
</span><span class="lines">@@ -792,41 +796,16 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-- (CGFloat)_fastClickZoomThreshold
</del><ins>+- (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap
</ins><span class="cx"> {
</span><del>- NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
- if (![defaults boolForKey:@"WebKitFastClickingEnabled"])
- return 0;
-
- return [defaults floatForKey:@"WebKitFastClickZoomThreshold"];
</del><ins>+ return _potentialTapInProgress;
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-- (BOOL)_allowDoubleTapToZoomForCurrentZoomScale:(CGFloat)currentZoomScale andTargetZoomScale:(CGFloat)targetZoomScale
</del><ins>+- (void)_disableDoubleTapGesturesDuringTapIfNecessary:(uint64_t)requestID
</ins><span class="cx"> {
</span><del>- CGFloat zoomThreshold = [self _fastClickZoomThreshold];
- if (!zoomThreshold)
- return YES;
-
- CGFloat minimumZoomRatioForDoubleTapToZoomIn = 1 + zoomThreshold;
- CGFloat maximumZoomRatioForDoubleTapToZoomOut = 1 / minimumZoomRatioForDoubleTapToZoomIn;
- CGFloat zoomRatio = targetZoomScale / currentZoomScale;
- return zoomRatio < maximumZoomRatioForDoubleTapToZoomOut || zoomRatio > minimumZoomRatioForDoubleTapToZoomIn;
-}
-
-- (void)_disableDoubleTapGesturesUntilTapIsFinishedIfNecessary:(uint64_t)requestID allowsDoubleTapZoom:(bool)allowsDoubleTapZoom targetRect:(WebCore::FloatRect)targetRect isReplaced:(BOOL)isReplacedElement minimumScale:(double)minimumScale maximumScale:(double)maximumScale
-{
</del><span class="cx"> if (!_potentialTapInProgress || _latestTapID != requestID)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (allowsDoubleTapZoom) {
- // Though the element allows us to zoom in on double tap, we avoid this behavior in favor of fast clicking if the difference in scale is insignificant.
- _smartMagnificationController->adjustSmartMagnificationTargetRectAndZoomScales(!isReplacedElement, targetRect, minimumScale, maximumScale);
- CGFloat currentZoomScale = [_webView _contentZoomScale];
- CGFloat targetZoomScale = [_webView _targetContentZoomScaleForRect:targetRect currentScale:currentZoomScale fitEntireRect:isReplacedElement minimumScale:minimumScale maximumScale:maximumScale];
- if ([self _allowDoubleTapToZoomForCurrentZoomScale:currentZoomScale andTargetZoomScale:targetZoomScale])
- return;
- }
-
</del><span class="cx"> [self _setDoubleTapGesturesEnabled:NO];
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1064,7 +1043,8 @@
</span><span class="cx"> - (void)_finishInteraction
</span><span class="cx"> {
</span><span class="cx"> _isTapHighlightIDValid = NO;
</span><del>- [UIView animateWithDuration:0.1
</del><ins>+ CGFloat tapHighlightFadeDuration = _showDebugTapHighlightsForFastClicking ? 0.25 : 0.1;
+ [UIView animateWithDuration:tapHighlightFadeDuration
</ins><span class="cx"> animations:^{
</span><span class="cx"> [_highlightView layer].opacity = 0;
</span><span class="cx"> }
</span><span class="lines">@@ -1170,7 +1150,7 @@
</span><span class="cx">
</span><span class="cx"> - (void)_endPotentialTapAndEnableDoubleTapGesturesIfNecessary
</span><span class="cx"> {
</span><del>- if (_webView._viewportIsUserScalable)
</del><ins>+ if (_webView._allowsDoubleTapGestures)
</ins><span class="cx"> [self _setDoubleTapGesturesEnabled:YES];
</span><span class="cx">
</span><span class="cx"> _potentialTapInProgress = NO;
</span><span class="lines">@@ -2326,6 +2306,12 @@
</span><span class="cx"> });
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+- (WebCore::Color)_tapHighlightColorForFastClick:(BOOL)forFastClick
+{
+ ASSERT(_showDebugTapHighlightsForFastClicking);
+ return forFastClick ? WebCore::Color(0, 225, 0, 127) : WebCore::Color(225, 0, 0, 127);
+}
+
</ins><span class="cx"> - (void)_setDoubleTapGesturesEnabled:(BOOL)enabled
</span><span class="cx"> {
</span><span class="cx"> if (enabled && ![_doubleTapGestureRecognizer isEnabled]) {
</span><span class="lines">@@ -2335,6 +2321,10 @@
</span><span class="cx"> [_doubleTapGestureRecognizer setDelegate:nil];
</span><span class="cx"> [self _createAndConfigureDoubleTapGestureRecognizer];
</span><span class="cx"> }
</span><ins>+
+ if (_showDebugTapHighlightsForFastClicking && !enabled)
+ _tapHighlightInformation.color = [self _tapHighlightColorForFastClick:YES];
+
</ins><span class="cx"> [_doubleTapGestureRecognizer setEnabled:enabled];
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -914,16 +914,11 @@
</span><span class="cx"> m_uiClient->didNotHandleTapAsClick(point);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::viewportMetaTagWidthDidChange(float width)
</del><ins>+void WebPageProxy::disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID)
</ins><span class="cx"> {
</span><del>- m_pageClient.didChangeViewportMetaTagWidth(width);
</del><ins>+ m_pageClient.disableDoubleTapGesturesDuringTapIfNecessary(requestID);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void WebPageProxy::disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(uint64_t requestID, bool allowsDoubleTapZoom, const WebCore::FloatRect& targetRect, bool isReplacedElement, double minimumScale, double maximumScale)
-{
- m_pageClient.disableDoubleTapGesturesUntilTapIsFinishedIfNecessary(requestID, allowsDoubleTapZoom, targetRect, isReplacedElement, minimumScale, maximumScale);
-}
-
</del><span class="cx"> void WebPageProxy::didFinishDrawingPagesToPDF(const IPC::DataReference& pdfData)
</span><span class="cx"> {
</span><span class="cx"> m_pageClient.didFinishDrawingPagesToPDF(pdfData);
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageViewGestureGeometryCollectorh"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ViewGestureGeometryCollector.h        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -45,7 +45,6 @@
</span><span class="cx"> ~ViewGestureGeometryCollector();
</span><span class="cx">
</span><span class="cx"> void mainFrameDidLayout();
</span><del>- void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
</del><span class="cx">
</span><span class="cx"> private:
</span><span class="cx"> // IPC::MessageReceiver.
</span><span class="lines">@@ -62,6 +61,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> void dispatchDidCollectGeometryForSmartMagnificationGesture(WebCore::FloatPoint origin, WebCore::FloatRect targetRect, WebCore::FloatRect visibleContentRect, bool isReplacedElement, double viewportMinimumScale, double viewportMaximumScale);
</span><ins>+ void computeZoomInformationForNode(WebCore::Node&, WebCore::FloatPoint& origin, WebCore::FloatRect& renderRect, bool& isReplaced, double& viewportMinimumScale, double& viewportMaximumScale);
</ins><span class="cx">
</span><span class="cx"> WebPage& m_webPage;
</span><span class="cx">
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -2951,6 +2951,8 @@
</span><span class="cx"> layerTransaction.setScaleWasSetByUIProcess(scaleWasSetByUIProcess());
</span><span class="cx"> layerTransaction.setMinimumScaleFactor(m_viewportConfiguration.minimumScale());
</span><span class="cx"> layerTransaction.setMaximumScaleFactor(m_viewportConfiguration.maximumScale());
</span><ins>+ layerTransaction.setInitialScaleFactor(m_viewportConfiguration.initialScale());
+ layerTransaction.setViewportMetaTagWidth(m_viewportConfiguration.viewportArguments().width);
</ins><span class="cx"> layerTransaction.setAllowsUserScaling(allowsUserScaling());
</span><span class="cx"> #endif
</span><span class="cx"> #if PLATFORM(MAC)
</span></span></pre></div>
<a id="branchessafari601146branchSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (193572 => 193573)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-06 07:58:39 UTC (rev 193572)
+++ branches/safari-601.1.46-branch/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-12-06 08:09:14 UTC (rev 193573)
</span><span class="lines">@@ -233,13 +233,8 @@
</span><span class="cx"> if (m_viewportConfiguration.viewportArguments() == viewportArguments)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- float oldWidth = m_viewportConfiguration.viewportArguments().width;
-
</del><span class="cx"> m_viewportConfiguration.setViewportArguments(viewportArguments);
</span><span class="cx"> viewportConfigurationChanged();
</span><del>-
- if (oldWidth != viewportArguments.width)
- send(Messages::WebPageProxy::ViewportMetaTagWidthDidChange(viewportArguments.width));
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::didReceiveMobileDocType(bool isMobileDoctype)
</span><span class="lines">@@ -662,22 +657,10 @@
</span><span class="cx"> {
</span><span class="cx"> m_potentialTapNode = m_page->mainFrame().nodeRespondingToClickEvents(position, m_potentialTapLocation);
</span><span class="cx"> sendTapHighlightForNodeIfNecessary(requestID, m_potentialTapNode.get());
</span><del>- if (m_potentialTapNode) {
</del><span class="cx"> #if ENABLE(TOUCH_EVENTS)
</span><del>- if (!m_potentialTapNode->allowsDoubleTapGesture()) {
- send(Messages::WebPageProxy::DisableDoubleTapGesturesUntilTapIsFinishedIfNecessary(requestID, false, FloatRect(), false, 0, 0));
- return;
- }
</del><ins>+ if (m_potentialTapNode && !m_potentialTapNode->allowsDoubleTapGesture())
+ send(Messages::WebPageProxy::DisableDoubleTapGesturesDuringTapIfNecessary(requestID));
</ins><span class="cx"> #endif
</span><del>- FloatPoint origin = position;
- FloatRect renderRect;
- bool isReplaced;
- double viewportMinimumScale;
- double viewportMaximumScale;
-
- m_viewGestureGeometryCollector.computeZoomInformationForNode(*m_potentialTapNode.get(), origin, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale);
- send(Messages::WebPageProxy::DisableDoubleTapGesturesUntilTapIsFinishedIfNecessary(requestID, true, renderRect, isReplaced, viewportMinimumScale, viewportMaximumScale));
- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void WebPage::commitPotentialTap(uint64_t lastLayerTreeTransactionId)
</span></span></pre>
</div>
</div>
</body>
</html>