<!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>[203085] trunk/Source</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/203085">203085</a></dd>
<dt>Author</dt> <dd>enrica@apple.com</dd>
<dt>Date</dt> <dd>2016-07-11 14:34:36 -0700 (Mon, 11 Jul 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Add synthetic click origin to WKNavigationAction.
https://bugs.webkit.org/show_bug.cgi?id=159584
rdar://problem/25610422

Reviewed by Tim Horton.

Source/WebCore:

Adding plumbing code to pass synthetic click type
through WebCore.

* dom/Element.cpp:
(WebCore::Element::dispatchMouseEvent):
(WebCore::Element::dispatchMouseForceWillBegin):
* dom/MouseEvent.cpp:
(WebCore::MouseEvent::create):
(WebCore::MouseEvent::MouseEvent):
(WebCore::MouseEvent::initMouseEvent):
(WebCore::MouseEvent::cloneFor):
* dom/MouseEvent.h:
(WebCore::MouseEvent::createForBindings):
(WebCore::MouseEvent::button):
(WebCore::MouseEvent::syntheticClickType):
(WebCore::MouseEvent::buttonDown):
(WebCore::MouseEvent::setRelatedTarget):
* dom/SimulatedClick.cpp:
* dom/WheelEvent.cpp:
(WebCore::WheelEvent::WheelEvent):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::showContextMenuAt):
* page/DragController.cpp:
(WebCore::createMouseEvent):
(WebCore::DragController::DragController):
* page/EventHandler.cpp:
(WebCore::EventHandler::dispatchDragEvent):
(WebCore::EventHandler::sendContextMenuEventForKey):
(WebCore::EventHandler::fakeMouseMoveEventTimerFired):
* platform/PlatformMouseEvent.h:
(WebCore::PlatformMouseEvent::PlatformMouseEvent):
(WebCore::PlatformMouseEvent::clickCount):
(WebCore::PlatformMouseEvent::modifierFlags):
(WebCore::PlatformMouseEvent::force):
(WebCore::PlatformMouseEvent::syntheticClickType):
* replay/SerializationMethods.cpp:
(JSC::EncodingTraits&lt;PlatformMouseEvent&gt;::decodeValue):

Source/WebKit/ios:

* WebView/WebPDFViewPlaceholder.mm:
(-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):

Source/WebKit/mac:

* WebView/WebFrame.mm:
(-[WebFrame _dragSourceEndedAt:operation:]):
* WebView/WebPDFView.mm:
(-[WebPDFView PDFViewWillClickOnLink:withURL:]):

Source/WebKit/win:

* WebDropSource.cpp:
(generateMouseEvent):

Source/WebKit2:

Adds a private property to WKNavigationAction to retrieve
the origin of the synthetic click.

* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
* Shared/WebEvent.h:
(WebKit::WebMouseEvent::button):
(WebKit::WebMouseEvent::menuTypeForEvent):
(WebKit::WebMouseEvent::force):
(WebKit::WebMouseEvent::syntheticClickType):
* Shared/WebMouseEvent.cpp:
(WebKit::WebMouseEvent::WebMouseEvent):
(WebKit::WebMouseEvent::encode):
(WebKit::WebMouseEvent::decode):
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebMouseEvent):
(WebKit::WebEventFactory::createWebWheelEvent):
* UIProcess/API/APINavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
(toWKSyntheticClickType):
(-[WKNavigationAction description]):
(-[WKNavigationAction sourceFrame]):
(-[WKNavigationAction request]):
(-[WKNavigationAction _syntheticClickType]):
(-[WKNavigationAction modifierFlags]):
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _twoFingerSingleTapGestureRecognized:]):
(-[WKContentView _longPressRecognized:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::getSelectionContext):
(WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
(WebKit::WebPageProxy::selectWithTwoTouches):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
(WebKit::mouseButtonForMouseEvent):
(WebKit::syntheticClickTypeForMouseEvent):
(WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
(WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction):
(WebKit::InjectedBundleNavigationAction::syntheticClickTypeForNavigationAction):
(WebKit::InjectedBundleNavigationAction::create):
(WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
* WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
(WebKit::InjectedBundleNavigationAction::navigationType):
(WebKit::InjectedBundleNavigationAction::modifiers):
(WebKit::InjectedBundleNavigationAction::mouseButton):
(WebKit::InjectedBundleNavigationAction::hitTestResult):
(WebKit::InjectedBundleNavigationAction::formElement):
(WebKit::InjectedBundleNavigationAction::syntheticClickType):
(WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
(WebKit::InjectedBundleNavigationAction::shouldTryAppLinks):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::WebPage::dragEnded):
(WebKit::WebPage::simulateMouseDown):
(WebKit::WebPage::simulateMouseUp):
(WebKit::WebPage::simulateMouseMotion):
(WebKit::WebPage::setCompositionForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
(WebKit::WebPage::completeSyntheticClick):
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
(WebKit::WebPage::handleTwoFingerTapAtPoint):
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::inspectorNodeSearchMovedToPosition):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomElementcpp">trunk/Source/WebCore/dom/Element.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMouseEventcpp">trunk/Source/WebCore/dom/MouseEvent.cpp</a></li>
<li><a href="#trunkSourceWebCoredomMouseEventh">trunk/Source/WebCore/dom/MouseEvent.h</a></li>
<li><a href="#trunkSourceWebCoredomSimulatedClickcpp">trunk/Source/WebCore/dom/SimulatedClick.cpp</a></li>
<li><a href="#trunkSourceWebCoredomWheelEventcpp">trunk/Source/WebCore/dom/WheelEvent.cpp</a></li>
<li><a href="#trunkSourceWebCorepageContextMenuControllercpp">trunk/Source/WebCore/page/ContextMenuController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCorepageEventHandlercpp">trunk/Source/WebCore/page/EventHandler.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformPlatformMouseEventh">trunk/Source/WebCore/platform/PlatformMouseEvent.h</a></li>
<li><a href="#trunkSourceWebCorereplaySerializationMethodscpp">trunk/Source/WebCore/replay/SerializationMethods.cpp</a></li>
<li><a href="#trunkSourceWebKitiosChangeLog">trunk/Source/WebKit/ios/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitiosWebViewWebPDFViewPlaceholdermm">trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebFramemm">trunk/Source/WebKit/mac/WebView/WebFrame.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebPDFViewmm">trunk/Source/WebKit/mac/WebView/WebPDFView.mm</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebDropSourcecpp">trunk/Source/WebKit/win/WebDropSource.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedNavigationActionDatacpp">trunk/Source/WebKit2/Shared/NavigationActionData.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedNavigationActionDatah">trunk/Source/WebKit2/Shared/NavigationActionData.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebEventh">trunk/Source/WebKit2/Shared/WebEvent.h</a></li>
<li><a href="#trunkSourceWebKit2SharedWebMouseEventcpp">trunk/Source/WebKit2/Shared/WebMouseEvent.cpp</a></li>
<li><a href="#trunkSourceWebKit2SharedmacWebEventFactorymm">trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPIAPINavigationActionh">trunk/Source/WebKit2/UIProcess/API/APINavigationAction.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionPrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionPrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessWebPageProxyh">trunk/Source/WebKit2/UIProcess/WebPageProxy.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm">trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm">trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleNavigationActioncpp">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleNavigationActionh">trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagecpp">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPageh">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageWebPagemessagesin">trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/ChangeLog        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1,3 +1,49 @@
</span><ins>+2016-07-11  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Add synthetic click origin to WKNavigationAction.
+        https://bugs.webkit.org/show_bug.cgi?id=159584
+        rdar://problem/25610422
+
+        Reviewed by Tim Horton.
+
+        Adding plumbing code to pass synthetic click type
+        through WebCore.
+
+        * dom/Element.cpp:
+        (WebCore::Element::dispatchMouseEvent):
+        (WebCore::Element::dispatchMouseForceWillBegin):
+        * dom/MouseEvent.cpp:
+        (WebCore::MouseEvent::create):
+        (WebCore::MouseEvent::MouseEvent):
+        (WebCore::MouseEvent::initMouseEvent):
+        (WebCore::MouseEvent::cloneFor):
+        * dom/MouseEvent.h:
+        (WebCore::MouseEvent::createForBindings):
+        (WebCore::MouseEvent::button):
+        (WebCore::MouseEvent::syntheticClickType):
+        (WebCore::MouseEvent::buttonDown):
+        (WebCore::MouseEvent::setRelatedTarget):
+        * dom/SimulatedClick.cpp:
+        * dom/WheelEvent.cpp:
+        (WebCore::WheelEvent::WheelEvent):
+        * page/ContextMenuController.cpp:
+        (WebCore::ContextMenuController::showContextMenuAt):
+        * page/DragController.cpp:
+        (WebCore::createMouseEvent):
+        (WebCore::DragController::DragController):
+        * page/EventHandler.cpp:
+        (WebCore::EventHandler::dispatchDragEvent):
+        (WebCore::EventHandler::sendContextMenuEventForKey):
+        (WebCore::EventHandler::fakeMouseMoveEventTimerFired):
+        * platform/PlatformMouseEvent.h:
+        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
+        (WebCore::PlatformMouseEvent::clickCount):
+        (WebCore::PlatformMouseEvent::modifierFlags):
+        (WebCore::PlatformMouseEvent::force):
+        (WebCore::PlatformMouseEvent::syntheticClickType):
+        * replay/SerializationMethods.cpp:
+        (JSC::EncodingTraits&lt;PlatformMouseEvent&gt;::decodeValue):
+
</ins><span class="cx"> 2016-07-11  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Able to open multiple payment sheets in Safari at the same time
</span></span></pre></div>
<a id="trunkSourceWebCoredomElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Element.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Element.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/dom/Element.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx">             mouseEvent-&gt;bubbles(), mouseEvent-&gt;cancelable(), mouseEvent-&gt;view(), mouseEvent-&gt;detail(),
</span><span class="cx">             mouseEvent-&gt;screenX(), mouseEvent-&gt;screenY(), mouseEvent-&gt;clientX(), mouseEvent-&gt;clientY(),
</span><span class="cx">             mouseEvent-&gt;ctrlKey(), mouseEvent-&gt;altKey(), mouseEvent-&gt;shiftKey(), mouseEvent-&gt;metaKey(),
</span><del>-            mouseEvent-&gt;button(), relatedTarget);
</del><ins>+            mouseEvent-&gt;button(), mouseEvent-&gt;syntheticClickType(), relatedTarget);
</ins><span class="cx"> 
</span><span class="cx">         if (mouseEvent-&gt;defaultHandled())
</span><span class="cx">             doubleClickEvent-&gt;setDefaultHandled();
</span><span class="lines">@@ -2372,7 +2372,7 @@
</span><span class="cx">     if (!frame)
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><del>-    PlatformMouseEvent platformMouseEvent(frame-&gt;eventHandler().lastKnownMousePosition(), frame-&gt;eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick);
</del><ins>+    PlatformMouseEvent platformMouseEvent(frame-&gt;eventHandler().lastKnownMousePosition(), frame-&gt;eventHandler().lastKnownMouseGlobalPosition(), NoButton, PlatformEvent::NoType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick, NoTap);
</ins><span class="cx">     Ref&lt;MouseEvent&gt; mouseForceWillBeginEvent =  MouseEvent::create(eventNames().webkitmouseforcewillbeginEvent, document().defaultView(), platformMouseEvent, 0, nullptr);
</span><span class="cx">     mouseForceWillBeginEvent-&gt;setTarget(this);
</span><span class="cx">     dispatchEvent(mouseForceWillBeginEvent);
</span></span></pre></div>
<a id="trunkSourceWebCoredomMouseEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MouseEvent.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MouseEvent.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/dom/MouseEvent.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -50,7 +50,7 @@
</span><span class="cx">         event.movementDelta().x(), event.movementDelta().y(),
</span><span class="cx"> #endif
</span><span class="cx">         event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), event.button(),
</span><del>-        relatedTarget, event.force());
</del><ins>+        relatedTarget, event.force(), event.syntheticClickType());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;MouseEvent&gt; MouseEvent::create(const AtomicString&amp; type, bool canBubble, bool cancelable, double timestamp, AbstractView* view, int detail, int screenX, int screenY, int pageX, int pageY,
</span><span class="lines">@@ -57,7 +57,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">     int movementX, int movementY,
</span><span class="cx"> #endif
</span><del>-    bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force)
</del><ins>+    bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType)
</ins><span class="cx"> 
</span><span class="cx"> {
</span><span class="cx">     return MouseEvent::create(type, canBubble, cancelable, timestamp, view,
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">         movementX, movementY,
</span><span class="cx"> #endif
</span><del>-        ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, 0, false);
</del><ins>+        ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, syntheticClickType, 0, false);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> Ref&lt;MouseEvent&gt; MouseEvent::create(const AtomicString&amp; type, bool canBubble, bool cancelable, double timestamp, AbstractView* view, int detail, int screenX, int screenY, int pageX, int pageY,
</span><span class="lines">@@ -72,7 +72,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">     int movementX, int movementY,
</span><span class="cx"> #endif
</span><del>-    bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, PassRefPtr&lt;DataTransfer&gt; dataTransfer, bool isSimulated)
</del><ins>+    bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType, PassRefPtr&lt;DataTransfer&gt; dataTransfer, bool isSimulated)
</ins><span class="cx"> {
</span><span class="cx">     return adoptRef(*new MouseEvent(type, canBubble, cancelable, timestamp, view,
</span><span class="cx">         detail, screenX, screenY, pageX, pageY,
</span><span class="lines">@@ -79,12 +79,12 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">         movementX, movementY,
</span><span class="cx"> #endif
</span><del>-        ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, dataTransfer, isSimulated));
</del><ins>+        ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget, force, syntheticClickType, dataTransfer, isSimulated));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-Ref&lt;MouseEvent&gt; MouseEvent::create(const AtomicString&amp; eventType, bool canBubble, bool cancelable, AbstractView* view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget)
</del><ins>+Ref&lt;MouseEvent&gt; MouseEvent::create(const AtomicString&amp; eventType, bool canBubble, bool cancelable, AbstractView* view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short syntheticClickType, PassRefPtr&lt;EventTarget&gt; relatedTarget)
</ins><span class="cx"> {
</span><del>-    return adoptRef(*new MouseEvent(eventType, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, relatedTarget));
</del><ins>+    return adoptRef(*new MouseEvent(eventType, canBubble, cancelable, view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey, metaKey, button, syntheticClickType, relatedTarget));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> MouseEvent::MouseEvent()
</span><span class="lines">@@ -99,7 +99,7 @@
</span><span class="cx">                        int movementX, int movementY,
</span><span class="cx"> #endif
</span><span class="cx">                        bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
</span><del>-                       unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force,
</del><ins>+                       unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType,
</ins><span class="cx">                        PassRefPtr&lt;DataTransfer&gt; dataTransfer, bool isSimulated)
</span><span class="cx">     : MouseRelatedEvent(eventType, canBubble, cancelable, timestamp, view, detail, IntPoint(screenX, screenY),
</span><span class="cx">                         IntPoint(pageX, pageY),
</span><span class="lines">@@ -108,6 +108,7 @@
</span><span class="cx"> #endif
</span><span class="cx">                         ctrlKey, altKey, shiftKey, metaKey, isSimulated)
</span><span class="cx">     , m_button(button == (unsigned short)-1 ? 0 : button)
</span><ins>+    , m_syntheticClickType(button == (unsigned short)-1 ? 0 : syntheticClickType)
</ins><span class="cx">     , m_buttonDown(button != (unsigned short)-1)
</span><span class="cx">     , m_relatedTarget(relatedTarget)
</span><span class="cx">     , m_force(force)
</span><span class="lines">@@ -115,7 +116,7 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-MouseEvent::MouseEvent(const AtomicString&amp; eventType, bool canBubble, bool cancelable, AbstractView* view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget)
</del><ins>+MouseEvent::MouseEvent(const AtomicString&amp; eventType, bool canBubble, bool cancelable, AbstractView* view, int detail, int screenX, int screenY, int clientX, int clientY, bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button, unsigned short syntheticClickType, PassRefPtr&lt;EventTarget&gt; relatedTarget)
</ins><span class="cx">     : MouseRelatedEvent(eventType, canBubble, cancelable, WTF::currentTime(), view, detail, IntPoint(screenX, screenY), IntPoint(0, 0),
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">         IntPoint(0, 0),
</span><span class="lines">@@ -122,6 +123,7 @@
</span><span class="cx"> #endif
</span><span class="cx">         ctrlKey, altKey, shiftKey, metaKey, false)
</span><span class="cx">     , m_button(button == (unsigned short)-1 ? 0 : button)
</span><ins>+    , m_syntheticClickType(button == (unsigned short)-1 ? 0 : syntheticClickType)
</ins><span class="cx">     , m_buttonDown(button != (unsigned short)-1)
</span><span class="cx">     , m_relatedTarget(relatedTarget)
</span><span class="cx"> {
</span><span class="lines">@@ -158,6 +160,7 @@
</span><span class="cx">     m_shiftKey = shiftKey;
</span><span class="cx">     m_metaKey = metaKey;
</span><span class="cx">     m_button = button == (unsigned short)-1 ? 0 : button;
</span><ins>+    m_syntheticClickType = 0;
</ins><span class="cx">     m_buttonDown = button != (unsigned short)-1;
</span><span class="cx">     m_relatedTarget = relatedTarget;
</span><span class="cx"> 
</span><span class="lines">@@ -245,6 +248,7 @@
</span><span class="cx">         frameView ? adjustedClientY(clientY(), iframe, frameView) : 0,
</span><span class="cx">         ctrlKey(), altKey(), shiftKey(), metaKey(),
</span><span class="cx">         button(),
</span><ins>+        syntheticClickType(),
</ins><span class="cx">         // Nullifies relatedTarget.
</span><span class="cx">         0);
</span><span class="cx">     clonedMouseEvent-&gt;setForce(force());
</span></span></pre></div>
<a id="trunkSourceWebCoredomMouseEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/MouseEvent.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/MouseEvent.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/dom/MouseEvent.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -46,7 +46,7 @@
</span><span class="cx">         int movementX, int movementY,
</span><span class="cx"> #endif
</span><span class="cx">         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
</span><del>-        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force);
</del><ins>+        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;MouseEvent&gt; create(const AtomicString&amp; type, bool canBubble, bool cancelable, double timestamp, AbstractView*,
</span><span class="cx">         int detail, int screenX, int screenY, int pageX, int pageY,
</span><span class="lines">@@ -54,7 +54,7 @@
</span><span class="cx">         int movementX, int movementY,
</span><span class="cx"> #endif
</span><span class="cx">         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
</span><del>-        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, PassRefPtr&lt;DataTransfer&gt;, bool isSimulated = false);
</del><ins>+        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType, PassRefPtr&lt;DataTransfer&gt;, bool isSimulated = false);
</ins><span class="cx"> 
</span><span class="cx">     WEBCORE_EXPORT static Ref&lt;MouseEvent&gt; create(const AtomicString&amp; eventType, AbstractView*, const PlatformMouseEvent&amp;, int detail, PassRefPtr&lt;Node&gt; relatedTarget);
</span><span class="cx"> 
</span><span class="lines">@@ -61,7 +61,7 @@
</span><span class="cx">     static Ref&lt;MouseEvent&gt; create(const AtomicString&amp; eventType, bool canBubble, bool cancelable, AbstractView*,
</span><span class="cx">         int detail, int screenX, int screenY, int clientX, int clientY,
</span><span class="cx">         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
</span><del>-        unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget);
</del><ins>+        unsigned short button, unsigned short syntheticClickType, PassRefPtr&lt;EventTarget&gt; relatedTarget);
</ins><span class="cx"> 
</span><span class="cx">     static Ref&lt;MouseEvent&gt; createForBindings()
</span><span class="cx">     {
</span><span class="lines">@@ -80,6 +80,7 @@
</span><span class="cx">     // WinIE uses 1,4,2 for left/middle/right but not for click (just for mousedown/up, maybe others),
</span><span class="cx">     // but we will match the standard DOM.
</span><span class="cx">     unsigned short button() const { return m_button; }
</span><ins>+    unsigned short syntheticClickType() const { return m_syntheticClickType; }
</ins><span class="cx">     bool buttonDown() const { return m_buttonDown; }
</span><span class="cx">     EventTarget* relatedTarget() const final { return m_relatedTarget.get(); }
</span><span class="cx">     void setRelatedTarget(PassRefPtr&lt;EventTarget&gt; relatedTarget) { m_relatedTarget = relatedTarget; }
</span><span class="lines">@@ -110,12 +111,12 @@
</span><span class="cx">         int movementX, int movementY,
</span><span class="cx"> #endif
</span><span class="cx">         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey, unsigned short button,
</span><del>-        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, PassRefPtr&lt;DataTransfer&gt;, bool isSimulated);
</del><ins>+        PassRefPtr&lt;EventTarget&gt; relatedTarget, double force, unsigned short syntheticClickType, PassRefPtr&lt;DataTransfer&gt;, bool isSimulated);
</ins><span class="cx"> 
</span><span class="cx">     MouseEvent(const AtomicString&amp; type, bool canBubble, bool cancelable, AbstractView*,
</span><span class="cx">         int detail, int screenX, int screenY, int clientX, int clientY,
</span><span class="cx">         bool ctrlKey, bool altKey, bool shiftKey, bool metaKey,
</span><del>-        unsigned short button, PassRefPtr&lt;EventTarget&gt; relatedTarget);
</del><ins>+        unsigned short button, unsigned short syntheticClickType, PassRefPtr&lt;EventTarget&gt; relatedTarget);
</ins><span class="cx"> 
</span><span class="cx">     MouseEvent(const AtomicString&amp; type, const MouseEventInit&amp;);
</span><span class="cx"> 
</span><span class="lines">@@ -123,6 +124,7 @@
</span><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     unsigned short m_button;
</span><ins>+    unsigned short m_syntheticClickType;
</ins><span class="cx">     bool m_buttonDown;
</span><span class="cx">     RefPtr&lt;EventTarget&gt; m_relatedTarget;
</span><span class="cx">     double m_force { 0 };
</span></span></pre></div>
<a id="trunkSourceWebCoredomSimulatedClickcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/SimulatedClick.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/SimulatedClick.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/dom/SimulatedClick.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -49,7 +49,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">                      0, 0,
</span><span class="cx"> #endif
</span><del>-                     false, false, false, false, 0, 0, 0, 0, true)
</del><ins>+                     false, false, false, false, 0, 0, 0, 0, 0, true)
</ins><span class="cx">     {
</span><span class="cx">         if (UIEventWithKeyState* keyStateEvent = findEventWithKeyState(underlyingEvent.get())) {
</span><span class="cx">             m_ctrlKey = keyStateEvent-&gt;ctrlKey();
</span></span></pre></div>
<a id="trunkSourceWebCoredomWheelEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/WheelEvent.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/WheelEvent.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/dom/WheelEvent.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">                 , 0, 0
</span><span class="cx"> #endif
</span><del>-                , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, 0, false)
</del><ins>+                , event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(), 0, 0, 0, 0, 0, false)
</ins><span class="cx">     , m_wheelDelta(event.wheelTicksX() * TickMultiplier, event.wheelTicksY() * TickMultiplier)
</span><span class="cx">     , m_deltaX(-event.deltaX())
</span><span class="cx">     , m_deltaY(-event.deltaY())
</span></span></pre></div>
<a id="trunkSourceWebCorepageContextMenuControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/ContextMenuController.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/ContextMenuController.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/page/ContextMenuController.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1434,7 +1434,7 @@
</span><span class="cx">     clearContextMenu();
</span><span class="cx">     
</span><span class="cx">     // Simulate a click in the middle of the accessibility object.
</span><del>-    PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), ForceAtClick);
</del><ins>+    PlatformMouseEvent mouseEvent(clickPoint, clickPoint, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), ForceAtClick, NoTap);
</ins><span class="cx">     frame-&gt;eventHandler().handleMousePressEvent(mouseEvent);
</span><span class="cx">     bool handled = frame-&gt;eventHandler().sendContextMenuEvent(mouseEvent);
</span><span class="cx">     if (handled)
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/page/DragController.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> 
</span><span class="cx">     return PlatformMouseEvent(dragData.clientPosition(), dragData.globalPosition(),
</span><span class="cx">                               LeftButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey,
</span><del>-                              metaKey, currentTime(), ForceAtClick);
</del><ins>+                              metaKey, currentTime(), ForceAtClick, NoTap);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> DragController::DragController(Page&amp; page, DragClient&amp; client)
</span></span></pre></div>
<a id="trunkSourceWebCorepageEventHandlercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/EventHandler.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/EventHandler.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/page/EventHandler.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -2131,7 +2131,7 @@
</span><span class="cx">         event.movementDelta().x(), event.movementDelta().y(),
</span><span class="cx"> #endif
</span><span class="cx">         event.ctrlKey(), event.altKey(), event.shiftKey(), event.metaKey(),
</span><del>-        0, 0, event.force(), dataTransfer);
</del><ins>+        0, 0, event.force(), NoTap, dataTransfer);
</ins><span class="cx"> 
</span><span class="cx">     dragTarget.dispatchEvent(me);
</span><span class="cx">     return me-&gt;defaultPrevented();
</span><span class="lines">@@ -2855,7 +2855,7 @@
</span><span class="cx">     PlatformEvent::Type eventType = PlatformEvent::MousePressed;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick);
</del><ins>+    PlatformMouseEvent platformMouseEvent(position, globalPosition, RightButton, eventType, 1, false, false, false, false, WTF::currentTime(), ForceAtClick, NoTap);
</ins><span class="cx"> 
</span><span class="cx">     return !dispatchMouseEvent(eventNames().contextmenuEvent, targetNode, true, 0, platformMouseEvent, false);
</span><span class="cx"> }
</span><span class="lines">@@ -2937,7 +2937,7 @@
</span><span class="cx">     bool altKey;
</span><span class="cx">     bool metaKey;
</span><span class="cx">     PlatformKeyboardEvent::getCurrentModifierState(shiftKey, ctrlKey, altKey, metaKey);
</span><del>-    PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime(), 0);
</del><ins>+    PlatformMouseEvent fakeMouseMoveEvent(m_lastKnownMousePosition, m_lastKnownMouseGlobalPosition, NoButton, PlatformEvent::MouseMoved, 0, shiftKey, ctrlKey, altKey, metaKey, currentTime(), 0, NoTap);
</ins><span class="cx">     mouseMoved(fakeMouseMoveEvent);
</span><span class="cx"> }
</span><span class="cx"> #endif // !ENABLE(IOS_TOUCH_EVENTS)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformPlatformMouseEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/PlatformMouseEvent.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/PlatformMouseEvent.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/platform/PlatformMouseEvent.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -48,6 +48,7 @@
</span><span class="cx"> 
</span><span class="cx">     // These button numbers match the ones used in the DOM API, 0 through 2, except for NoButton which isn't specified.
</span><span class="cx">     enum MouseButton : int8_t { NoButton = -1, LeftButton, MiddleButton, RightButton };
</span><ins>+    enum SyntheticClickType : int8_t { NoTap, OneFingerTap, TwoFingerTap };
</ins><span class="cx"> 
</span><span class="cx">     class PlatformMouseEvent : public PlatformEvent {
</span><span class="cx">     public:
</span><span class="lines">@@ -66,7 +67,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         PlatformMouseEvent(const IntPoint&amp; position, const IntPoint&amp; globalPosition, MouseButton button, PlatformEvent::Type type,
</span><del>-                           int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp, double force)
</del><ins>+                           int clickCount, bool shiftKey, bool ctrlKey, bool altKey, bool metaKey, double timestamp, double force, SyntheticClickType syntheticClickType)
</ins><span class="cx">             : PlatformEvent(type, shiftKey, ctrlKey, altKey, metaKey, timestamp)
</span><span class="cx">             , m_position(position)
</span><span class="cx">             , m_globalPosition(globalPosition)
</span><span class="lines">@@ -74,6 +75,7 @@
</span><span class="cx">             , m_clickCount(clickCount)
</span><span class="cx">             , m_modifierFlags(0)
</span><span class="cx">             , m_force(force)
</span><ins>+            , m_syntheticClickType(syntheticClickType)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">             , m_eventNumber(0)
</span><span class="cx">             , m_menuTypeForEvent(0)
</span><span class="lines">@@ -93,7 +95,7 @@
</span><span class="cx">         int clickCount() const { return m_clickCount; }
</span><span class="cx">         unsigned modifierFlags() const { return m_modifierFlags; }
</span><span class="cx">         double force() const { return m_force; }
</span><del>-        
</del><ins>+        SyntheticClickType syntheticClickType() const { return m_syntheticClickType; }
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(GTK) 
</span><span class="cx">         explicit PlatformMouseEvent(GdkEventButton*);
</span><span class="lines">@@ -129,6 +131,7 @@
</span><span class="cx">         int m_clickCount;
</span><span class="cx">         unsigned m_modifierFlags;
</span><span class="cx">         double m_force { 0 };
</span><ins>+        SyntheticClickType m_syntheticClickType { NoTap };
</ins><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">         int m_eventNumber;
</span></span></pre></div>
<a id="trunkSourceWebCorereplaySerializationMethodscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/replay/SerializationMethods.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/replay/SerializationMethods.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebCore/replay/SerializationMethods.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -338,7 +338,7 @@
</span><span class="cx">     input = std::make_unique&lt;PlatformMouseEvent&gt;(IntPoint(positionX, positionY),
</span><span class="cx">         IntPoint(globalPositionX, globalPositionY),
</span><span class="cx">         button, type, clickCount,
</span><del>-        shiftKey, ctrlKey, altKey, metaKey, timestamp, force);
</del><ins>+        shiftKey, ctrlKey, altKey, metaKey, timestamp, force, WebCore::NoTap);
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitiosChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/ChangeLog (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/ChangeLog        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/ios/ChangeLog        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-07-11  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Add synthetic click origin to WKNavigationAction.
+        https://bugs.webkit.org/show_bug.cgi?id=159584
+        rdar://problem/25610422
+
+        Reviewed by Tim Horton.
+
+        * WebView/WebPDFViewPlaceholder.mm:
+        (-[WebPDFViewPlaceholder simulateClickOnLinkToURL:]):
+
</ins><span class="cx"> 2016-06-23  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Remove unused didCancelAuthenticationChallenge
</span></span></pre></div>
<a id="trunkSourceWebKitiosWebViewWebPDFViewPlaceholdermm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/ios/WebView/WebPDFViewPlaceholder.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -471,7 +471,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">         0, 0,
</span><span class="cx"> #endif
</span><del>-        false, false, false, false, 0, 0, 0, 0, true);
</del><ins>+        false, false, false, false, 0, 0, 0, 0, 0, true);
</ins><span class="cx"> 
</span><span class="cx">     // Call to the frame loader because this is where our security checks are made.
</span><span class="cx">     Frame* frame = core([_dataSource webFrame]);
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/mac/ChangeLog        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2016-07-11  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Add synthetic click origin to WKNavigationAction.
+        https://bugs.webkit.org/show_bug.cgi?id=159584
+        rdar://problem/25610422
+
+        Reviewed by Tim Horton.
+
+        * WebView/WebFrame.mm:
+        (-[WebFrame _dragSourceEndedAt:operation:]):
+        * WebView/WebPDFView.mm:
+        (-[WebPDFView PDFViewWillClickOnLink:withURL:]):
+
</ins><span class="cx"> 2016-07-11  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Able to open multiple payment sheets in Safari at the same time
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebFramemm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebFrame.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebFrame.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/mac/WebView/WebFrame.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -977,7 +977,7 @@
</span><span class="cx">         return;
</span><span class="cx">     // FIXME: These are fake modifier keys here, but they should be real ones instead.
</span><span class="cx">     PlatformMouseEvent event(IntPoint(windowLoc), IntPoint(globalPoint(windowLoc, [view-&gt;platformWidget() window])),
</span><del>-        LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), WebCore::ForceAtClick);
</del><ins>+                             LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), WebCore::ForceAtClick, WebCore::NoTap);
</ins><span class="cx">     _private-&gt;coreFrame-&gt;eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebPDFViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebPDFView.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebPDFView.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/mac/WebView/WebPDFView.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1042,7 +1042,7 @@
</span><span class="cx">             [nsEvent modifierFlags] &amp; NSShiftKeyMask,
</span><span class="cx">             [nsEvent modifierFlags] &amp; NSCommandKeyMask,
</span><span class="cx"> #pragma clang diagnostic pop
</span><del>-            button, 0, WebCore::ForceAtClick, 0, true);
</del><ins>+            button, 0, WebCore::ForceAtClick, 0, 0, true);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Call to the frame loader because this is where our security checks are made.
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/win/ChangeLog        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2016-07-11  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Add synthetic click origin to WKNavigationAction.
+        https://bugs.webkit.org/show_bug.cgi?id=159584
+        rdar://problem/25610422
+
+        Reviewed by Tim Horton.
+
+        * WebDropSource.cpp:
+        (generateMouseEvent):
+
</ins><span class="cx"> 2016-07-07  Alex Christensen  &lt;achristensen@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Fix Windows build after r202930.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebDropSourcecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebDropSource.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebDropSource.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit/win/WebDropSource.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     if (SUCCEEDED(webView-&gt;viewWindow(&amp;viewWindow)))
</span><span class="cx">         ::ScreenToClient(viewWindow, reinterpret_cast&lt;LPPOINT&gt;(&amp;localpt));
</span><span class="cx">     return PlatformMouseEvent(IntPoint(localpt.x, localpt.y), IntPoint(pt.x, pt.y),
</span><del>-        isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0);
</del><ins>+        isDrag ? LeftButton : NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0, 0);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> STDMETHODIMP WebDropSource::QueryContinueDrag(_In_ BOOL fEscapePressed, _In_ DWORD grfKeyState)
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/ChangeLog        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1,3 +1,89 @@
</span><ins>+2016-07-11  Enrica Casucci  &lt;enrica@apple.com&gt;
+
+        Add synthetic click origin to WKNavigationAction.
+        https://bugs.webkit.org/show_bug.cgi?id=159584
+        rdar://problem/25610422
+
+        Reviewed by Tim Horton.
+
+        Adds a private property to WKNavigationAction to retrieve
+        the origin of the synthetic click.
+
+        * Shared/NavigationActionData.cpp:
+        (WebKit::NavigationActionData::encode):
+        (WebKit::NavigationActionData::decode):
+        * Shared/NavigationActionData.h:
+        * Shared/WebEvent.h:
+        (WebKit::WebMouseEvent::button):
+        (WebKit::WebMouseEvent::menuTypeForEvent):
+        (WebKit::WebMouseEvent::force):
+        (WebKit::WebMouseEvent::syntheticClickType):
+        * Shared/WebMouseEvent.cpp:
+        (WebKit::WebMouseEvent::WebMouseEvent):
+        (WebKit::WebMouseEvent::encode):
+        (WebKit::WebMouseEvent::decode):
+        * Shared/mac/WebEventFactory.mm:
+        (WebKit::WebEventFactory::createWebMouseEvent):
+        (WebKit::WebEventFactory::createWebWheelEvent):
+        * UIProcess/API/APINavigationAction.h:
+        * UIProcess/API/Cocoa/WKNavigationAction.mm:
+        (toWKNavigationType):
+        (toWKSyntheticClickType):
+        (-[WKNavigationAction description]):
+        (-[WKNavigationAction sourceFrame]):
+        (-[WKNavigationAction request]):
+        (-[WKNavigationAction _syntheticClickType]):
+        (-[WKNavigationAction modifierFlags]):
+        * UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
+        * UIProcess/WebPageProxy.h:
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _twoFingerSingleTapGestureRecognized:]):
+        (-[WKContentView _longPressRecognized:]):
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::getSelectionContext):
+        (WebKit::WebPageProxy::handleTwoFingerTapAtPoint):
+        (WebKit::WebPageProxy::selectWithTwoTouches):
+        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp:
+        (WebKit::mouseButtonForMouseEvent):
+        (WebKit::syntheticClickTypeForMouseEvent):
+        (WebKit::InjectedBundleNavigationAction::modifiersForNavigationAction):
+        (WebKit::InjectedBundleNavigationAction::mouseButtonForNavigationAction):
+        (WebKit::InjectedBundleNavigationAction::syntheticClickTypeForNavigationAction):
+        (WebKit::InjectedBundleNavigationAction::create):
+        (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction):
+        * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h:
+        (WebKit::InjectedBundleNavigationAction::navigationType):
+        (WebKit::InjectedBundleNavigationAction::modifiers):
+        (WebKit::InjectedBundleNavigationAction::mouseButton):
+        (WebKit::InjectedBundleNavigationAction::hitTestResult):
+        (WebKit::InjectedBundleNavigationAction::formElement):
+        (WebKit::InjectedBundleNavigationAction::syntheticClickType):
+        (WebKit::InjectedBundleNavigationAction::shouldOpenExternalURLs):
+        (WebKit::InjectedBundleNavigationAction::shouldTryAppLinks):
+        * WebProcess/WebCoreSupport/WebChromeClient.cpp:
+        (WebKit::WebChromeClient::createWindow):
+        * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
+        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
+        (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::navigateToPDFLinkWithSimulatedClick):
+        (WebKit::WebPage::contextMenuAtPointInWindow):
+        (WebKit::WebPage::dragEnded):
+        (WebKit::WebPage::simulateMouseDown):
+        (WebKit::WebPage::simulateMouseUp):
+        (WebKit::WebPage::simulateMouseMotion):
+        (WebKit::WebPage::setCompositionForTesting):
+        * WebProcess/WebPage/WebPage.h:
+        * WebProcess/WebPage/WebPage.messages.in:
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::handleSyntheticClick):
+        (WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
+        (WebKit::WebPage::completeSyntheticClick):
+        (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
+        (WebKit::WebPage::handleTwoFingerTapAtPoint):
+        (WebKit::WebPage::potentialTapAtPosition):
+        (WebKit::WebPage::inspectorNodeSearchMovedToPosition):
+
</ins><span class="cx"> 2016-07-11  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Able to open multiple payment sheets in Safari at the same time
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNavigationActionDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NavigationActionData.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NavigationActionData.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/Shared/NavigationActionData.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -39,6 +39,7 @@
</span><span class="cx">     encoder.encodeEnum(navigationType);
</span><span class="cx">     encoder.encodeEnum(modifiers);
</span><span class="cx">     encoder.encodeEnum(mouseButton);
</span><ins>+    encoder.encodeEnum(syntheticClickType);
</ins><span class="cx">     encoder &lt;&lt; isProcessingUserGesture;
</span><span class="cx">     encoder &lt;&lt; canHandleRequest;
</span><span class="cx">     encoder.encodeEnum(shouldOpenExternalURLsPolicy);
</span><span class="lines">@@ -53,6 +54,8 @@
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decodeEnum(result.mouseButton))
</span><span class="cx">         return false;
</span><ins>+    if (!decoder.decodeEnum(result.syntheticClickType))
+        return false;
</ins><span class="cx">     if (!decoder.decode(result.isProcessingUserGesture))
</span><span class="cx">         return false;
</span><span class="cx">     if (!decoder.decode(result.canHandleRequest))
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedNavigationActionDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/NavigationActionData.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/NavigationActionData.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/Shared/NavigationActionData.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -43,6 +43,7 @@
</span><span class="cx">     WebCore::NavigationType navigationType { WebCore::NavigationType::Other };
</span><span class="cx">     WebEvent::Modifiers modifiers { };
</span><span class="cx">     WebMouseEvent::Button mouseButton { WebMouseEvent::NoButton };
</span><ins>+    WebMouseEvent::SyntheticClickType syntheticClickType { WebMouseEvent::NoTap };
</ins><span class="cx">     bool isProcessingUserGesture { false };
</span><span class="cx">     bool canHandleRequest { false };
</span><span class="cx">     WebCore::ShouldOpenExternalURLsPolicy shouldOpenExternalURLsPolicy { WebCore::ShouldOpenExternalURLsPolicy::ShouldNotAllow };
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebEventh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebEvent.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebEvent.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/Shared/WebEvent.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -130,12 +130,14 @@
</span><span class="cx">         RightButton
</span><span class="cx">     };
</span><span class="cx"> 
</span><ins>+    enum SyntheticClickType { NoTap, OneFingerTap, TwoFingerTap };
+
</ins><span class="cx">     WebMouseEvent();
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-    WebMouseEvent(Type, Button, const WebCore::IntPoint&amp; position, const WebCore::IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force, int eventNumber = -1, int menuType = 0);
</del><ins>+    WebMouseEvent(Type, Button, const WebCore::IntPoint&amp; position, const WebCore::IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force, SyntheticClickType = NoTap, int eventNumber = -1, int menuType = 0);
</ins><span class="cx"> #else
</span><del>-    WebMouseEvent(Type, Button, const WebCore::IntPoint&amp; position, const WebCore::IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force = 0);
</del><ins>+    WebMouseEvent(Type, Button, const WebCore::IntPoint&amp; position, const WebCore::IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers, double timestamp, double force = 0, SyntheticClickType = NoTap);
</ins><span class="cx"> #endif
</span><span class="cx"> 
</span><span class="cx">     Button button() const { return static_cast&lt;Button&gt;(m_button); }
</span><span class="lines">@@ -150,6 +152,7 @@
</span><span class="cx">     int32_t menuTypeForEvent() const { return m_menuTypeForEvent; }
</span><span class="cx"> #endif
</span><span class="cx">     double force() const { return m_force; }
</span><ins>+    SyntheticClickType syntheticClickType() const { return static_cast&lt;SyntheticClickType&gt;(m_syntheticClickType); }
</ins><span class="cx"> 
</span><span class="cx">     void encode(IPC::ArgumentEncoder&amp;) const;
</span><span class="cx">     static bool decode(IPC::ArgumentDecoder&amp;, WebMouseEvent&amp;);
</span><span class="lines">@@ -169,6 +172,7 @@
</span><span class="cx">     int32_t m_menuTypeForEvent;
</span><span class="cx"> #endif
</span><span class="cx">     double m_force { 0 };
</span><ins>+    uint32_t m_syntheticClickType { NoTap };
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> // FIXME: Move this class to its own header file.
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedWebMouseEventcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebMouseEvent.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebMouseEvent.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/Shared/WebMouseEvent.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -48,9 +48,9 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #if PLATFORM(MAC)
</span><del>-WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint&amp; position, const IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force, int eventNumber, int menuType)
</del><ins>+WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint&amp; position, const IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force, SyntheticClickType syntheticClickType, int eventNumber, int menuType)
</ins><span class="cx"> #else
</span><del>-WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint&amp; position, const IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force)
</del><ins>+WebMouseEvent::WebMouseEvent(Type type, Button button, const IntPoint&amp; position, const IntPoint&amp; globalPosition, float deltaX, float deltaY, float deltaZ, int clickCount, Modifiers modifiers, double timestamp, double force, SyntheticClickType syntheticClickType)
</ins><span class="cx"> #endif
</span><span class="cx">     : WebEvent(type, modifiers, timestamp)
</span><span class="cx">     , m_button(button)
</span><span class="lines">@@ -65,6 +65,7 @@
</span><span class="cx">     , m_menuTypeForEvent(menuType)
</span><span class="cx"> #endif
</span><span class="cx">     , m_force(force)
</span><ins>+    , m_syntheticClickType(syntheticClickType)
</ins><span class="cx"> {
</span><span class="cx">     ASSERT(isMouseEventType(type));
</span><span class="cx"> }
</span><span class="lines">@@ -85,6 +86,7 @@
</span><span class="cx">     encoder &lt;&lt; m_menuTypeForEvent;
</span><span class="cx"> #endif
</span><span class="cx">     encoder &lt;&lt; m_force;
</span><ins>+    encoder &lt;&lt; m_syntheticClickType;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool WebMouseEvent::decode(IPC::ArgumentDecoder&amp; decoder, WebMouseEvent&amp; result)
</span><span class="lines">@@ -115,6 +117,9 @@
</span><span class="cx">     if (!decoder.decode(result.m_force))
</span><span class="cx">         return false;
</span><span class="cx"> 
</span><ins>+    if (!decoder.decode(result.m_syntheticClickType))
+        return false;
+
</ins><span class="cx">     return true;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedmacWebEventFactorymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/Shared/mac/WebEventFactory.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -405,7 +405,7 @@
</span><span class="cx">     force = pressure + stage;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, eventNumber, menuTypeForEvent);
</del><ins>+    return WebMouseEvent(type, button, IntPoint(position), IntPoint(globalPosition), deltaX, deltaY, deltaZ, clickCount, modifiers, timestamp, force, WebMouseEvent::SyntheticClickType::NoTap, eventNumber, menuTypeForEvent);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> WebWheelEvent WebEventFactory::createWebWheelEvent(NSEvent *event, NSView *windowView)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPIAPINavigationActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/APINavigationAction.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/APINavigationAction.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/API/APINavigationAction.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -62,6 +62,7 @@
</span><span class="cx">     WebCore::NavigationType navigationType() const { return m_navigationActionData.navigationType; }
</span><span class="cx">     WebKit::WebEvent::Modifiers modifiers() const { return m_navigationActionData.modifiers; }
</span><span class="cx">     WebKit::WebMouseEvent::Button mouseButton() const { return m_navigationActionData.mouseButton; }
</span><ins>+    WebKit::WebMouseEvent::SyntheticClickType syntheticClickType() const { return m_navigationActionData.syntheticClickType; }
</ins><span class="cx">     bool isProcessingUserGesture() const { return m_navigationActionData.isProcessingUserGesture; }
</span><span class="cx">     bool canHandleRequest() const { return m_navigationActionData.canHandleRequest; }
</span><span class="cx">     bool shouldOpenExternalSchemes() const { return m_navigationActionData.shouldOpenExternalURLsPolicy == WebCore::ShouldOpenExternalURLsPolicy::ShouldAllow || m_navigationActionData.shouldOpenExternalURLsPolicy == WebCore::ShouldOpenExternalURLsPolicy::ShouldAllowExternalSchemes; }
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -55,6 +55,20 @@
</span><span class="cx">     return WKNavigationTypeOther;
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static WKSyntheticClickType toWKSyntheticClickType(WebKit::WebMouseEvent::SyntheticClickType syntheticClickType)
+{
+    switch (syntheticClickType) {
+    case WebKit::WebMouseEvent::NoTap:
+        return WKSyntheticClickTypeNoTap;
+    case WebKit::WebMouseEvent::OneFingerTap:
+        return WKSyntheticClickTypeOneFingerTap;
+    case WebKit::WebMouseEvent::TwoFingerTap:
+        return WKSyntheticClickTypeTwoFingerTap;
+    }
+    ASSERT_NOT_REACHED();
+    return WKSyntheticClickTypeNoTap;
+}
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> // FIXME: This really belongs in WebEventFactory.
</span><span class="lines">@@ -108,8 +122,8 @@
</span><span class="cx"> 
</span><span class="cx"> - (NSString *)description
</span><span class="cx"> {
</span><del>-    return [NSString stringWithFormat:@&quot;&lt;%@: %p; navigationType = %ld; request = %@; sourceFrame = %@; targetFrame = %@&gt;&quot;, NSStringFromClass(self.class), self,
-        (long)self.navigationType, self.request, self.sourceFrame, self.targetFrame];
</del><ins>+    return [NSString stringWithFormat:@&quot;&lt;%@: %p; navigationType = %ld; syntheticClickType = %ld; request = %@; sourceFrame = %@; targetFrame = %@&gt;&quot;, NSStringFromClass(self.class), self,
+        (long)self.navigationType, (long)self._syntheticClickType, self.request, self.sourceFrame, self.targetFrame];
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (WKFrameInfo *)sourceFrame
</span><span class="lines">@@ -136,6 +150,11 @@
</span><span class="cx">     return _navigationAction-&gt;request().nsURLRequest(WebCore::DoNotUpdateHTTPBody);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (WKSyntheticClickType)_syntheticClickType
+{
+    return toWKSyntheticClickType(_navigationAction-&gt;syntheticClickType());
+}
+
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> - (NSEventModifierFlags)modifierFlags
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKNavigationActionPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionPrivate.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionPrivate.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKNavigationActionPrivate.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -27,6 +27,12 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+typedef NS_ENUM(NSInteger, WKSyntheticClickType) {
+    WKSyntheticClickTypeNoTap,
+    WKSyntheticClickTypeOneFingerTap,
+    WKSyntheticClickTypeTwoFingerTap
+} WK_API_AVAILABLE(macosx(NA), ios(10.0));
+
</ins><span class="cx"> @interface WKNavigationAction (WKPrivate)
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, readonly) NSURL *_originalURL;
</span><span class="lines">@@ -37,6 +43,8 @@
</span><span class="cx"> 
</span><span class="cx"> @property (nonatomic, readonly) BOOL _shouldOpenExternalURLs WK_API_DEPRECATED(&quot;use _shouldOpenExternalSchemes and _shouldOpenAppLinks&quot;, macosx(10.11, 10.11), ios(9.0, 9.0));
</span><span class="cx"> 
</span><ins>+@property (nonatomic, readonly) WKSyntheticClickType _syntheticClickType WK_API_AVAILABLE(macosx(NA), ios(10.0));
+
</ins><span class="cx"> @end
</span><span class="cx"> 
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessWebPageProxyh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/WebPageProxy.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/WebPageProxy.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -520,7 +520,7 @@
</span><span class="cx">     void disableDoubleTapGesturesDuringTapIfNecessary(uint64_t requestID);
</span><span class="cx">     void contentSizeCategoryDidChange(const String&amp; contentSizeCategory);
</span><span class="cx">     void getSelectionContext(std::function&lt;void(const String&amp;, const String&amp;, const String&amp;, CallbackBase::Error)&gt;);
</span><del>-    void handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp;, std::function&lt;void(const String&amp;, CallbackBase::Error)&gt;);
</del><ins>+    void handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp;, uint64_t requestID);
</ins><span class="cx">     void setForceAlwaysUserScalable(bool);
</span><span class="cx"> #endif
</span><span class="cx"> #if ENABLE(DATA_DETECTION)
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWKContentViewInteractionmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1369,21 +1369,9 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_twoFingerSingleTapGestureRecognized:(UITapGestureRecognizer *)gestureRecognizer
</span><span class="cx"> {
</span><del>-    _page-&gt;tapHighlightAtPosition(gestureRecognizer.centroid, ++_latestTapID);
</del><span class="cx">     _isTapHighlightIDValid = YES;
</span><del>-    RetainPtr&lt;WKContentView&gt; view = self;
-    WKWebView *webView = _webView;
-    _page-&gt;handleTwoFingerTapAtPoint(roundedIntPoint(gestureRecognizer.centroid), [view, webView](const String&amp; string, CallbackBase::Error error) {
-        if (error != CallbackBase::Error::None)
-            return;
-        if (!string.isEmpty()) {
-            id &lt;WKUIDelegatePrivate&gt; uiDelegate = static_cast&lt;id &lt;WKUIDelegatePrivate&gt;&gt;([webView UIDelegate]);
-            if ([uiDelegate respondsToSelector:@selector(_webView:alternateActionForURL:)])
-                [uiDelegate _webView:webView alternateActionForURL:[NSURL _web_URLWithWTFString:string]];
-            [view _finishInteraction];
-        } else
-            [view _cancelInteraction];
-    });
</del><ins>+    _isExpectingFastSingleTapCommit = YES;
+    _page-&gt;handleTwoFingerTapAtPoint(roundedIntPoint(gestureRecognizer.centroid), ++_latestTapID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> - (void)_longPressRecognized:(UILongPressGestureRecognizer *)gestureRecognizer
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessiosWebPageProxyIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -568,15 +568,9 @@
</span><span class="cx">     m_process-&gt;send(Messages::WebPage::GetSelectionContext(callbackID), m_pageID);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPageProxy::handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp; point, std::function&lt;void(const String&amp;, CallbackBase::Error)&gt; callbackFunction)
</del><ins>+void WebPageProxy::handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp; point, uint64_t requestID)
</ins><span class="cx"> {
</span><del>-    if (!isValid()) {
-        callbackFunction(String(), CallbackBase::Error::Unknown);
-        return;
-    }
-    
-    uint64_t callbackID = m_callbacks.put(WTFMove(callbackFunction), m_process-&gt;throttler().backgroundActivityToken());
-    process().send(Messages::WebPage::HandleTwoFingerTapAtPoint(point, callbackID), m_pageID);
</del><ins>+    process().send(Messages::WebPage::HandleTwoFingerTapAtPoint(point, requestID), m_pageID);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPageProxy::selectWithTwoTouches(const WebCore::IntPoint from, const WebCore::IntPoint to, uint32_t gestureType, uint32_t gestureState, std::function&lt;void (const WebCore::IntPoint&amp;, uint32_t, uint32_t, uint32_t, CallbackBase::Error)&gt; callbackFunction)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleNavigationActioncpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -58,6 +58,17 @@
</span><span class="cx">     return static_cast&lt;WebMouseEvent::Button&gt;(mouseEvent-&gt;button());
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+static WebMouseEvent::SyntheticClickType syntheticClickTypeForMouseEvent(const MouseEvent* mouseEvent)
+{
+    if (!mouseEvent)
+        return WebMouseEvent::NoTap;
+    
+    if (!mouseEvent-&gt;buttonDown() || !mouseEvent-&gt;isTrusted())
+        return WebMouseEvent::NoTap;
+    
+    return static_cast&lt;WebMouseEvent::SyntheticClickType&gt;(mouseEvent-&gt;syntheticClickType());
+}
+
</ins><span class="cx"> WebEvent::Modifiers InjectedBundleNavigationAction::modifiersForNavigationAction(const NavigationAction&amp; navigationAction)
</span><span class="cx"> {
</span><span class="cx">     uint32_t modifiers = 0;
</span><span class="lines">@@ -81,6 +92,10 @@
</span><span class="cx">     return mouseButtonForMouseEvent(mouseEventForNavigationAction(navigationAction));
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+WebMouseEvent::SyntheticClickType InjectedBundleNavigationAction::syntheticClickTypeForNavigationAction(const NavigationAction&amp; navigationAction)
+{
+    return syntheticClickTypeForMouseEvent(mouseEventForNavigationAction(navigationAction));
+}
</ins><span class="cx"> 
</span><span class="cx"> Ref&lt;InjectedBundleNavigationAction&gt; InjectedBundleNavigationAction::create(WebFrame* frame, const NavigationAction&amp; action, PassRefPtr&lt;FormState&gt; formState)
</span><span class="cx"> {
</span><span class="lines">@@ -98,6 +113,7 @@
</span><span class="cx">     if (const MouseEvent* mouseEvent = mouseEventForNavigationAction(navigationAction)) {
</span><span class="cx">         m_hitTestResult = InjectedBundleHitTestResult::create(frame-&gt;coreFrame()-&gt;eventHandler().hitTestResultAtPoint(mouseEvent-&gt;absoluteLocation()));
</span><span class="cx">         m_mouseButton   = mouseButtonForMouseEvent(mouseEvent);
</span><ins>+        m_syntheticClickType = syntheticClickTypeForNavigationAction(navigationAction);
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     RefPtr&lt;FormState&gt; formState = prpFormState;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessInjectedBundleInjectedBundleNavigationActionh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -49,6 +49,7 @@
</span><span class="cx"> 
</span><span class="cx">     static WebEvent::Modifiers modifiersForNavigationAction(const WebCore::NavigationAction&amp;);
</span><span class="cx">     static WebMouseEvent::Button mouseButtonForNavigationAction(const WebCore::NavigationAction&amp;);
</span><ins>+    static WebMouseEvent::SyntheticClickType syntheticClickTypeForNavigationAction(const WebCore::NavigationAction&amp;);
</ins><span class="cx"> 
</span><span class="cx">     WebCore::NavigationType navigationType() const { return m_navigationType; }
</span><span class="cx">     WebEvent::Modifiers modifiers() const { return m_modifiers; }
</span><span class="lines">@@ -55,6 +56,7 @@
</span><span class="cx">     WebMouseEvent::Button mouseButton() const { return m_mouseButton; }
</span><span class="cx">     InjectedBundleHitTestResult* hitTestResult() const { return m_hitTestResult.get(); }
</span><span class="cx">     InjectedBundleNodeHandle* formElement() const { return m_formElement.get(); }
</span><ins>+    WebMouseEvent::SyntheticClickType syntheticClickType() const { return m_syntheticClickType; }
</ins><span class="cx"> 
</span><span class="cx">     bool shouldOpenExternalURLs() const { return m_shouldOpenExternalURLs; }
</span><span class="cx">     bool shouldTryAppLinks() const { return m_shouldTryAppLinks; }
</span><span class="lines">@@ -66,6 +68,7 @@
</span><span class="cx">     WebCore::NavigationType m_navigationType;
</span><span class="cx">     WebEvent::Modifiers m_modifiers;
</span><span class="cx">     WebMouseEvent::Button m_mouseButton;
</span><ins>+    WebMouseEvent::SyntheticClickType m_syntheticClickType;
</ins><span class="cx">     RefPtr&lt;InjectedBundleHitTestResult&gt; m_hitTestResult;
</span><span class="cx">     RefPtr&lt;InjectedBundleNodeHandle&gt; m_formElement;
</span><span class="cx">     AtomicString m_downloadAttribute;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebChromeClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -220,6 +220,7 @@
</span><span class="cx">     navigationActionData.navigationType = navigationAction.type();
</span><span class="cx">     navigationActionData.modifiers = InjectedBundleNavigationAction::modifiersForNavigationAction(navigationAction);
</span><span class="cx">     navigationActionData.mouseButton = InjectedBundleNavigationAction::mouseButtonForNavigationAction(navigationAction);
</span><ins>+    navigationActionData.syntheticClickType = InjectedBundleNavigationAction::syntheticClickTypeForNavigationAction(navigationAction);
</ins><span class="cx">     navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
</span><span class="cx">     navigationActionData.canHandleRequest = m_page-&gt;canHandleRequest(request.resourceRequest());
</span><span class="cx">     navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebFrameLoaderClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -726,6 +726,7 @@
</span><span class="cx">     navigationActionData.navigationType = action-&gt;navigationType();
</span><span class="cx">     navigationActionData.modifiers = action-&gt;modifiers();
</span><span class="cx">     navigationActionData.mouseButton = action-&gt;mouseButton();
</span><ins>+    navigationActionData.syntheticClickType = action-&gt;syntheticClickType();
</ins><span class="cx">     navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
</span><span class="cx">     navigationActionData.canHandleRequest = webPage-&gt;canHandleRequest(request);
</span><span class="cx">     navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy();
</span><span class="lines">@@ -792,6 +793,7 @@
</span><span class="cx">     navigationActionData.navigationType = action-&gt;navigationType();
</span><span class="cx">     navigationActionData.modifiers = action-&gt;modifiers();
</span><span class="cx">     navigationActionData.mouseButton = action-&gt;mouseButton();
</span><ins>+    navigationActionData.syntheticClickType = action-&gt;syntheticClickType();
</ins><span class="cx">     navigationActionData.isProcessingUserGesture = navigationAction.processingUserGesture();
</span><span class="cx">     navigationActionData.canHandleRequest = webPage-&gt;canHandleRequest(request);
</span><span class="cx">     navigationActionData.shouldOpenExternalURLsPolicy = navigationAction.shouldOpenExternalURLsPolicy();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -1241,7 +1241,7 @@
</span><span class="cx"> #if ENABLE(POINTER_LOCK)
</span><span class="cx">         0, 0,
</span><span class="cx"> #endif
</span><del>-        false, false, false, false, 0, nullptr, 0, nullptr);
</del><ins>+        false, false, false, false, 0, nullptr, 0, WebCore::NoTap, nullptr);
</ins><span class="cx"> 
</span><span class="cx">     mainFrame-&gt;loader().urlSelected(mainFrameDocument-&gt;completeURL(url), emptyString(), mouseEvent.get(), LockHistory::No, LockBackForwardList::No, ShouldSendReferrer::MaybeSendReferrer, ShouldOpenExternalURLsPolicy::ShouldNotAllow);
</span><span class="cx"> }
</span><span class="lines">@@ -2027,7 +2027,7 @@
</span><span class="cx">     corePage()-&gt;contextMenuController().clearContextMenu();
</span><span class="cx">     
</span><span class="cx">     // Simulate a mouse click to generate the correct menu.
</span><del>-    PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick);
</del><ins>+    PlatformMouseEvent mouseEvent(point, point, RightButton, PlatformEvent::MousePressed, 1, false, false, false, false, currentTime(), WebCore::ForceAtClick, WebCore::NoTap);
</ins><span class="cx">     bool handled = corePage()-&gt;userInputBridge().handleContextMenuEvent(mouseEvent, &amp;corePage()-&gt;mainFrame());
</span><span class="cx">     if (!handled)
</span><span class="cx">         return 0;
</span><span class="lines">@@ -3443,7 +3443,7 @@
</span><span class="cx">     if (!view)
</span><span class="cx">         return;
</span><span class="cx">     // FIXME: These are fake modifier keys here, but they should be real ones instead.
</span><del>-    PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0);
</del><ins>+    PlatformMouseEvent event(adjustedClientPosition, adjustedGlobalPosition, LeftButton, PlatformEvent::MouseMoved, 0, false, false, false, false, currentTime(), 0, WebCore::NoTap);
</ins><span class="cx">     m_page-&gt;mainFrame().eventHandler().dragSourceEndedAt(event, (DragOperation)operation);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -4396,17 +4396,17 @@
</span><span class="cx"> 
</span><span class="cx"> void WebPage::simulateMouseDown(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
</span><span class="cx"> {
</span><del>-    mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast&lt;WebMouseEvent::Button&gt;(button), position, position, 0, 0, 0, clickCount, static_cast&lt;WebMouseEvent::Modifiers&gt;(modifiers), time, WebCore::ForceAtClick));
</del><ins>+    mouseEvent(WebMouseEvent(WebMouseEvent::MouseDown, static_cast&lt;WebMouseEvent::Button&gt;(button), position, position, 0, 0, 0, clickCount, static_cast&lt;WebMouseEvent::Modifiers&gt;(modifiers), time, WebCore::ForceAtClick, WebMouseEvent::NoTap));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::simulateMouseUp(int button, WebCore::IntPoint position, int clickCount, WKEventModifiers modifiers, double time)
</span><span class="cx"> {
</span><del>-    mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast&lt;WebMouseEvent::Button&gt;(button), position, position, 0, 0, 0, clickCount, static_cast&lt;WebMouseEvent::Modifiers&gt;(modifiers), time, WebCore::ForceAtClick));
</del><ins>+    mouseEvent(WebMouseEvent(WebMouseEvent::MouseUp, static_cast&lt;WebMouseEvent::Button&gt;(button), position, position, 0, 0, 0, clickCount, static_cast&lt;WebMouseEvent::Modifiers&gt;(modifiers), time, WebCore::ForceAtClick, WebMouseEvent::NoTap));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::simulateMouseMotion(WebCore::IntPoint position, double time)
</span><span class="cx"> {
</span><del>-    mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time, 0));
</del><ins>+    mouseEvent(WebMouseEvent(WebMouseEvent::MouseMove, WebMouseEvent::NoButton, position, position, 0, 0, 0, 0, WebMouseEvent::Modifiers(), time, 0, WebMouseEvent::NoTap));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::setCompositionForTesting(const String&amp; compositionString, uint64_t from, uint64_t length)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPageh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -60,6 +60,7 @@
</span><span class="cx"> #include &lt;WebCore/Page.h&gt;
</span><span class="cx"> #include &lt;WebCore/PageOverlay.h&gt;
</span><span class="cx"> #include &lt;WebCore/PageVisibilityState.h&gt;
</span><ins>+#include &lt;WebCore/PlatformMouseEvent.h&gt;
</ins><span class="cx"> #include &lt;WebCore/ScrollTypes.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextChecking.h&gt;
</span><span class="cx"> #include &lt;WebCore/TextIndicator.h&gt;
</span><span class="lines">@@ -560,7 +561,7 @@
</span><span class="cx">     WebCore::IntRect rectForElementAtInteractionLocation();
</span><span class="cx">     void updateSelectionAppearance();
</span><span class="cx">     void getSelectionContext(uint64_t callbackID);
</span><del>-    void handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp;, uint64_t callbackID);
</del><ins>+    void handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp;, uint64_t requestID);
</ins><span class="cx"> #if ENABLE(IOS_TOUCH_EVENTS)
</span><span class="cx">     void dispatchAsynchronousTouchEvents(const Vector&lt;WebTouchEvent, 1&gt;&amp; queue);
</span><span class="cx"> #endif
</span><span class="lines">@@ -977,7 +978,7 @@
</span><span class="cx">     void getAssistedNodeInformation(AssistedNodeInformation&amp;);
</span><span class="cx">     void platformInitializeAccessibility();
</span><span class="cx">     void handleSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location);
</span><del>-    void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location);
</del><ins>+    void completeSyntheticClick(WebCore::Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location, WebCore::SyntheticClickType);
</ins><span class="cx">     void sendTapHighlightForNodeIfNecessary(uint64_t requestID, WebCore::Node*);
</span><span class="cx">     void resetTextAutosizing();
</span><span class="cx">     WebCore::VisiblePosition visiblePositionInFocusedNodeForPoint(const WebCore::Frame&amp;, const WebCore::IntPoint&amp;, bool isInteractingWithAssistedNode);
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageWebPagemessagesin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -96,7 +96,7 @@
</span><span class="cx">     ExecuteEditCommandWithCallback(String name, uint64_t callbackID)
</span><span class="cx">     GetSelectionContext(uint64_t callbackID)
</span><span class="cx">     SetAllowsMediaDocumentInlinePlayback(bool allows)
</span><del>-    HandleTwoFingerTapAtPoint(WebCore::IntPoint point, uint64_t callbackID)
</del><ins>+    HandleTwoFingerTapAtPoint(WebCore::IntPoint point, uint64_t requestID)
</ins><span class="cx">     SetForceAlwaysUserScalable(bool userScalable)
</span><span class="cx"> #endif
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (203084 => 203085)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-07-11 21:10:29 UTC (rev 203084)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2016-07-11 21:34:36 UTC (rev 203085)
</span><span class="lines">@@ -517,7 +517,7 @@
</span><span class="cx"> 
</span><span class="cx">     WKBeginObservingContentChanges(true);
</span><span class="cx"> 
</span><del>-    mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, WebCore::ForceAtClick));
</del><ins>+    mainframe.eventHandler().mouseMoved(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, WebCore::ForceAtClick, WebCore::NoTap));
</ins><span class="cx">     mainframe.document()-&gt;updateStyleIfNeeded();
</span><span class="cx"> 
</span><span class="cx">     WKStopObservingContentChanges();
</span><span class="lines">@@ -535,7 +535,7 @@
</span><span class="cx">         m_pendingSyntheticClickLocation = location;
</span><span class="cx">         return;
</span><span class="cx">     case WKContentNoChange:
</span><del>-        completeSyntheticClick(nodeRespondingToClick, location);
</del><ins>+        completeSyntheticClick(nodeRespondingToClick, location, WebCore::OneFingerTap);
</ins><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx">     ASSERT_NOT_REACHED();
</span><span class="lines">@@ -547,13 +547,13 @@
</span><span class="cx">         return;
</span><span class="cx">     // Only dispatch the click if the document didn't get changed by any timers started by the move event.
</span><span class="cx">     if (WKObservedContentChange() == WKContentNoChange)
</span><del>-        completeSyntheticClick(m_pendingSyntheticClickNode.get(), m_pendingSyntheticClickLocation);
</del><ins>+        completeSyntheticClick(m_pendingSyntheticClickNode.get(), m_pendingSyntheticClickLocation, WebCore::OneFingerTap);
</ins><span class="cx"> 
</span><span class="cx">     m_pendingSyntheticClickNode = nullptr;
</span><span class="cx">     m_pendingSyntheticClickLocation = FloatPoint();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::completeSyntheticClick(Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location)
</del><ins>+void WebPage::completeSyntheticClick(Node* nodeRespondingToClick, const WebCore::FloatPoint&amp; location, SyntheticClickType syntheticClickType)
</ins><span class="cx"> {
</span><span class="cx">     IntPoint roundedAdjustedPoint = roundedIntPoint(location);
</span><span class="cx">     Frame&amp; mainframe = m_page-&gt;mainFrame();
</span><span class="lines">@@ -564,8 +564,8 @@
</span><span class="cx"> 
</span><span class="cx">     bool tapWasHandled = false;
</span><span class="cx">     m_lastInteractionLocation = roundedAdjustedPoint;
</span><del>-    tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0, WebCore::ForceAtClick));
-    tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0, WebCore::ForceAtClick));
</del><ins>+    tapWasHandled |= mainframe.eventHandler().handleMousePressEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MousePressed, 1, false, false, false, false, 0, WebCore::ForceAtClick, syntheticClickType));
+    tapWasHandled |= mainframe.eventHandler().handleMouseReleaseEvent(PlatformMouseEvent(roundedAdjustedPoint, roundedAdjustedPoint, LeftButton, PlatformEvent::MouseReleased, 1, false, false, false, false, 0, WebCore::ForceAtClick, syntheticClickType));
</ins><span class="cx"> 
</span><span class="cx">     RefPtr&lt;Frame&gt; newFocusedFrame = m_page-&gt;focusController().focusedFrame();
</span><span class="cx">     RefPtr&lt;Element&gt; newFocusedElement = newFocusedFrame ? newFocusedFrame-&gt;document()-&gt;focusedElement() : nullptr;
</span><span class="lines">@@ -637,15 +637,20 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void WebPage::handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp; point, uint64_t callbackID)
</del><ins>+void WebPage::handleTwoFingerTapAtPoint(const WebCore::IntPoint&amp; point, uint64_t requestID)
</ins><span class="cx"> {
</span><span class="cx">     FloatPoint adjustedPoint;
</span><span class="cx">     Node* nodeRespondingToClick = m_page-&gt;mainFrame().nodeRespondingToClickEvents(point, adjustedPoint);
</span><del>-    Element* element = (nodeRespondingToClick &amp;&amp; is&lt;Element&gt;(*nodeRespondingToClick)) ? downcast&lt;Element&gt;(nodeRespondingToClick) : nullptr;
-    String url;
-    if (element &amp;&amp; element-&gt;isLink())
-        url = [(NSURL *)element-&gt;document().completeURL(stripLeadingAndTrailingHTMLSpaces(element-&gt;getAttribute(HTMLNames::hrefAttr))) absoluteString];
-    send(Messages::WebPageProxy::StringCallback(url, callbackID));
</del><ins>+    if (!nodeRespondingToClick || !nodeRespondingToClick-&gt;renderer()) {
+        send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(adjustedPoint)));
+        return;
+    }
+    sendTapHighlightForNodeIfNecessary(requestID, nodeRespondingToClick);
+    if (is&lt;Element&gt;(*nodeRespondingToClick) &amp;&amp; DataDetection::shouldCancelDefaultAction(downcast&lt;Element&gt;(*nodeRespondingToClick))) {
+        requestPositionInformation(roundedIntPoint(adjustedPoint));
+        send(Messages::WebPageProxy::DidNotHandleTapAsClick(roundedIntPoint(adjustedPoint)));
+    } else
+        completeSyntheticClick(nodeRespondingToClick, adjustedPoint, WebCore::TwoFingerTap);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void WebPage::potentialTapAtPosition(uint64_t requestID, const WebCore::FloatPoint&amp; position)
</span><span class="lines">@@ -722,7 +727,7 @@
</span><span class="cx">     IntPoint adjustedPoint = roundedIntPoint(position);
</span><span class="cx">     Frame&amp; mainframe = m_page-&gt;mainFrame();
</span><span class="cx"> 
</span><del>-    mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, 0));
</del><ins>+    mainframe.eventHandler().mouseMoved(PlatformMouseEvent(adjustedPoint, adjustedPoint, NoButton, PlatformEvent::MouseMoved, 0, false, false, false, false, 0, 0, WebCore::NoTap));
</ins><span class="cx">     mainframe.document()-&gt;updateStyleIfNeeded();
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>