<!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>[214403] 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/214403">214403</a></dd>
<dt>Author</dt> <dd>wenson_hsieh@apple.com</dd>
<dt>Date</dt> <dd>2017-03-25 13:24:17 -0700 (Sat, 25 Mar 2017)</dd>
</dl>

<h3>Log Message</h3>
<pre>[WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
https://bugs.webkit.org/show_bug.cgi?id=169168
&lt;rdar://problem/30688374&gt;

Reviewed by Tim Horton.

Source/WebCore:

Refactor client hooks for the drag destination action in WebCore to ask for the drag destination action mask
upon initializing the DragData. In DragController, rather than setting m_dragDestinationAction to the result of
m_client.actionMaskForDrag, we instead set it to the DragData's destination action.

Tests to come in a future patch.

* loader/EmptyClients.cpp:
* page/DragClient.h:

Rather than pass in a DragData, pass in only the platform data that we need to hand to the delegate. This is
because we now ask for drag destination actions prior to creating the DragData.

* page/DragController.cpp:
(WebCore::DragController::dragEnteredOrUpdated):

Update the available drag destination actions in WebCore using the destination actions stored in DragData rather
than calling out to the client delegate.

* loader/EmptyClients.cpp:
* platform/DragData.cpp:
(WebCore::DragData::DragData):
* platform/DragData.h:
(WebCore::DragData::dragDestinationAction):
(WebCore::DragData::operator =):
* platform/mac/DragDataMac.mm:
(WebCore::DragData::DragData):

Source/WebKit:

See WebKit ChangeLog for more details. Renames WebDefaultUIDelegate.m =&gt; WebDefaultUIDelegate.mm.

* WebKit.xcodeproj/project.pbxproj:

Source/WebKit/mac:

Refactors WebDragClient::actionMaskForDrag to take platform data only, rather than the entire DragData. See the
WebCore ChangeLog entry for more details. Also renames WebDefaultUIDelegate.m to WebDefaultUIDelegate.mm, since
we need to import a C++ header for linkedOnOrAfter().

The default delegate implementation of webView:dragDestinationActionMaskForDraggingInfo: now checks if the current
application is linking against 10.12 or earlier, and if so, will allow any drag destination action instead of
the new default value of everything but DragDestinationActionLoad.

* DefaultDelegates/WebDefaultUIDelegate.mm: Renamed from Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m.
(-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
* Misc/WebKitVersionChecks.h:
* WebCoreSupport/WebDragClient.h:
* WebCoreSupport/WebDragClient.mm:
(WebDragClient::actionMaskForDrag): Deleted.
* WebView/WebView.mm:
(-[WebView draggingEntered:]):
(-[WebView draggingUpdated:]):

Source/WebKit/win:

Minor tweak to adjust for a changed interface. See WebKit and WebCore ChangeLogs for more information.

* WebCoreSupport/WebDragClient.cpp:
(WebDragClient::actionMaskForDrag):
* WebCoreSupport/WebDragClient.h:

Source/WebKit2:

Support customizing the set of allowed actions on drop in WebKit2 by introducing a new method to WKUIDelegatePrivate
that returns a WKDragDestinationAction given platform dragging info. These flags are then used to initialize the
DragData sent over to the web process, where they update DragController's view of the allowed destination actions.

Moving forward, the default action mask for WKWebViews will include everything except WKDragDestinationActionLoad,
though for applciations linked on or before 10.12, we will still default to WKDragDestinationActionAny to mitigate
any compatibility risk.

* Shared/API/Cocoa/WKDragDestinationAction.h:

Introduce WK2 client-facing versions of WebCore::DragDestinationAction flags.

* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder&lt;DragData&gt;::encode):
(IPC::ArgumentCoder&lt;DragData&gt;::decode):

Serialize DragData's destination actions when sending DragData over IPC.

* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _web_dragDestinationActionForDraggingInfo:]):

For WKWebView, allow all drag destination actions except for loading (i.e. drop-to-navigate).

* UIProcess/API/mac/WKView.mm:
(-[WKView _web_dragDestinationActionForDraggingInfo:]):

For WKView, allow all types of drag destination actions.

* UIProcess/Cocoa/VersionChecks.h:
* UIProcess/Cocoa/WebViewImpl.h:
* UIProcess/Cocoa/WebViewImpl.mm:
(WebKit::WebViewImpl::draggingEntered):
(WebKit::WebViewImpl::draggingUpdated):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::actionMaskForDrag):
* WebProcess/WebCoreSupport/WebDragClient.h:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreloaderEmptyClientscpp">trunk/Source/WebCore/loader/EmptyClients.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDragClienth">trunk/Source/WebCore/page/DragClient.h</a></li>
<li><a href="#trunkSourceWebCorepageDragControllercpp">trunk/Source/WebCore/page/DragController.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformDragDatacpp">trunk/Source/WebCore/platform/DragData.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformDragDatah">trunk/Source/WebCore/platform/DragData.h</a></li>
<li><a href="#trunkSourceWebCoreplatformmacDragDataMacmm">trunk/Source/WebCore/platform/mac/DragDataMac.mm</a></li>
<li><a href="#trunkSourceWebKitChangeLog">trunk/Source/WebKit/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitWebKitxcodeprojprojectpbxproj">trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKitmacChangeLog">trunk/Source/WebKit/mac/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitmacMiscWebKitVersionChecksh">trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebDragClienth">trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#trunkSourceWebKitmacWebCoreSupportWebDragClientmm">trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewmm">trunk/Source/WebKit/mac/WebView/WebView.mm</a></li>
<li><a href="#trunkSourceWebKitmacWebViewWebViewPrivateh">trunk/Source/WebKit/mac/WebView/WebViewPrivate.h</a></li>
<li><a href="#trunkSourceWebKitwinChangeLog">trunk/Source/WebKit/win/ChangeLog</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDragClientcpp">trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#trunkSourceWebKitwinWebCoreSupportWebDragClienth">trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2SharedWebCoreArgumentCoderscpp">trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKUIDelegatePrivateh">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm">trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessAPImacWKViewmm">trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaVersionChecksh">trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplh">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h</a></li>
<li><a href="#trunkSourceWebKit2UIProcessCocoaWebViewImplmm">trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm</a></li>
<li><a href="#trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj">trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebCoreSupportWebDragClienth">trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacDefaultDelegatesWebDefaultUIDelegatemm">trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.mm</a></li>
<li><a href="#trunkSourceWebKit2SharedAPICocoaWKDragDestinationActionh">trunk/Source/WebKit2/Shared/API/Cocoa/WKDragDestinationAction.h</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkSourceWebKitmacDefaultDelegatesWebDefaultUIDelegatem">trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/ChangeLog        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2017-03-24  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        &lt;rdar://problem/30688374&gt;
+
+        Reviewed by Tim Horton.
+
+        Refactor client hooks for the drag destination action in WebCore to ask for the drag destination action mask
+        upon initializing the DragData. In DragController, rather than setting m_dragDestinationAction to the result of
+        m_client.actionMaskForDrag, we instead set it to the DragData's destination action.
+
+        Tests to come in a future patch.
+
+        * loader/EmptyClients.cpp:
+        * page/DragClient.h:
+
+        Rather than pass in a DragData, pass in only the platform data that we need to hand to the delegate. This is
+        because we now ask for drag destination actions prior to creating the DragData.
+
+        * page/DragController.cpp:
+        (WebCore::DragController::dragEnteredOrUpdated):
+
+        Update the available drag destination actions in WebCore using the destination actions stored in DragData rather
+        than calling out to the client delegate.
+
+        * loader/EmptyClients.cpp:
+        * platform/DragData.cpp:
+        (WebCore::DragData::DragData):
+        * platform/DragData.h:
+        (WebCore::DragData::dragDestinationAction):
+        (WebCore::DragData::operator =):
+        * platform/mac/DragDataMac.mm:
+        (WebCore::DragData::DragData):
+
</ins><span class="cx"> 2017-03-25  Aaron Chu  &lt;aaron_chu@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         AX: Media controls are unlabeled
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderEmptyClientscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/EmptyClients.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/loader/EmptyClients.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -129,7 +129,6 @@
</span><span class="cx"> class EmptyDragClient final : public DragClient {
</span><span class="cx">     void willPerformDragDestinationAction(DragDestinationAction, const DragData&amp;) final { }
</span><span class="cx">     void willPerformDragSourceAction(DragSourceAction, const IntPoint&amp;, DataTransfer&amp;) final { }
</span><del>-    DragDestinationAction actionMaskForDrag(const DragData&amp;) final { return DragDestinationActionNone; }
</del><span class="cx">     DragSourceAction dragSourceActionMaskForPoint(const IntPoint&amp;) final { return DragSourceActionNone; }
</span><span class="cx">     void startDrag(DragImage, const IntPoint&amp;, const IntPoint&amp;, const FloatPoint&amp;, DataTransfer&amp;, Frame&amp;, DragSourceAction) final { }
</span><span class="cx">     void dragControllerDestroyed() final { }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragClient.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragClient.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/page/DragClient.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -26,6 +26,7 @@
</span><span class="cx"> #pragma once
</span><span class="cx"> 
</span><span class="cx"> #include &quot;DragActions.h&quot;
</span><ins>+#include &quot;DragData.h&quot;
</ins><span class="cx"> #include &quot;DragItem.h&quot;
</span><span class="cx"> #include &quot;FloatPoint.h&quot;
</span><span class="cx"> #include &quot;IntPoint.h&quot;
</span><span class="lines">@@ -33,7 +34,6 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx">     
</span><span class="cx"> class DataTransfer;
</span><del>-class DragData;
</del><span class="cx"> class Element;
</span><span class="cx"> class Frame;
</span><span class="cx"> class Image;
</span><span class="lines">@@ -47,7 +47,6 @@
</span><span class="cx">     virtual void willPerformDragDestinationAction(DragDestinationAction, const DragData&amp;) = 0;
</span><span class="cx">     virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&amp;, DataTransfer&amp;) = 0;
</span><span class="cx">     virtual void didConcludeEditDrag() { }
</span><del>-    virtual DragDestinationAction actionMaskForDrag(const DragData&amp;) = 0;
</del><span class="cx">     virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint&amp; rootViewPoint) = 0;
</span><span class="cx">     
</span><span class="cx">     virtual void startDrag(DragImage, const IntPoint&amp; dragImageOrigin, const IntPoint&amp; eventPos, const FloatPoint&amp; dragImageAnchor, DataTransfer&amp;, Frame&amp;, DragSourceAction) = 0;
</span></span></pre></div>
<a id="trunkSourceWebCorepageDragControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DragController.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DragController.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/page/DragController.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -281,7 +281,7 @@
</span><span class="cx"> {
</span><span class="cx">     mouseMovedIntoDocument(m_page.mainFrame().documentAtPoint(dragData.clientPosition()));
</span><span class="cx"> 
</span><del>-    m_dragDestinationAction = m_client.actionMaskForDrag(dragData);
</del><ins>+    m_dragDestinationAction = dragData.dragDestinationAction();
</ins><span class="cx">     if (m_dragDestinationAction == DragDestinationActionNone) {
</span><span class="cx">         clearDragCaret(); // FIXME: Why not call mouseMovedIntoDocument(nullptr)?
</span><span class="cx">         return DragOperationNone;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformDragDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/DragData.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/DragData.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/platform/DragData.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -32,23 +32,23 @@
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> #if !PLATFORM(COCOA)
</span><del>-DragData::DragData(DragDataRef data, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, 
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
</del><ins>+DragData::DragData(DragDataRef data, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
</ins><span class="cx">     : m_clientPosition(clientPosition)
</span><span class="cx">     , m_globalPosition(globalPosition)
</span><span class="cx">     , m_platformDragData(data)
</span><span class="cx">     , m_draggingSourceOperationMask(sourceOperationMask)
</span><span class="cx">     , m_applicationFlags(flags)
</span><ins>+    , m_dragDestinationAction(destinationAction)
</ins><span class="cx"> {  
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragData::DragData(const String&amp;, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition,
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
</del><ins>+DragData::DragData(const String&amp;, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
</ins><span class="cx">     : m_clientPosition(clientPosition)
</span><span class="cx">     , m_globalPosition(globalPosition)
</span><span class="cx">     , m_platformDragData(0)
</span><span class="cx">     , m_draggingSourceOperationMask(sourceOperationMask)
</span><span class="cx">     , m_applicationFlags(flags)
</span><ins>+    , m_dragDestinationAction(destinationAction)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformDragDatah"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/DragData.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/DragData.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/platform/DragData.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -78,8 +78,8 @@
</span><span class="cx">     enum FilenameConversionPolicy { DoNotConvertFilenames, ConvertFilenames };
</span><span class="cx"> 
</span><span class="cx">     // clientPosition is taken to be the position of the drag event within the target window, with (0,0) at the top left
</span><del>-    WEBCORE_EXPORT DragData(DragDataRef, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone);
-    WEBCORE_EXPORT DragData(const String&amp; dragStorageName, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone);
</del><ins>+    WEBCORE_EXPORT DragData(DragDataRef, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone, DragDestinationAction actions = DragDestinationActionAny);
+    WEBCORE_EXPORT DragData(const String&amp; dragStorageName, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone, DragDestinationAction actions = DragDestinationActionAny);
</ins><span class="cx">     // This constructor should used only by WebKit2 IPC because DragData
</span><span class="cx">     // is initialized by the decoder and not in the constructor.
</span><span class="cx">     DragData() { }
</span><span class="lines">@@ -105,6 +105,7 @@
</span><span class="cx">     bool containsColor() const;
</span><span class="cx">     bool containsFiles() const;
</span><span class="cx">     unsigned numberOfFiles() const;
</span><ins>+    DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; }
</ins><span class="cx">     void setFileNames(Vector&lt;String&gt;&amp; fileNames) { m_fileNames = WTFMove(fileNames); }
</span><span class="cx">     const Vector&lt;String&gt;&amp; fileNames() const { return m_fileNames; }
</span><span class="cx"> #if PLATFORM(COCOA)
</span><span class="lines">@@ -121,6 +122,7 @@
</span><span class="cx">         m_platformDragData = data.m_platformDragData;
</span><span class="cx">         m_draggingSourceOperationMask = data.m_draggingSourceOperationMask;
</span><span class="cx">         m_applicationFlags = data.m_applicationFlags;
</span><ins>+        m_dragDestinationAction = data.m_dragDestinationAction;
</ins><span class="cx">         return *this;
</span><span class="cx">     }
</span><span class="cx"> #endif
</span><span class="lines">@@ -132,6 +134,7 @@
</span><span class="cx">     DragOperation m_draggingSourceOperationMask;
</span><span class="cx">     DragApplicationFlags m_applicationFlags;
</span><span class="cx">     Vector&lt;String&gt; m_fileNames;
</span><ins>+    DragDestinationAction m_dragDestinationAction;
</ins><span class="cx"> #if PLATFORM(COCOA)
</span><span class="cx">     String m_pasteboardName;
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformmacDragDataMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/mac/DragDataMac.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/mac/DragDataMac.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebCore/platform/mac/DragDataMac.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -83,13 +83,13 @@
</span><span class="cx"> 
</span><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><del>-DragData::DragData(DragDataRef data, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, 
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
</del><ins>+DragData::DragData(DragDataRef data, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
</ins><span class="cx">     : m_clientPosition(clientPosition)
</span><span class="cx">     , m_globalPosition(globalPosition)
</span><span class="cx">     , m_platformDragData(data)
</span><span class="cx">     , m_draggingSourceOperationMask(sourceOperationMask)
</span><span class="cx">     , m_applicationFlags(flags)
</span><ins>+    , m_dragDestinationAction(destinationAction)
</ins><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     , m_pasteboardName([[m_platformDragData draggingPasteboard] name])
</span><span class="cx"> #else
</span><span class="lines">@@ -98,13 +98,13 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragData::DragData(const String&amp; dragStorageName, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition,
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
</del><ins>+DragData::DragData(const String&amp; dragStorageName, const IntPoint&amp; clientPosition, const IntPoint&amp; globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
</ins><span class="cx">     : m_clientPosition(clientPosition)
</span><span class="cx">     , m_globalPosition(globalPosition)
</span><span class="cx">     , m_platformDragData(0)
</span><span class="cx">     , m_draggingSourceOperationMask(sourceOperationMask)
</span><span class="cx">     , m_applicationFlags(flags)
</span><ins>+    , m_dragDestinationAction(destinationAction)
</ins><span class="cx">     , m_pasteboardName(dragStorageName)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/ChangeLog (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/ChangeLog        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/ChangeLog        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2017-03-24  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        &lt;rdar://problem/30688374&gt;
+
+        Reviewed by Tim Horton.
+
+        See WebKit ChangeLog for more details. Renames WebDefaultUIDelegate.m =&gt; WebDefaultUIDelegate.mm.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
</ins><span class="cx"> 2017-03-20  Dan Bernstein  &lt;mitz@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Xcode] Incremental builds of WebKitLegacy are slow because of the Postprocess Headers phase
</span></span></pre></div>
<a id="trunkSourceWebKitWebKitxcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -329,7 +329,7 @@
</span><span class="cx">                 939811060824BF01008DF038 /* WebFrameView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */; };
</span><span class="cx">                 939811070824BF01008DF038 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B57A042834F700CA2D3A /* WebView.mm */; };
</span><span class="cx">                 939811080824BF01008DF038 /* WebPolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */; };
</span><del>-                9398110A0824BF01008DF038 /* WebDefaultUIDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */; };
</del><ins>+                9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */; };
</ins><span class="cx">                 939811120824BF01008DF038 /* WebNSURLExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE6DC39A04C62C4E004D0EF6 /* WebNSURLExtras.mm */; };
</span><span class="cx">                 939811130824BF01008DF038 /* WebHistory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65DA2608052CC18700A97B31 /* WebHistory.mm */; };
</span><span class="cx">                 939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BECD142A0565830A005BB09C /* WebNSDataExtras.m */; };
</span><span class="lines">@@ -966,7 +966,7 @@
</span><span class="cx">                 5158F6EE106D862A00AF457C /* WebHistoryDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 515E27CC0458C86500CA2D3A /* WebUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebUIDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 515E27CF0458CA4B00CA2D3A /* WebDefaultUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultUIDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><del>-                515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultUIDelegate.m; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</del><ins>+                515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDefaultUIDelegate.mm; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</ins><span class="cx">                 516F296F03A6C45A00CA2D3A /* WebHistoryItemInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryItemInternal.h; sourceTree = &quot;&lt;group&gt;&quot;; tabWidth = 8; usesTabs = 0; };
</span><span class="cx">                 5185F62510712B80007AA393 /* WebNavigationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNavigationData.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 5185F62710712B97007AA393 /* WebNavigationData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNavigationData.mm; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -1950,7 +1950,7 @@
</span><span class="cx">                                 5152FADF033FC50400CA2ACD /* WebDefaultPolicyDelegate.h */,
</span><span class="cx">                                 5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */,
</span><span class="cx">                                 515E27CF0458CA4B00CA2D3A /* WebDefaultUIDelegate.h */,
</span><del>-                                515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */,
</del><ins>+                                515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */,
</ins><span class="cx">                         );
</span><span class="cx">                         name = &quot;Default Delegates&quot;;
</span><span class="cx">                         path = mac/DefaultDelegates;
</span><span class="lines">@@ -3580,7 +3580,7 @@
</span><span class="cx">                                 A10C1D1B18202F9C0036883A /* WebDefaultFrameLoadDelegate.m in Sources */,
</span><span class="cx">                                 939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */,
</span><span class="cx">                                 A10C1D1D18202F9C0036883A /* WebDefaultResourceLoadDelegate.m in Sources */,
</span><del>-                                9398110A0824BF01008DF038 /* WebDefaultUIDelegate.m in Sources */,
</del><ins>+                                9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */,
</ins><span class="cx">                                 A10C1D1F18202F9C0036883A /* WebDefaultUIKitDelegate.m in Sources */,
</span><span class="cx">                                 BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */,
</span><span class="cx">                                 598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,
</span></span></pre></div>
<a id="trunkSourceWebKitmacChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/ChangeLog (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/ChangeLog        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/ChangeLog        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,3 +1,29 @@
</span><ins>+2017-03-24  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        &lt;rdar://problem/30688374&gt;
+
+        Reviewed by Tim Horton.
+
+        Refactors WebDragClient::actionMaskForDrag to take platform data only, rather than the entire DragData. See the
+        WebCore ChangeLog entry for more details. Also renames WebDefaultUIDelegate.m to WebDefaultUIDelegate.mm, since
+        we need to import a C++ header for linkedOnOrAfter().
+
+        The default delegate implementation of webView:dragDestinationActionMaskForDraggingInfo: now checks if the current
+        application is linking against 10.12 or earlier, and if so, will allow any drag destination action instead of
+        the new default value of everything but DragDestinationActionLoad.
+
+        * DefaultDelegates/WebDefaultUIDelegate.mm: Renamed from Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m.
+        (-[WebDefaultUIDelegate webView:dragDestinationActionMaskForDraggingInfo:]):
+        * Misc/WebKitVersionChecks.h:
+        * WebCoreSupport/WebDragClient.h:
+        * WebCoreSupport/WebDragClient.mm:
+        (WebDragClient::actionMaskForDrag): Deleted.
+        * WebView/WebView.mm:
+        (-[WebView draggingEntered:]):
+        (-[WebView draggingUpdated:]):
+
</ins><span class="cx"> 2017-03-21  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Add support for showing the platform data interaction caret
</span></span></pre></div>
<a id="trunkSourceWebKitmacDefaultDelegatesWebDefaultUIDelegatem"></a>
<div class="delfile"><h4>Deleted: trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,274 +0,0 @@
</span><del>-/*
- * Copyright (C) 2005 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer. 
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution. 
- * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission. 
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#import &quot;WebDefaultUIDelegate.h&quot;
-
-#import &quot;WebTypesInternal.h&quot;
-#import &quot;WebUIDelegatePrivate.h&quot;
-#import &quot;WebView.h&quot;
-
-#if !PLATFORM(IOS)
-#import &quot;WebJavaScriptTextInputPanel.h&quot;
-#endif
-
-#if PLATFORM(IOS)
-#import &lt;WebCore/WAKWindow.h&gt;
-#import &lt;WebCore/WKViewPrivate.h&gt;
-#endif
-
-#if !PLATFORM(IOS)
-@interface NSApplication (DeclarationStolenFromAppKit)
-- (void)_cycleWindowsReversed:(BOOL)reversed;
-@end
-#endif
-
-@implementation WebDefaultUIDelegate
-
-static WebDefaultUIDelegate *sharedDelegate = nil;
-
-// Return a object with vanilla implementations of the protocol's methods
-// Note this feature relies on our default delegate being stateless.  This
-// is probably an invalid assumption for the WebUIDelegate.
-// If we add any real functionality to this default delegate we probably
-// won't be able to use a singleton.
-+ (WebDefaultUIDelegate *)sharedUIDelegate
-{
-    if (!sharedDelegate) {
-        sharedDelegate = [[WebDefaultUIDelegate alloc] init];
-    }
-    return sharedDelegate;
-}
-
-- (WebView *)webView: (WebView *)wv createWebViewWithRequest:(NSURLRequest *)request windowFeatures:(NSDictionary *)features
-{
-    // If the new API method doesn't exist, fallback to the old version of createWebViewWithRequest
-    // for backwards compatability
-    if (![[wv UIDelegate] respondsToSelector:@selector(webView:createWebViewWithRequest:windowFeatures:)] &amp;&amp; [[wv UIDelegate] respondsToSelector:@selector(webView:createWebViewWithRequest:)])
-        return [[wv UIDelegate] webView:wv createWebViewWithRequest:request];
-    return nil;
-}
-
-#if PLATFORM(IOS)
-- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request userGesture:(BOOL)userGesture
-{
-    return nil;
-}
-#endif
-
-- (void)webViewShow: (WebView *)wv
-{
-}
-
-- (void)webViewClose: (WebView *)wv
-{
-#if !PLATFORM(IOS)
-    [[wv window] close];
-#endif
-}
-
-- (void)webViewFocus: (WebView *)wv
-{
-#if !PLATFORM(IOS)
-    [[wv window] makeKeyAndOrderFront:wv];
-#endif
-}
-
-- (void)webViewUnfocus: (WebView *)wv
-{
-#if !PLATFORM(IOS)
-    if ([[wv window] isKeyWindow] || [[[wv window] attachedSheet] isKeyWindow]) {
-        [NSApp _cycleWindowsReversed:FALSE];
-    }
-#endif
-}
-
-- (NSResponder *)webViewFirstResponder: (WebView *)wv
-{
-    return [[wv window] firstResponder];
-}
-
-- (void)webView: (WebView *)wv makeFirstResponder:(NSResponder *)responder
-{
-    [[wv window] makeFirstResponder:responder];
-}
-
-- (void)webView: (WebView *)wv setStatusText:(NSString *)text
-{
-}
-
-- (NSString *)webViewStatusText: (WebView *)wv
-{
-    return nil;
-}
-
-- (void)webView: (WebView *)wv mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(NSUInteger)modifierFlags
-{
-}
-
-- (BOOL)webViewAreToolbarsVisible: (WebView *)wv
-{
-    return NO;
-}
-
-- (void)webView: (WebView *)wv setToolbarsVisible:(BOOL)visible
-{
-}
-
-- (BOOL)webViewIsStatusBarVisible: (WebView *)wv
-{
-    return NO;
-}
-
-- (void)webView: (WebView *)wv setStatusBarVisible:(BOOL)visible
-{
-}
-
-- (BOOL)webViewIsResizable: (WebView *)wv
-{
-#if PLATFORM(IOS)
-    return NO;
-#else
-    return [[wv window] showsResizeIndicator];
-#endif
-}
-
-- (void)webView: (WebView *)wv setResizable:(BOOL)resizable
-{
-#if !PLATFORM(IOS)
-    // FIXME: This doesn't actually change the resizability of the window,
-    // only visibility of the indicator.
-    [[wv window] setShowsResizeIndicator:resizable];
-#endif
-}
-
-- (void)webView: (WebView *)wv setFrame:(NSRect)frame
-{
-#if !PLATFORM(IOS)
-    [[wv window] setFrame:frame display:YES];
-#endif
-}
-
-- (NSRect)webViewFrame: (WebView *)wv
-{
-    NSWindow *window = [wv window];
-    return window == nil ? NSZeroRect : [window frame];
-}
-
-- (void)webView: (WebView *)wv runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
-{
-    // FIXME: We want a default here, but that would add localized strings.
-}
-
-- (BOOL)webView: (WebView *)wv runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
-{
-    // FIXME: We want a default here, but that would add localized strings.
-    return NO;
-}
-
-- (NSString *)webView: (WebView *)wv runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame
-{
-#if !PLATFORM(IOS)
-    WebJavaScriptTextInputPanel *panel = [[WebJavaScriptTextInputPanel alloc] initWithPrompt:prompt text:defaultText];
-    [panel showWindow:nil];
-    NSString *result;
-    if ([NSApp runModalForWindow:[panel window]]) {
-        result = [panel text];
-    } else {
-        result = nil;
-    }
-    [[panel window] close];
-    [panel release];
-    return result;
-#else
-    return nil;
-#endif
-}
-
-- (void)webView: (WebView *)wv runOpenPanelForFileButtonWithResultListener:(id&lt;WebOpenPanelResultListener&gt;)resultListener
-{
-    // FIXME: We want a default here, but that would add localized strings.
-}
-
-- (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView
-{
-}
-
-
-#if !PLATFORM(IOS)
-- (NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
-{
-    return WebDragDestinationActionAny;
-}
-
-- (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
-{
-}
-
-- (NSUInteger)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point
-{
-    return WebDragSourceActionAny;
-}
-
-- (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard
-{
-}
-
-- (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu
-{
-}
-#endif
-
-- (void)webView:(WebView *)sender didDrawRect:(NSRect)rect
-{
-}
-
-- (void)webView:(WebView *)sender didScrollDocumentInFrameView:(WebFrameView *)frameView
-{
-}
-
-- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin totalSpaceNeeded:(NSUInteger)totalSpaceNeeded
-{
-}
-
-- (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename
-{
-    return NO;
-}
-
-- (NSString *)webView:(WebView *)sender generateReplacementFile:(NSString *)path
-{
-    return nil;
-}
-
-#if PLATFORM(IOS)
-- (void)webViewSupportedOrientationsUpdated:(WebView *)sender
-{
-}
-#endif
-
-@end
</del></span></pre></div>
<a id="trunkSourceWebKitmacDefaultDelegatesWebDefaultUIDelegatemmfromrev214402trunkSourceWebKitmacDefaultDelegatesWebDefaultUIDelegatem"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.mm (from rev 214402, trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m) (0 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.mm                                (rev 0)
+++ trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -0,0 +1,275 @@
</span><ins>+/*
+ * Copyright (C) 2005 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer. 
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution. 
+ * 3.  Neither the name of Apple Inc. (&quot;Apple&quot;) nor the names of
+ *     its contributors may be used to endorse or promote products derived
+ *     from this software without specific prior written permission. 
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS &quot;AS IS&quot; AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &quot;WebDefaultUIDelegate.h&quot;
+
+#import &quot;WebTypesInternal.h&quot;
+#import &quot;WebUIDelegatePrivate.h&quot;
+#import &quot;WebView.h&quot;
+
+#if !PLATFORM(IOS)
+#import &quot;WebJavaScriptTextInputPanel.h&quot;
+#import &quot;WebKitVersionChecks.h&quot;
+#endif
+
+#if PLATFORM(IOS)
+#import &lt;WebCore/WAKWindow.h&gt;
+#import &lt;WebCore/WKViewPrivate.h&gt;
+#endif
+
+#if !PLATFORM(IOS)
+@interface NSApplication (DeclarationStolenFromAppKit)
+- (void)_cycleWindowsReversed:(BOOL)reversed;
+@end
+#endif
+
+@implementation WebDefaultUIDelegate
+
+static WebDefaultUIDelegate *sharedDelegate = nil;
+
+// Return a object with vanilla implementations of the protocol's methods
+// Note this feature relies on our default delegate being stateless. This
+// is probably an invalid assumption for the WebUIDelegate.
+// If we add any real functionality to this default delegate we probably
+// won't be able to use a singleton.
++ (WebDefaultUIDelegate *)sharedUIDelegate
+{
+    if (!sharedDelegate)
+        sharedDelegate = [[WebDefaultUIDelegate alloc] init];
+    return sharedDelegate;
+}
+
+- (WebView *)webView: (WebView *)wv createWebViewWithRequest:(NSURLRequest *)request windowFeatures:(NSDictionary *)features
+{
+    // If the new API method doesn't exist, fallback to the old version of createWebViewWithRequest
+    // for backwards compatability
+    if (![[wv UIDelegate] respondsToSelector:@selector(webView:createWebViewWithRequest:windowFeatures:)] &amp;&amp; [[wv UIDelegate] respondsToSelector:@selector(webView:createWebViewWithRequest:)])
+        return [[wv UIDelegate] webView:wv createWebViewWithRequest:request];
+    return nil;
+}
+
+#if PLATFORM(IOS)
+- (WebView *)webView:(WebView *)sender createWebViewWithRequest:(NSURLRequest *)request userGesture:(BOOL)userGesture
+{
+    return nil;
+}
+#endif
+
+- (void)webViewShow: (WebView *)wv
+{
+}
+
+- (void)webViewClose: (WebView *)wv
+{
+#if !PLATFORM(IOS)
+    [[wv window] close];
+#endif
+}
+
+- (void)webViewFocus: (WebView *)wv
+{
+#if !PLATFORM(IOS)
+    [[wv window] makeKeyAndOrderFront:wv];
+#endif
+}
+
+- (void)webViewUnfocus: (WebView *)wv
+{
+#if !PLATFORM(IOS)
+    if ([[wv window] isKeyWindow] || [[[wv window] attachedSheet] isKeyWindow])
+        [NSApp _cycleWindowsReversed:FALSE];
+#endif
+}
+
+- (NSResponder *)webViewFirstResponder: (WebView *)wv
+{
+    return [[wv window] firstResponder];
+}
+
+- (void)webView: (WebView *)wv makeFirstResponder:(NSResponder *)responder
+{
+    [[wv window] makeFirstResponder:responder];
+}
+
+- (void)webView: (WebView *)wv setStatusText:(NSString *)text
+{
+}
+
+- (NSString *)webViewStatusText: (WebView *)wv
+{
+    return nil;
+}
+
+- (void)webView: (WebView *)wv mouseDidMoveOverElement:(NSDictionary *)elementInformation modifierFlags:(NSUInteger)modifierFlags
+{
+}
+
+- (BOOL)webViewAreToolbarsVisible: (WebView *)wv
+{
+    return NO;
+}
+
+- (void)webView: (WebView *)wv setToolbarsVisible:(BOOL)visible
+{
+}
+
+- (BOOL)webViewIsStatusBarVisible: (WebView *)wv
+{
+    return NO;
+}
+
+- (void)webView: (WebView *)wv setStatusBarVisible:(BOOL)visible
+{
+}
+
+- (BOOL)webViewIsResizable: (WebView *)wv
+{
+#if PLATFORM(IOS)
+    return NO;
+#else
+    return [[wv window] showsResizeIndicator];
+#endif
+}
+
+- (void)webView: (WebView *)wv setResizable:(BOOL)resizable
+{
+#if !PLATFORM(IOS)
+    // FIXME: This doesn't actually change the resizability of the window,
+    // only visibility of the indicator.
+    [[wv window] setShowsResizeIndicator:resizable];
+#endif
+}
+
+- (void)webView: (WebView *)wv setFrame:(NSRect)frame
+{
+#if !PLATFORM(IOS)
+    [[wv window] setFrame:frame display:YES];
+#endif
+}
+
+- (NSRect)webViewFrame: (WebView *)wv
+{
+    NSWindow *window = [wv window];
+    return window == nil ? NSZeroRect : [window frame];
+}
+
+- (void)webView: (WebView *)wv runJavaScriptAlertPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+    // FIXME: We want a default here, but that would add localized strings.
+}
+
+- (BOOL)webView: (WebView *)wv runJavaScriptConfirmPanelWithMessage:(NSString *)message initiatedByFrame:(WebFrame *)frame
+{
+    // FIXME: We want a default here, but that would add localized strings.
+    return NO;
+}
+
+- (NSString *)webView: (WebView *)wv runJavaScriptTextInputPanelWithPrompt:(NSString *)prompt defaultText:(NSString *)defaultText initiatedByFrame:(WebFrame *)frame
+{
+#if !PLATFORM(IOS)
+    WebJavaScriptTextInputPanel *panel = [[WebJavaScriptTextInputPanel alloc] initWithPrompt:prompt text:defaultText];
+    [panel showWindow:nil];
+    NSString *result;
+    if ([NSApp runModalForWindow:[panel window]])
+        result = [panel text];
+    else
+        result = nil;
+    [[panel window] close];
+    [panel release];
+    return result;
+#else
+    return nil;
+#endif
+}
+
+- (void)webView: (WebView *)wv runOpenPanelForFileButtonWithResultListener:(id&lt;WebOpenPanelResultListener&gt;)resultListener
+{
+    // FIXME: We want a default here, but that would add localized strings.
+}
+
+- (void)webView:(WebView *)sender printFrameView:(WebFrameView *)frameView
+{
+}
+
+
+#if !PLATFORM(IOS)
+- (NSUInteger)webView:(WebView *)webView dragDestinationActionMaskForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
+{
+    if (!linkedOnOrAfter(SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+        return WebDragDestinationActionAny;
+
+    return WebDragDestinationActionAny &amp; ~WebDragDestinationActionLoad;
+}
+
+- (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
+{
+}
+
+- (NSUInteger)webView:(WebView *)webView dragSourceActionMaskForPoint:(NSPoint)point
+{
+    return WebDragSourceActionAny;
+}
+
+- (void)webView:(WebView *)webView willPerformDragSourceAction:(WebDragSourceAction)action fromPoint:(NSPoint)point withPasteboard:(NSPasteboard *)pasteboard
+{
+}
+
+- (void)webView:(WebView *)sender willPopupMenu:(NSMenu *)menu
+{
+}
+#endif
+
+- (void)webView:(WebView *)sender didDrawRect:(NSRect)rect
+{
+}
+
+- (void)webView:(WebView *)sender didScrollDocumentInFrameView:(WebFrameView *)frameView
+{
+}
+
+- (void)webView:(WebView *)sender exceededApplicationCacheOriginQuotaForSecurityOrigin:(WebSecurityOrigin *)origin totalSpaceNeeded:(NSUInteger)totalSpaceNeeded
+{
+}
+
+- (BOOL)webView:(WebView *)sender shouldReplaceUploadFile:(NSString *)path usingGeneratedFilename:(NSString **)filename
+{
+    return NO;
+}
+
+- (NSString *)webView:(WebView *)sender generateReplacementFile:(NSString *)path
+{
+    return nil;
+}
+
+#if PLATFORM(IOS)
+- (void)webViewSupportedOrientationsUpdated:(WebView *)sender
+{
+}
+#endif
+
+@end
</ins></span></pre></div>
<a id="trunkSourceWebKitmacMiscWebKitVersionChecksh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -83,6 +83,8 @@
</span><span class="cx"> enum class SDKVersion : uint32_t {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx">     FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0,
</span><ins>+#else
+    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -37,7 +37,6 @@
</span><span class="cx"> 
</span><span class="cx">     void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&amp;) override;
</span><span class="cx">     void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&amp;, WebCore::DataTransfer&amp;) override;
</span><del>-    WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&amp;) override;
</del><span class="cx">     void dragControllerDestroyed() override;
</span><span class="cx">     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp; windowPoint) override;
</span><span class="cx">     void startDrag(WebCore::DragImage, const WebCore::IntPoint&amp; dragPos, const WebCore::IntPoint&amp; eventPos, const WebCore::FloatPoint&amp;, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, WebCore::DragSourceAction) override;
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebCoreSupportWebDragClientmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -87,11 +87,6 @@
</span><span class="cx">     return (WebHTMLView*)[[kit(&amp;frame-&gt;page()-&gt;mainFrame()) frameView] documentView];
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(const WebCore::DragData&amp; dragData)
-{
-    return (WebCore::DragDestinationAction)[[m_webView _UIDelegateForwarder] webView:m_webView dragDestinationActionMaskForDraggingInfo:dragData.platformData()];
-}
-
</del><span class="cx"> void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction action, const WebCore::DragData&amp; dragData)
</span><span class="cx"> {
</span><span class="cx">     [[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:dragData.platformData()];
</span><span class="lines">@@ -194,11 +189,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(const WebCore::DragData&amp;)
-{
-    return DragDestinationActionNone;
-}
-
</del><span class="cx"> void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&amp;)
</span><span class="cx"> {
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -6619,11 +6619,17 @@
</span><span class="cx">     return static_cast&lt;DragApplicationFlags&gt;(flags);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+- (DragDestinationAction)actionMaskForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
+{
+    return (DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
+}
+
</ins><span class="cx"> - (NSDragOperation)draggingEntered:(id &lt;NSDraggingInfo&gt;)draggingInfo
</span><span class="cx"> {
</span><span class="cx">     IntPoint client([draggingInfo draggingLocation]);
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><del>-    DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</del><ins>+
+    DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
</ins><span class="cx">     return core(self)-&gt;dragController().dragEntered(dragData);
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -6635,7 +6641,8 @@
</span><span class="cx"> 
</span><span class="cx">     IntPoint client([draggingInfo draggingLocation]);
</span><span class="cx">     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
</span><del>-    DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
</del><ins>+
+    DragData dragData(draggingInfo, client, global, static_cast&lt;DragOperation&gt;([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
</ins><span class="cx">     return page-&gt;dragController().dragUpdated(dragData);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKitmacWebViewWebViewPrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/mac/WebView/WebViewPrivate.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -55,8 +55,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-#define WEBKIT_DI_BLOCK 1
-
</del><span class="cx"> @class UIColor;
</span><span class="cx"> @class UIImage;
</span><span class="cx"> @class NSError;
</span></span></pre></div>
<a id="trunkSourceWebKitwinChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/ChangeLog (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/ChangeLog        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/win/ChangeLog        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2017-03-24  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        &lt;rdar://problem/30688374&gt;
+
+        Reviewed by Tim Horton.
+
+        Minor tweak to adjust for a changed interface. See WebKit and WebCore ChangeLogs for more information.
+
+        * WebCoreSupport/WebDragClient.cpp:
+        (WebDragClient::actionMaskForDrag):
+        * WebCoreSupport/WebDragClient.h:
+
</ins><span class="cx"> 2017-03-13  Per Arne Vollan  &lt;pvollan@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [Win] Compile fix.
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -64,18 +64,6 @@
</span><span class="cx">     ASSERT(webView);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragDestinationAction WebDragClient::actionMaskForDrag(const DragData&amp; dragData)
-{
-    COMPtr&lt;IWebUIDelegate&gt; delegateRef = 0;
-    //Default behaviour (eg. no delegate, or callback not implemented) is to allow
-    //any action
-    WebDragDestinationAction mask = WebDragDestinationActionAny;
-    if (SUCCEEDED(m_webView-&gt;uiDelegate(&amp;delegateRef)))
-        delegateRef-&gt;dragDestinationActionMaskForDraggingInfo(m_webView, dragData.platformData(), &amp;mask);
-
-    return (DragDestinationAction)mask;
-}
-
</del><span class="cx"> void WebDragClient::willPerformDragDestinationAction(DragDestinationAction action, const DragData&amp; dragData)
</span><span class="cx"> {
</span><span class="cx">     //Default delegate for willPerformDragDestinationAction has no side effects
</span></span></pre></div>
<a id="trunkSourceWebKitwinWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -35,7 +35,6 @@
</span><span class="cx">     WebDragClient(WebView*);
</span><span class="cx">     virtual void dragControllerDestroyed();
</span><span class="cx"> 
</span><del>-    virtual WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&amp;);
</del><span class="cx">     virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp;);
</span><span class="cx">     virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&amp;);
</span><span class="cx">     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&amp;, WebCore::DataTransfer&amp;);
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/ChangeLog        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1,3 +1,50 @@
</span><ins>+2017-03-24  Wenson Hsieh  &lt;wenson_hsieh@apple.com&gt;
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        &lt;rdar://problem/30688374&gt;
+
+        Reviewed by Tim Horton.
+
+        Support customizing the set of allowed actions on drop in WebKit2 by introducing a new method to WKUIDelegatePrivate
+        that returns a WKDragDestinationAction given platform dragging info. These flags are then used to initialize the
+        DragData sent over to the web process, where they update DragController's view of the allowed destination actions.
+
+        Moving forward, the default action mask for WKWebViews will include everything except WKDragDestinationActionLoad,
+        though for applciations linked on or before 10.12, we will still default to WKDragDestinationActionAny to mitigate
+        any compatibility risk.
+
+        * Shared/API/Cocoa/WKDragDestinationAction.h:
+
+        Introduce WK2 client-facing versions of WebCore::DragDestinationAction flags.
+
+        * Shared/WebCoreArgumentCoders.cpp:
+        (IPC::ArgumentCoder&lt;DragData&gt;::encode):
+        (IPC::ArgumentCoder&lt;DragData&gt;::decode):
+
+        Serialize DragData's destination actions when sending DragData over IPC.
+
+        * UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
+        * UIProcess/API/Cocoa/WKWebView.mm:
+        (-[WKWebView _web_dragDestinationActionForDraggingInfo:]):
+
+        For WKWebView, allow all drag destination actions except for loading (i.e. drop-to-navigate).
+
+        * UIProcess/API/mac/WKView.mm:
+        (-[WKView _web_dragDestinationActionForDraggingInfo:]):
+
+        For WKView, allow all types of drag destination actions.
+
+        * UIProcess/Cocoa/VersionChecks.h:
+        * UIProcess/Cocoa/WebViewImpl.h:
+        * UIProcess/Cocoa/WebViewImpl.mm:
+        (WebKit::WebViewImpl::draggingEntered):
+        (WebKit::WebViewImpl::draggingUpdated):
+        * WebKit2.xcodeproj/project.pbxproj:
+        * WebProcess/WebCoreSupport/WebDragClient.cpp:
+        (WebKit::WebDragClient::actionMaskForDrag):
+        * WebProcess/WebCoreSupport/WebDragClient.h:
+
</ins><span class="cx"> 2017-03-24  Simon Fraser  &lt;simon.fraser@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [iOS WK2] Move from a pre-commit handler to dispatch_async for visible content rect updates
</span></span></pre></div>
<a id="trunkSourceWebKit2SharedAPICocoaWKDragDestinationActionhfromrev214402trunkSourceWebKit2UIProcessCocoaVersionChecksh"></a>
<div class="copfile"><h4>Copied: trunk/Source/WebKit2/Shared/API/Cocoa/WKDragDestinationAction.h (from rev 214402, trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h) (0 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/API/Cocoa/WKDragDestinationAction.h                                (rev 0)
+++ trunk/Source/WebKit2/Shared/API/Cocoa/WKDragDestinationAction.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+/*
+ * Copyright (C) 2017 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#import &lt;WebKit/WKFoundation.h&gt;
+
+#if WK_API_ENABLED
+
+#import &lt;Foundation/Foundation.h&gt;
+
+typedef NS_OPTIONS(NSUInteger, WKDragDestinationAction) {
+    WKDragDestinationActionNone    = 0,
+    WKDragDestinationActionDHTML   = 1,
+    WKDragDestinationActionEdit    = 2,
+    WKDragDestinationActionLoad    = 4,
+    WKDragDestinationActionAny     = NSUIntegerMax
+} WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+
+#endif
</ins></span></pre></div>
<a id="trunkSourceWebKit2SharedWebCoreArgumentCoderscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1223,6 +1223,7 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx">     encoder &lt;&lt; dragData.fileNames();
</span><span class="cx"> #endif
</span><ins>+    encoder.encodeEnum(dragData.dragDestinationAction());
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool ArgumentCoder&lt;DragData&gt;::decode(Decoder&amp; decoder, DragData&amp; dragData)
</span><span class="lines">@@ -1254,7 +1255,11 @@
</span><span class="cx">         return false;
</span><span class="cx"> #endif
</span><span class="cx"> 
</span><del>-    dragData = DragData(pasteboardName, clientPosition, globalPosition, draggingSourceOperationMask, applicationFlags);
</del><ins>+    DragDestinationAction destinationAction;
+    if (!decoder.decodeEnum(destinationAction))
+        return false;
+
+    dragData = DragData(pasteboardName, clientPosition, globalPosition, draggingSourceOperationMask, applicationFlags, destinationAction);
</ins><span class="cx">     dragData.setFileNames(fileNames);
</span><span class="cx"> 
</span><span class="cx">     return true;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKUIDelegatePrivateh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -27,6 +27,7 @@
</span><span class="cx"> 
</span><span class="cx"> #if WK_API_ENABLED
</span><span class="cx"> 
</span><ins>+#import &lt;WebKit/WKDragDestinationAction.h&gt;
</ins><span class="cx"> #import &lt;WebKit/WKSecurityOrigin.h&gt;
</span><span class="cx"> #import &lt;WebKit/WKWebViewPrivate.h&gt;
</span><span class="cx"> #import &lt;WebKit/_WKActivatedElementInfo.h&gt;
</span><span class="lines">@@ -65,6 +66,7 @@
</span><span class="cx"> - (void)_webView:(WKWebView *)webView requestUserMediaAuthorizationForMicrophone:(BOOL)microphone camera:(BOOL)camera url:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL decisionHandler:(void (^)(BOOL authorizedMicrophone, BOOL authorizedCamera))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</span><span class="cx"> - (void)_webView:(WKWebView *)webView checkUserMediaPermissionForURL:(NSURL *)url mainFrameURL:(NSURL *)mainFrameURL frameIdentifier:(NSUInteger)frameIdentifier decisionHandler:(void (^)(NSString *salt, BOOL authorized))decisionHandler WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</span><span class="cx"> - (void)_webView:(WKWebView *)webView mediaCaptureStateDidChange:(_WKMediaCaptureState)state WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</span><ins>+- (WKDragDestinationAction)_webView:(WKWebView *)webView dragDestinationActionMaskForDraggingInfo:(id)draggingInfo WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
</ins><span class="cx"> #if TARGET_OS_IPHONE
</span><span class="cx"> - (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(9.0));
</span><span class="cx"> - (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(NSArray&lt;_WKElementAction *&gt; *)defaultActions;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPICocoaWKWebViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -45,6 +45,7 @@
</span><span class="cx"> #import &quot;RemoteObjectRegistry.h&quot;
</span><span class="cx"> #import &quot;RemoteObjectRegistryMessages.h&quot;
</span><span class="cx"> #import &quot;UIDelegate.h&quot;
</span><ins>+#import &quot;VersionChecks.h&quot;
</ins><span class="cx"> #import &quot;ViewGestureController.h&quot;
</span><span class="cx"> #import &quot;ViewSnapshotStore.h&quot;
</span><span class="cx"> #import &quot;WKBackForwardListInternal.h&quot;
</span><span class="lines">@@ -3488,6 +3489,22 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(DRAG_SUPPORT) &amp;&amp; WK_API_ENABLED
+
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
+{
+    id &lt;WKUIDelegatePrivate&gt; uiDelegate = (id &lt;WKUIDelegatePrivate&gt;)[self UIDelegate];
+    if ([uiDelegate respondsToSelector:@selector(_webView:dragDestinationActionMaskForDraggingInfo:)])
+        return [uiDelegate _webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
+
+    if (!linkedOnOrAfter(WebKit::SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+        return WKDragDestinationActionAny;
+
+    return WKDragDestinationActionAny &amp; ~WKDragDestinationActionLoad;
+}
+
+#endif
+
</ins><span class="cx"> - (void)_web_dismissContentRelativeChildWindows
</span><span class="cx"> {
</span><span class="cx">     _impl-&gt;dismissContentRelativeChildWindowsFromViewOnly();
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessAPImacWKViewmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -32,6 +32,7 @@
</span><span class="cx"> #import &quot;APIIconLoadingClient.h&quot;
</span><span class="cx"> #import &quot;APIPageConfiguration.h&quot;
</span><span class="cx"> #import &quot;WKBrowsingContextGroupPrivate.h&quot;
</span><ins>+#import &quot;WKDragDestinationAction.h&quot;
</ins><span class="cx"> #import &quot;WKNSData.h&quot;
</span><span class="cx"> #import &quot;WKProcessGroupPrivate.h&quot;
</span><span class="cx"> #import &quot;WebBackForwardListItem.h&quot;
</span><span class="lines">@@ -1008,6 +1009,15 @@
</span><span class="cx">     [self _didChangeContentSize:newSize];
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+#if ENABLE(DRAG_SUPPORT) &amp;&amp; WK_API_ENABLED
+
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo
+{
+    return WKDragDestinationActionAny;
+}
+
+#endif
+
</ins><span class="cx"> - (void)_web_dismissContentRelativeChildWindows
</span><span class="cx"> {
</span><span class="cx">     [self _dismissContentRelativeChildWindows];
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaVersionChecksh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -38,6 +38,7 @@
</span><span class="cx"> #elif PLATFORM(MAC)
</span><span class="cx">     FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
</span><span class="cx">     FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
</span><ins>+    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13
</ins><span class="cx"> #endif
</span><span class="cx"> };
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -29,6 +29,7 @@
</span><span class="cx"> #if PLATFORM(MAC)
</span><span class="cx"> 
</span><span class="cx"> #include &quot;PluginComplexTextInputState.h&quot;
</span><ins>+#include &quot;WKDragDestinationAction.h&quot;
</ins><span class="cx"> #include &quot;WKLayoutMode.h&quot;
</span><span class="cx"> #include &quot;WebPageProxy.h&quot;
</span><span class="cx"> #include &quot;_WKOverlayScrollbarStyle.h&quot;
</span><span class="lines">@@ -91,6 +92,10 @@
</span><span class="cx"> 
</span><span class="cx"> - (void)_web_didChangeContentSize:(NSSize)newSize;
</span><span class="cx"> 
</span><ins>+#if ENABLE(DRAG_SUPPORT) &amp;&amp; WK_API_ENABLED
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id &lt;NSDraggingInfo&gt;)draggingInfo;
+#endif
+
</ins><span class="cx"> @optional
</span><span class="cx"> - (void)_web_didAddMediaControlsManager:(id)controlsManager;
</span><span class="cx"> - (void)_web_didRemoveMediaControlsManager;
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessCocoaWebViewImplmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -3577,7 +3577,12 @@
</span><span class="cx"> {
</span><span class="cx">     WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
</span><span class="cx">     WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
</span><del>-    WebCore::DragData dragData(draggingInfo, client, global, static_cast&lt;WebCore::DragOperation&gt;(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
</del><ins>+#if WK_API_ENABLED
+    auto dragDestinationAction = static_cast&lt;WebCore::DragDestinationAction&gt;([m_view _web_dragDestinationActionForDraggingInfo:draggingInfo]);
+#else
+    auto dragDestinationAction = WebCore::DragDestinationActionAny;
+#endif
+    WebCore::DragData dragData(draggingInfo, client, global, static_cast&lt;WebCore::DragOperation&gt;(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo), dragDestinationAction);
</ins><span class="cx"> 
</span><span class="cx">     m_page-&gt;resetCurrentDragInformation();
</span><span class="cx">     m_page-&gt;dragEntered(dragData, draggingInfo.draggingPasteboard.name);
</span><span class="lines">@@ -3588,7 +3593,12 @@
</span><span class="cx"> {
</span><span class="cx">     WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
</span><span class="cx">     WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
</span><del>-    WebCore::DragData dragData(draggingInfo, client, global, static_cast&lt;WebCore::DragOperation&gt;(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
</del><ins>+#if WK_API_ENABLED
+    auto dragDestinationAction = static_cast&lt;WebCore::DragDestinationAction&gt;([m_view _web_dragDestinationActionForDraggingInfo:draggingInfo]);
+#else
+    auto dragDestinationAction = WebCore::DragDestinationActionAny;
+#endif
+    WebCore::DragData dragData(draggingInfo, client, global, static_cast&lt;WebCore::DragOperation&gt;(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo), dragDestinationAction);
</ins><span class="cx">     m_page-&gt;dragUpdated(dragData, draggingInfo.draggingPasteboard.name);
</span><span class="cx"> 
</span><span class="cx">     NSInteger numberOfValidItemsForDrop = m_page-&gt;currentDragNumberOfFilesToBeAccepted();
</span></span></pre></div>
<a id="trunkSourceWebKit2WebKit2xcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -1996,6 +1996,7 @@
</span><span class="cx">                 ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 EDCA71B7128DDA8C00201B26 /* WKBundlePageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */; };
</span><span class="cx">                 F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorPicker.cpp */; };
</span><ins>+                F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
</ins><span class="cx">                 F43370971E4D72ED00052B0E /* _WKTestingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = F43370961E4D6A4400052B0E /* _WKTestingDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
</span><span class="cx">                 F6113E25126CE1820057D0A7 /* APIUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */; };
</span><span class="cx">                 F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */; };
</span><span class="lines">@@ -4312,6 +4313,7 @@
</span><span class="cx">                 ECA680D71E690DF800731D20 /* WebProcessCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebProcessCocoa.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><ins>+                F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</ins><span class="cx">                 F43370961E4D6A4400052B0E /* _WKTestingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKTestingDelegate.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIUserContentURLPattern.h; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="cx">                 F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentURLPattern.cpp; sourceTree = &quot;&lt;group&gt;&quot;; };
</span><span class="lines">@@ -5736,6 +5738,7 @@
</span><span class="cx">                                 373D122418A473B30066D9CC /* WKBrowsingContextHandleInternal.h */,
</span><span class="cx">                                 37A709A61E3EA0FD00CA5969 /* WKDataDetectorTypes.h */,
</span><span class="cx">                                 37A709A81E3EA40C00CA5969 /* WKDataDetectorTypesInternal.h */,
</span><ins>+                                F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */,
</ins><span class="cx">                                 37DFA6FF1810BB92001F4A9F /* WKFoundation.h */,
</span><span class="cx">                                 1A9E32991822E1CC00F5D04C /* WKRemoteObject.h */,
</span><span class="cx">                                 1A9E32981822E1CC00F5D04C /* WKRemoteObject.mm */,
</span><span class="lines">@@ -8166,6 +8169,7 @@
</span><span class="cx">                                 BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */,
</span><span class="cx">                                 E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
</span><span class="cx">                                 512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
</span><ins>+                                F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */,
</ins><span class="cx">                                 512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
</span><span class="cx">                                 518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
</span><span class="cx">                                 512F58A312A883AD00629530 /* AuthenticationManagerMessages.h in Headers */,
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDragClientcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -46,11 +46,6 @@
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-DragDestinationAction WebDragClient::actionMaskForDrag(const DragData&amp;)
-{
-    return DragDestinationActionAny;
-}
-
</del><span class="cx"> DragSourceAction WebDragClient::dragSourceActionMaskForPoint(const IntPoint&amp;)
</span><span class="cx"> {
</span><span class="cx">     return DragSourceActionAny;
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebCoreSupportWebDragClienth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h (214402 => 214403)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-03-25 19:43:20 UTC (rev 214402)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h        2017-03-25 20:24:17 UTC (rev 214403)
</span><span class="lines">@@ -44,7 +44,6 @@
</span><span class="cx"> private:
</span><span class="cx">     void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&amp;) override;
</span><span class="cx">     void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&amp;, WebCore::DataTransfer&amp;) override;
</span><del>-    WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&amp;) override;
</del><span class="cx">     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&amp; windowPoint) override;
</span><span class="cx"> 
</span><span class="cx">     void startDrag(WebCore::DragImage, const WebCore::IntPoint&amp; dragImageOrigin, const WebCore::IntPoint&amp; eventPos, const WebCore::FloatPoint&amp; dragImageAnchor, WebCore::DataTransfer&amp;, WebCore::Frame&amp;, WebCore::DragSourceAction) override;
</span></span></pre>
</div>
</div>

</body>
</html>