[WK1] Do not prevent the drag client from initializing on Mac
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2017 05:08:31 +0000 (05:08 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 28 Jan 2017 05:08:31 +0000 (05:08 +0000)
commit2f62112cca574a4004197c693fba2942f86b2af9
treeffce2b6f1d9f5173fbf414a7ec210dd05973cfaf
parent9e46ed6bfb17ffc0b92239fd4313b4c40c25e60f
[WK1] Do not prevent the drag client from initializing on Mac
https://bugs.webkit.org/show_bug.cgi?id=167541

Reviewed by Dan Bernstein.

Fixes fallout from r211192. To ensure compability with WebKit clients, we need to ensure that WebDragClient is
initialized everywhere when creating a WebView. Stub out method implementations as no-ops for non-Mac platforms.
This caused certain clients, such as Mail, to crash when a webView closes due to  null dereference.

* WebCoreSupport/WebDragClient.mm:
(WebDragClient::WebDragClient):
(WebDragClient::actionMaskForDrag):
(WebDragClient::willPerformDragDestinationAction):
(WebDragClient::dragSourceActionMaskForPoint):
(WebDragClient::willPerformDragSourceAction):
(WebDragClient::startDrag):
(WebDragClient::declareAndWriteDragImage):
(WebDragClient::declareAndWriteAttachment):
* WebView/WebView.mm:
(-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebDragClient.mm
Source/WebKit/mac/WebView/WebView.mm