Changeset 211323 in webkit
- Timestamp:
- Jan 27, 2017 9:08:31 PM (7 years ago)
- Location:
- trunk/Source/WebKit/mac
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r211254 r211323 1 2017-01-27 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [WK1] Do not prevent the drag client from initializing on Mac 4 https://bugs.webkit.org/show_bug.cgi?id=167541 5 6 Reviewed by Dan Bernstein. 7 8 Fixes fallout from r211192. To ensure compability with WebKit clients, we need to ensure that WebDragClient is 9 initialized everywhere when creating a WebView. Stub out method implementations as no-ops for non-Mac platforms. 10 This caused certain clients, such as Mail, to crash when a webView closes due to null dereference. 11 12 * WebCoreSupport/WebDragClient.mm: 13 (WebDragClient::WebDragClient): 14 (WebDragClient::actionMaskForDrag): 15 (WebDragClient::willPerformDragDestinationAction): 16 (WebDragClient::dragSourceActionMaskForPoint): 17 (WebDragClient::willPerformDragSourceAction): 18 (WebDragClient::startDrag): 19 (WebDragClient::declareAndWriteDragImage): 20 (WebDragClient::declareAndWriteAttachment): 21 * WebView/WebView.mm: 22 (-[WebView initSimpleHTMLDocumentWithStyle:frame:preferences:groupName:]): 23 1 24 2017-01-26 Chris Dumez <cdumez@apple.com> 2 25 -
trunk/Source/WebKit/mac/WebCoreSupport/WebDragClient.mm
r211192 r211323 26 26 #import "WebDragClient.h" 27 27 28 #if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)28 #if ENABLE(DRAG_SUPPORT) 29 29 30 30 #import "DOMElementInternal.h" … … 37 37 #import "WebKitLogging.h" 38 38 #import "WebKitNSStringExtras.h" 39 #import "WebNSPasteboardExtras.h"40 39 #import "WebNSURLExtras.h" 41 40 #import "WebUIDelegate.h" 42 41 #import "WebUIDelegatePrivate.h" 43 42 #import "WebViewInternal.h" 43 44 #if PLATFORM(MAC) 45 #import "WebNSPasteboardExtras.h" 46 #endif 47 44 48 #import <WebCore/DataTransfer.h> 45 49 #import <WebCore/DragData.h> … … 58 62 : m_webView(webView) 59 63 { 64 UNUSED_PARAM(m_webView); 60 65 } 66 67 #if PLATFORM(MAC) 61 68 62 69 static WebHTMLView *getTopHTMLView(Frame* frame) … … 139 146 #endif 140 147 148 #else 149 150 WebCore::DragDestinationAction WebDragClient::actionMaskForDrag(const WebCore::DragData&) 151 { 152 return DragDestinationActionNone; 153 } 154 155 void WebDragClient::willPerformDragDestinationAction(WebCore::DragDestinationAction, const WebCore::DragData&) 156 { 157 } 158 159 WebCore::DragSourceAction WebDragClient::dragSourceActionMaskForPoint(const IntPoint&) 160 { 161 return DragSourceActionNone; 162 } 163 164 void WebDragClient::willPerformDragSourceAction(WebCore::DragSourceAction, const WebCore::IntPoint&, WebCore::DataTransfer&) 165 { 166 } 167 168 void WebDragClient::startDrag(DragImageRef, const IntPoint&, const IntPoint&, DataTransfer&, Frame&, bool) 169 { 170 } 171 172 void WebDragClient::declareAndWriteDragImage(const String&, Element&, const URL&, const String&, WebCore::Frame*) 173 { 174 } 175 176 #if ENABLE(ATTACHMENT_ELEMENT) 177 void WebDragClient::declareAndWriteAttachment(const String&, Element&, const URL&, const String&, WebCore::Frame*) 178 { 179 } 180 #endif 181 182 #endif 183 141 184 void WebDragClient::dragControllerDestroyed() 142 185 { … … 144 187 } 145 188 146 #endif // ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)189 #endif // ENABLE(DRAG_SUPPORT) -
trunk/Source/WebKit/mac/WebView/WebView.mm
r211254 r211323 1610 1610 ); 1611 1611 pageConfiguration.chromeClient = new WebChromeClientIOS(self); 1612 #if ENABLE(DRAG_SUPPORT) && PLATFORM(MAC)1612 #if ENABLE(DRAG_SUPPORT) 1613 1613 pageConfiguration.dragClient = new WebDragClient(self); 1614 1614 #endif
Note: See TracChangeset
for help on using the changeset viewer.