Title: [214403] trunk/Source
Revision
214403
Author
wenson_hs...@apple.com
Date
2017-03-25 13:24:17 -0700 (Sat, 25 Mar 2017)

Log Message

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

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 => 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<DragData>::encode):
(IPC::ArgumentCoder<DragData>::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:

Modified Paths

Added Paths

Removed Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (214402 => 214403)


--- 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)
@@ -1,3 +1,38 @@
+2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        <rdar://problem/30688374>
+
+        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):
+
 2017-03-25  Aaron Chu  <aaron_...@apple.com>
 
         AX: Media controls are unlabeled

Modified: trunk/Source/WebCore/loader/EmptyClients.cpp (214402 => 214403)


--- 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)
@@ -129,7 +129,6 @@
 class EmptyDragClient final : public DragClient {
     void willPerformDragDestinationAction(DragDestinationAction, const DragData&) final { }
     void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) final { }
-    DragDestinationAction actionMaskForDrag(const DragData&) final { return DragDestinationActionNone; }
     DragSourceAction dragSourceActionMaskForPoint(const IntPoint&) final { return DragSourceActionNone; }
     void startDrag(DragImage, const IntPoint&, const IntPoint&, const FloatPoint&, DataTransfer&, Frame&, DragSourceAction) final { }
     void dragControllerDestroyed() final { }

Modified: trunk/Source/WebCore/page/DragClient.h (214402 => 214403)


--- 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)
@@ -26,6 +26,7 @@
 #pragma once
 
 #include "DragActions.h"
+#include "DragData.h"
 #include "DragItem.h"
 #include "FloatPoint.h"
 #include "IntPoint.h"
@@ -33,7 +34,6 @@
 namespace WebCore {
     
 class DataTransfer;
-class DragData;
 class Element;
 class Frame;
 class Image;
@@ -47,7 +47,6 @@
     virtual void willPerformDragDestinationAction(DragDestinationAction, const DragData&) = 0;
     virtual void willPerformDragSourceAction(DragSourceAction, const IntPoint&, DataTransfer&) = 0;
     virtual void didConcludeEditDrag() { }
-    virtual DragDestinationAction actionMaskForDrag(const DragData&) = 0;
     virtual DragSourceAction dragSourceActionMaskForPoint(const IntPoint& rootViewPoint) = 0;
     
     virtual void startDrag(DragImage, const IntPoint& dragImageOrigin, const IntPoint& eventPos, const FloatPoint& dragImageAnchor, DataTransfer&, Frame&, DragSourceAction) = 0;

Modified: trunk/Source/WebCore/page/DragController.cpp (214402 => 214403)


--- 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)
@@ -281,7 +281,7 @@
 {
     mouseMovedIntoDocument(m_page.mainFrame().documentAtPoint(dragData.clientPosition()));
 
-    m_dragDestinationAction = m_client.actionMaskForDrag(dragData);
+    m_dragDestinationAction = dragData.dragDestinationAction();
     if (m_dragDestinationAction == DragDestinationActionNone) {
         clearDragCaret(); // FIXME: Why not call mouseMovedIntoDocument(nullptr)?
         return DragOperationNone;

Modified: trunk/Source/WebCore/platform/DragData.cpp (214402 => 214403)


--- 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)
@@ -32,23 +32,23 @@
 namespace WebCore {
 
 #if !PLATFORM(COCOA)
-DragData::DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition, 
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
+DragData::DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
     : m_clientPosition(clientPosition)
     , m_globalPosition(globalPosition)
     , m_platformDragData(data)
     , m_draggingSourceOperationMask(sourceOperationMask)
     , m_applicationFlags(flags)
+    , m_dragDestinationAction(destinationAction)
 {  
 }
 
-DragData::DragData(const String&, const IntPoint& clientPosition, const IntPoint& globalPosition,
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
+DragData::DragData(const String&, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
     : m_clientPosition(clientPosition)
     , m_globalPosition(globalPosition)
     , m_platformDragData(0)
     , m_draggingSourceOperationMask(sourceOperationMask)
     , m_applicationFlags(flags)
+    , m_dragDestinationAction(destinationAction)
 {
 }
 #endif

Modified: trunk/Source/WebCore/platform/DragData.h (214402 => 214403)


--- 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)
@@ -78,8 +78,8 @@
     enum FilenameConversionPolicy { DoNotConvertFilenames, ConvertFilenames };
 
     // clientPosition is taken to be the position of the drag event within the target window, with (0,0) at the top left
-    WEBCORE_EXPORT DragData(DragDataRef, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone);
-    WEBCORE_EXPORT DragData(const String& dragStorageName, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone);
+    WEBCORE_EXPORT DragData(DragDataRef, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone, DragDestinationAction actions = DragDestinationActionAny);
+    WEBCORE_EXPORT DragData(const String& dragStorageName, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation, DragApplicationFlags = DragApplicationNone, DragDestinationAction actions = DragDestinationActionAny);
     // This constructor should used only by WebKit2 IPC because DragData
     // is initialized by the decoder and not in the constructor.
     DragData() { }
@@ -105,6 +105,7 @@
     bool containsColor() const;
     bool containsFiles() const;
     unsigned numberOfFiles() const;
+    DragDestinationAction dragDestinationAction() const { return m_dragDestinationAction; }
     void setFileNames(Vector<String>& fileNames) { m_fileNames = WTFMove(fileNames); }
     const Vector<String>& fileNames() const { return m_fileNames; }
 #if PLATFORM(COCOA)
@@ -121,6 +122,7 @@
         m_platformDragData = data.m_platformDragData;
         m_draggingSourceOperationMask = data.m_draggingSourceOperationMask;
         m_applicationFlags = data.m_applicationFlags;
+        m_dragDestinationAction = data.m_dragDestinationAction;
         return *this;
     }
 #endif
@@ -132,6 +134,7 @@
     DragOperation m_draggingSourceOperationMask;
     DragApplicationFlags m_applicationFlags;
     Vector<String> m_fileNames;
+    DragDestinationAction m_dragDestinationAction;
 #if PLATFORM(COCOA)
     String m_pasteboardName;
 #endif

Modified: trunk/Source/WebCore/platform/mac/DragDataMac.mm (214402 => 214403)


--- 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)
@@ -83,13 +83,13 @@
 
 namespace WebCore {
 
-DragData::DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition, 
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
+DragData::DragData(DragDataRef data, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
     : m_clientPosition(clientPosition)
     , m_globalPosition(globalPosition)
     , m_platformDragData(data)
     , m_draggingSourceOperationMask(sourceOperationMask)
     , m_applicationFlags(flags)
+    , m_dragDestinationAction(destinationAction)
 #if PLATFORM(MAC)
     , m_pasteboardName([[m_platformDragData draggingPasteboard] name])
 #else
@@ -98,13 +98,13 @@
 {
 }
 
-DragData::DragData(const String& dragStorageName, const IntPoint& clientPosition, const IntPoint& globalPosition,
-    DragOperation sourceOperationMask, DragApplicationFlags flags)
+DragData::DragData(const String& dragStorageName, const IntPoint& clientPosition, const IntPoint& globalPosition, DragOperation sourceOperationMask, DragApplicationFlags flags, DragDestinationAction destinationAction)
     : m_clientPosition(clientPosition)
     , m_globalPosition(globalPosition)
     , m_platformDragData(0)
     , m_draggingSourceOperationMask(sourceOperationMask)
     , m_applicationFlags(flags)
+    , m_dragDestinationAction(destinationAction)
     , m_pasteboardName(dragStorageName)
 {
 }

Modified: trunk/Source/WebKit/ChangeLog (214402 => 214403)


--- 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)
@@ -1,3 +1,15 @@
+2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        <rdar://problem/30688374>
+
+        Reviewed by Tim Horton.
+
+        See WebKit ChangeLog for more details. Renames WebDefaultUIDelegate.m => WebDefaultUIDelegate.mm.
+
+        * WebKit.xcodeproj/project.pbxproj:
+
 2017-03-20  Dan Bernstein  <m...@apple.com>
 
         [Xcode] Incremental builds of WebKitLegacy are slow because of the Postprocess Headers phase

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (214402 => 214403)


--- 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)
@@ -329,7 +329,7 @@
 		939811060824BF01008DF038 /* WebFrameView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B52F04282B5900CA2D3A /* WebFrameView.mm */; };
 		939811070824BF01008DF038 /* WebView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51A8B57A042834F700CA2D3A /* WebView.mm */; };
 		939811080824BF01008DF038 /* WebPolicyDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51443F9B0429392B00CA2D3A /* WebPolicyDelegate.mm */; };
-		9398110A0824BF01008DF038 /* WebDefaultUIDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */; };
+		9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */; };
 		939811120824BF01008DF038 /* WebNSURLExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = BE6DC39A04C62C4E004D0EF6 /* WebNSURLExtras.mm */; };
 		939811130824BF01008DF038 /* WebHistory.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65DA2608052CC18700A97B31 /* WebHistory.mm */; };
 		939811150824BF01008DF038 /* WebNSDataExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = BECD142A0565830A005BB09C /* WebNSDataExtras.m */; };
@@ -966,7 +966,7 @@
 		5158F6EE106D862A00AF457C /* WebHistoryDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryDelegate.h; sourceTree = "<group>"; };
 		515E27CC0458C86500CA2D3A /* WebUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebUIDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		515E27CF0458CA4B00CA2D3A /* WebDefaultUIDelegate.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDefaultUIDelegate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
-		515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebDefaultUIDelegate.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+		515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDefaultUIDelegate.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		516F296F03A6C45A00CA2D3A /* WebHistoryItemInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebHistoryItemInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		5185F62510712B80007AA393 /* WebNavigationData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNavigationData.h; sourceTree = "<group>"; };
 		5185F62710712B97007AA393 /* WebNavigationData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNavigationData.mm; sourceTree = "<group>"; };
@@ -1950,7 +1950,7 @@
 				5152FADF033FC50400CA2ACD /* WebDefaultPolicyDelegate.h */,
 				5152FAE0033FC50400CA2ACD /* WebDefaultPolicyDelegate.m */,
 				515E27CF0458CA4B00CA2D3A /* WebDefaultUIDelegate.h */,
-				515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.m */,
+				515E27D00458CA4B00CA2D3A /* WebDefaultUIDelegate.mm */,
 			);
 			name = "Default Delegates";
 			path = mac/DefaultDelegates;
@@ -3580,7 +3580,7 @@
 				A10C1D1B18202F9C0036883A /* WebDefaultFrameLoadDelegate.m in Sources */,
 				939810F00824BF01008DF038 /* WebDefaultPolicyDelegate.m in Sources */,
 				A10C1D1D18202F9C0036883A /* WebDefaultResourceLoadDelegate.m in Sources */,
-				9398110A0824BF01008DF038 /* WebDefaultUIDelegate.m in Sources */,
+				9398110A0824BF01008DF038 /* WebDefaultUIDelegate.mm in Sources */,
 				A10C1D1F18202F9C0036883A /* WebDefaultUIKitDelegate.m in Sources */,
 				BC542C430FD7766F00D8AB5D /* WebDelegateImplementationCaching.mm in Sources */,
 				598AD9221201CF1000ABAE4E /* WebDeviceOrientation.mm in Sources */,

Modified: trunk/Source/WebKit/mac/ChangeLog (214402 => 214403)


--- 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)
@@ -1,3 +1,29 @@
+2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        <rdar://problem/30688374>
+
+        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:]):
+
 2017-03-21  Wenson Hsieh  <wenson_hs...@apple.com>
 
         Add support for showing the platform data interaction caret

Deleted: trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m (214402 => 214403)


--- 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)
@@ -1,274 +0,0 @@
-/*
- * 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. ("Apple") 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 "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 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 "WebDefaultUIDelegate.h"
-
-#import "WebTypesInternal.h"
-#import "WebUIDelegatePrivate.h"
-#import "WebView.h"
-
-#if !PLATFORM(IOS)
-#import "WebJavaScriptTextInputPanel.h"
-#endif
-
-#if PLATFORM(IOS)
-#import <WebCore/WAKWindow.h>
-#import <WebCore/WKViewPrivate.h>
-#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:)] && [[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<WebOpenPanelResultListener>)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 <NSDraggingInfo>)draggingInfo
-{
-    return WebDragDestinationActionAny;
-}
-
-- (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)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

Copied: trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.mm (from rev 214402, trunk/Source/WebKit/mac/DefaultDelegates/WebDefaultUIDelegate.m) (0 => 214403)


--- 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)
@@ -0,0 +1,275 @@
+/*
+ * 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. ("Apple") 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 "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 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 "WebDefaultUIDelegate.h"
+
+#import "WebTypesInternal.h"
+#import "WebUIDelegatePrivate.h"
+#import "WebView.h"
+
+#if !PLATFORM(IOS)
+#import "WebJavaScriptTextInputPanel.h"
+#import "WebKitVersionChecks.h"
+#endif
+
+#if PLATFORM(IOS)
+#import <WebCore/WAKWindow.h>
+#import <WebCore/WKViewPrivate.h>
+#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:)] && [[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<WebOpenPanelResultListener>)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 <NSDraggingInfo>)draggingInfo
+{
+    if (!linkedOnOrAfter(SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+        return WebDragDestinationActionAny;
+
+    return WebDragDestinationActionAny & ~WebDragDestinationActionLoad;
+}
+
+- (void)webView:(WebView *)webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:(id <NSDraggingInfo>)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

Modified: trunk/Source/WebKit/mac/Misc/WebKitVersionChecks.h (214402 => 214403)


--- 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)
@@ -83,6 +83,8 @@
 enum class SDKVersion : uint32_t {
 #if PLATFORM(IOS)
     FirstToExcludeLocalStorageFromBackup = DYLD_IOS_VERSION_11_0,
+#else
+    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13
 #endif
 };
 

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.h (214402 => 214403)


--- 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)
@@ -37,7 +37,6 @@
 
     void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&) override;
     void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&) override;
-    WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&) override;
     void dragControllerDestroyed() override;
     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
     void startDrag(WebCore::DragImage, const WebCore::IntPoint& dragPos, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint&, WebCore::DataTransfer&, WebCore::Frame&, WebCore::DragSourceAction) override;

Modified: trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm (214402 => 214403)


--- 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)
@@ -87,11 +87,6 @@
     return (WebHTMLView*)[[kit(&frame->page()->mainFrame()) frameView] documentView];
 }
 
-WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(const WebCore::DragData& dragData)
-{
-    return (WebCore::DragDestinationAction)[[m_webView _UIDelegateForwarder] webView:m_webView dragDestinationActionMaskForDraggingInfo:dragData.platformData()];
-}
-
 void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction action, const WebCore::DragData& dragData)
 {
     [[m_webView _UIDelegateForwarder] webView:m_webView willPerformDragDestinationAction:(WebDragDestinationAction)action forDraggingInfo:dragData.platformData()];
@@ -194,11 +189,6 @@
 {
 }
 
-WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(const WebCore::DragData&)
-{
-    return DragDestinationActionNone;
-}
-
 void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&)
 {
 }

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214402 => 214403)


--- 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)
@@ -6619,11 +6619,17 @@
     return static_cast<DragApplicationFlags>(flags);
 }
 
+- (DragDestinationAction)actionMaskForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
+{
+    return (DragDestinationAction)[[self _UIDelegateForwarder] webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
+}
+
 - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)draggingInfo
 {
     IntPoint client([draggingInfo draggingLocation]);
     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
-    DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
+
+    DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
     return core(self)->dragController().dragEntered(dragData);
 }
 
@@ -6635,7 +6641,8 @@
 
     IntPoint client([draggingInfo draggingLocation]);
     IntPoint global(globalPoint([draggingInfo draggingLocation], [self window]));
-    DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo]);
+
+    DragData dragData(draggingInfo, client, global, static_cast<DragOperation>([draggingInfo draggingSourceOperationMask]), [self applicationFlags:draggingInfo], [self actionMaskForDraggingInfo:draggingInfo]);
     return page->dragController().dragUpdated(dragData);
 }
 

Modified: trunk/Source/WebKit/mac/WebView/WebViewPrivate.h (214402 => 214403)


--- 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)
@@ -55,8 +55,6 @@
 #endif
 #endif
 
-#define WEBKIT_DI_BLOCK 1
-
 @class UIColor;
 @class UIImage;
 @class NSError;

Modified: trunk/Source/WebKit/win/ChangeLog (214402 => 214403)


--- 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)
@@ -1,3 +1,17 @@
+2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        <rdar://problem/30688374>
+
+        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:
+
 2017-03-13  Per Arne Vollan  <pvol...@apple.com>
 
         [Win] Compile fix.

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.cpp (214402 => 214403)


--- 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)
@@ -64,18 +64,6 @@
     ASSERT(webView);
 }
 
-DragDestinationAction WebDragClient::actionMaskForDrag(const DragData& dragData)
-{
-    COMPtr<IWebUIDelegate> delegateRef = 0;
-    //Default behaviour (eg. no delegate, or callback not implemented) is to allow
-    //any action
-    WebDragDestinationAction mask = WebDragDestinationActionAny;
-    if (SUCCEEDED(m_webView->uiDelegate(&delegateRef)))
-        delegateRef->dragDestinationActionMaskForDraggingInfo(m_webView, dragData.platformData(), &mask);
-
-    return (DragDestinationAction)mask;
-}
-
 void WebDragClient::willPerformDragDestinationAction(DragDestinationAction action, const DragData& dragData)
 {
     //Default delegate for willPerformDragDestinationAction has no side effects

Modified: trunk/Source/WebKit/win/WebCoreSupport/WebDragClient.h (214402 => 214403)


--- 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)
@@ -35,7 +35,6 @@
     WebDragClient(WebView*);
     virtual void dragControllerDestroyed();
 
-    virtual WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&);
     virtual WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint&);
     virtual void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&);
     virtual void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&);

Modified: trunk/Source/WebKit2/ChangeLog (214402 => 214403)


--- 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)
@@ -1,3 +1,50 @@
+2017-03-24  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK2] Add a UI delegate SPI hook to enable or disable navigation on drop
+        https://bugs.webkit.org/show_bug.cgi?id=169168
+        <rdar://problem/30688374>
+
+        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<DragData>::encode):
+        (IPC::ArgumentCoder<DragData>::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:
+
 2017-03-24  Simon Fraser  <simon.fra...@apple.com>
 
         [iOS WK2] Move from a pre-commit handler to dispatch_async for visible content rect updates

Copied: trunk/Source/WebKit2/Shared/API/Cocoa/WKDragDestinationAction.h (from rev 214402, trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h) (0 => 214403)


--- 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)
@@ -0,0 +1,40 @@
+/*
+ * 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 <WebKit/WKFoundation.h>
+
+#if WK_API_ENABLED
+
+#import <Foundation/Foundation.h>
+
+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

Modified: trunk/Source/WebKit2/Shared/WebCoreArgumentCoders.cpp (214402 => 214403)


--- 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)
@@ -1223,6 +1223,7 @@
 #if PLATFORM(MAC)
     encoder << dragData.fileNames();
 #endif
+    encoder.encodeEnum(dragData.dragDestinationAction());
 }
 
 bool ArgumentCoder<DragData>::decode(Decoder& decoder, DragData& dragData)
@@ -1254,7 +1255,11 @@
         return false;
 #endif
 
-    dragData = DragData(pasteboardName, clientPosition, globalPosition, draggingSourceOperationMask, applicationFlags);
+    DragDestinationAction destinationAction;
+    if (!decoder.decodeEnum(destinationAction))
+        return false;
+
+    dragData = DragData(pasteboardName, clientPosition, globalPosition, draggingSourceOperationMask, applicationFlags, destinationAction);
     dragData.setFileNames(fileNames);
 
     return true;

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h (214402 => 214403)


--- 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)
@@ -27,6 +27,7 @@
 
 #if WK_API_ENABLED
 
+#import <WebKit/WKDragDestinationAction.h>
 #import <WebKit/WKSecurityOrigin.h>
 #import <WebKit/WKWebViewPrivate.h>
 #import <WebKit/_WKActivatedElementInfo.h>
@@ -65,6 +66,7 @@
 - (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));
 - (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));
 - (void)_webView:(WKWebView *)webView mediaCaptureStateDidChange:(_WKMediaCaptureState)state WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
+- (WKDragDestinationAction)_webView:(WKWebView *)webView dragDestinationActionMaskForDraggingInfo:(id)draggingInfo WK_API_AVAILABLE(macosx(WK_MAC_TBA), ios(WK_IOS_TBA));
 #if TARGET_OS_IPHONE
 - (BOOL)_webView:(WKWebView *)webView shouldIncludeAppLinkActionsForElement:(_WKActivatedElementInfo *)element WK_API_AVAILABLE(ios(9.0));
 - (NSArray *)_webView:(WKWebView *)webView actionsForElement:(_WKActivatedElementInfo *)element defaultActions:(NSArray<_WKElementAction *> *)defaultActions;

Modified: trunk/Source/WebKit2/UIProcess/API/Cocoa/WKWebView.mm (214402 => 214403)


--- 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)
@@ -45,6 +45,7 @@
 #import "RemoteObjectRegistry.h"
 #import "RemoteObjectRegistryMessages.h"
 #import "UIDelegate.h"
+#import "VersionChecks.h"
 #import "ViewGestureController.h"
 #import "ViewSnapshotStore.h"
 #import "WKBackForwardListInternal.h"
@@ -3488,6 +3489,22 @@
 {
 }
 
+#if ENABLE(DRAG_SUPPORT) && WK_API_ENABLED
+
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
+{
+    id <WKUIDelegatePrivate> uiDelegate = (id <WKUIDelegatePrivate>)[self UIDelegate];
+    if ([uiDelegate respondsToSelector:@selector(_webView:dragDestinationActionMaskForDraggingInfo:)])
+        return [uiDelegate _webView:self dragDestinationActionMaskForDraggingInfo:draggingInfo];
+
+    if (!linkedOnOrAfter(WebKit::SDKVersion::FirstWithDropToNavigateDisallowedByDefault))
+        return WKDragDestinationActionAny;
+
+    return WKDragDestinationActionAny & ~WKDragDestinationActionLoad;
+}
+
+#endif
+
 - (void)_web_dismissContentRelativeChildWindows
 {
     _impl->dismissContentRelativeChildWindowsFromViewOnly();

Modified: trunk/Source/WebKit2/UIProcess/API/mac/WKView.mm (214402 => 214403)


--- 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)
@@ -32,6 +32,7 @@
 #import "APIIconLoadingClient.h"
 #import "APIPageConfiguration.h"
 #import "WKBrowsingContextGroupPrivate.h"
+#import "WKDragDestinationAction.h"
 #import "WKNSData.h"
 #import "WKProcessGroupPrivate.h"
 #import "WebBackForwardListItem.h"
@@ -1008,6 +1009,15 @@
     [self _didChangeContentSize:newSize];
 }
 
+#if ENABLE(DRAG_SUPPORT) && WK_API_ENABLED
+
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id <NSDraggingInfo>)draggingInfo
+{
+    return WKDragDestinationActionAny;
+}
+
+#endif
+
 - (void)_web_dismissContentRelativeChildWindows
 {
     [self _dismissContentRelativeChildWindows];

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/VersionChecks.h (214402 => 214403)


--- 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)
@@ -38,6 +38,7 @@
 #elif PLATFORM(MAC)
     FirstWithNetworkCache = DYLD_MACOSX_VERSION_10_11,
     FirstWithExceptionsForDuplicateCompletionHandlerCalls = DYLD_MACOSX_VERSION_10_13,
+    FirstWithDropToNavigateDisallowedByDefault = DYLD_MACOSX_VERSION_10_13
 #endif
 };
 

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.h (214402 => 214403)


--- 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)
@@ -29,6 +29,7 @@
 #if PLATFORM(MAC)
 
 #include "PluginComplexTextInputState.h"
+#include "WKDragDestinationAction.h"
 #include "WKLayoutMode.h"
 #include "WebPageProxy.h"
 #include "_WKOverlayScrollbarStyle.h"
@@ -91,6 +92,10 @@
 
 - (void)_web_didChangeContentSize:(NSSize)newSize;
 
+#if ENABLE(DRAG_SUPPORT) && WK_API_ENABLED
+- (WKDragDestinationAction)_web_dragDestinationActionForDraggingInfo:(id <NSDraggingInfo>)draggingInfo;
+#endif
+
 @optional
 - (void)_web_didAddMediaControlsManager:(id)controlsManager;
 - (void)_web_didRemoveMediaControlsManager;

Modified: trunk/Source/WebKit2/UIProcess/Cocoa/WebViewImpl.mm (214402 => 214403)


--- 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)
@@ -3577,7 +3577,12 @@
 {
     WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
     WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
-    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
+#if WK_API_ENABLED
+    auto dragDestinationAction = static_cast<WebCore::DragDestinationAction>([m_view _web_dragDestinationActionForDraggingInfo:draggingInfo]);
+#else
+    auto dragDestinationAction = WebCore::DragDestinationActionAny;
+#endif
+    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo), dragDestinationAction);
 
     m_page->resetCurrentDragInformation();
     m_page->dragEntered(dragData, draggingInfo.draggingPasteboard.name);
@@ -3588,7 +3593,12 @@
 {
     WebCore::IntPoint client([m_view convertPoint:draggingInfo.draggingLocation fromView:nil]);
     WebCore::IntPoint global(WebCore::globalPoint(draggingInfo.draggingLocation, m_view.window));
-    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo));
+#if WK_API_ENABLED
+    auto dragDestinationAction = static_cast<WebCore::DragDestinationAction>([m_view _web_dragDestinationActionForDraggingInfo:draggingInfo]);
+#else
+    auto dragDestinationAction = WebCore::DragDestinationActionAny;
+#endif
+    WebCore::DragData dragData(draggingInfo, client, global, static_cast<WebCore::DragOperation>(draggingInfo.draggingSourceOperationMask), applicationFlagsForDrag(m_view, draggingInfo), dragDestinationAction);
     m_page->dragUpdated(dragData, draggingInfo.draggingPasteboard.name);
 
     NSInteger numberOfValidItemsForDrop = m_page->currentDragNumberOfFilesToBeAccepted();

Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (214402 => 214403)


--- 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)
@@ -1996,6 +1996,7 @@
 		ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		EDCA71B7128DDA8C00201B26 /* WKBundlePageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */; };
 		F036978815F4BF0500C3A80E /* WebColorPicker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorPicker.cpp */; };
+		F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */ = {isa = PBXBuildFile; fileRef = F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F43370971E4D72ED00052B0E /* _WKTestingDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = F43370961E4D6A4400052B0E /* _WKTestingDelegate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		F6113E25126CE1820057D0A7 /* APIUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */; };
 		F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */; };
@@ -4312,6 +4313,7 @@
 		ECA680D71E690DF800731D20 /* WebProcessCocoa.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebProcessCocoa.h; sourceTree = "<group>"; };
 		ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ExtraPublicSymbolsForTAPI.h; sourceTree = "<group>"; };
 		F036978715F4BF0500C3A80E /* WebColorPicker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPicker.cpp; sourceTree = "<group>"; };
+		F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKDragDestinationAction.h; sourceTree = "<group>"; };
 		F43370961E4D6A4400052B0E /* _WKTestingDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKTestingDelegate.h; sourceTree = "<group>"; };
 		F6113E24126CE1820057D0A7 /* APIUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIUserContentURLPattern.h; sourceTree = "<group>"; };
 		F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentURLPattern.cpp; sourceTree = "<group>"; };
@@ -5736,6 +5738,7 @@
 				373D122418A473B30066D9CC /* WKBrowsingContextHandleInternal.h */,
 				37A709A61E3EA0FD00CA5969 /* WKDataDetectorTypes.h */,
 				37A709A81E3EA40C00CA5969 /* WKDataDetectorTypesInternal.h */,
+				F409BA171E6E64B3009DA28E /* WKDragDestinationAction.h */,
 				37DFA6FF1810BB92001F4A9F /* WKFoundation.h */,
 				1A9E32991822E1CC00F5D04C /* WKRemoteObject.h */,
 				1A9E32981822E1CC00F5D04C /* WKRemoteObject.mm */,
@@ -8166,6 +8169,7 @@
 				BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */,
 				E1A31732134CEA6C007C9A4F /* AttributedString.h in Headers */,
 				512F589712A8838800629530 /* AuthenticationChallengeProxy.h in Headers */,
+				F409BA181E6E64BC009DA28E /* WKDragDestinationAction.h in Headers */,
 				512F589912A8838800629530 /* AuthenticationDecisionListener.h in Headers */,
 				518E8EF916B2091C00E91429 /* AuthenticationManager.h in Headers */,
 				512F58A312A883AD00629530 /* AuthenticationManagerMessages.h in Headers */,

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.cpp (214402 => 214403)


--- 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)
@@ -46,11 +46,6 @@
 {
 }
 
-DragDestinationAction WebDragClient::actionMaskForDrag(const DragData&)
-{
-    return DragDestinationActionAny;
-}
-
 DragSourceAction WebDragClient::dragSourceActionMaskForPoint(const IntPoint&)
 {
     return DragSourceActionAny;

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebDragClient.h (214402 => 214403)


--- 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)
@@ -44,7 +44,6 @@
 private:
     void willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&) override;
     void willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&) override;
-    WebCore::DragDestinationAction actionMaskForDrag(const WebCore::DragData&) override;
     WebCore::DragSourceAction dragSourceActionMaskForPoint(const WebCore::IntPoint& windowPoint) override;
 
     void startDrag(WebCore::DragImage, const WebCore::IntPoint& dragImageOrigin, const WebCore::IntPoint& eventPos, const WebCore::FloatPoint& dragImageAnchor, WebCore::DataTransfer&, WebCore::Frame&, WebCore::DragSourceAction) override;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to