Title: [211492] trunk/Source/WebKit/mac
Revision
211492
Author
wenson_hs...@apple.com
Date
2017-02-01 10:15:13 -0800 (Wed, 01 Feb 2017)

Log Message

[WK1] Allow the drag client to be initialized on platforms that do not support drag and drop
https://bugs.webkit.org/show_bug.cgi?id=167695
<rdar://problem/30305390>

Reviewed by Sam Weinig.

Due to the common codepath for destroying the drag client, we need to ensure that the drag client actually
exists, even on platforms that do not support drag and drop, in order to avoid crashing when the DragController
is destroyed.

* WebView/WebView.mm:
(-[WebView _commonInitializationWithFrameName:groupName:]):

Modified Paths

Diff

Modified: trunk/Source/WebKit/mac/ChangeLog (211491 => 211492)


--- trunk/Source/WebKit/mac/ChangeLog	2017-02-01 18:12:08 UTC (rev 211491)
+++ trunk/Source/WebKit/mac/ChangeLog	2017-02-01 18:15:13 UTC (rev 211492)
@@ -1,3 +1,18 @@
+2017-02-01  Wenson Hsieh  <wenson_hs...@apple.com>
+
+        [WK1] Allow the drag client to be initialized on platforms that do not support drag and drop
+        https://bugs.webkit.org/show_bug.cgi?id=167695
+        <rdar://problem/30305390>
+
+        Reviewed by Sam Weinig.
+
+        Due to the common codepath for destroying the drag client, we need to ensure that the drag client actually
+        exists, even on platforms that do not support drag and drop, in order to avoid crashing when the DragController
+        is destroyed.
+
+        * WebView/WebView.mm:
+        (-[WebView _commonInitializationWithFrameName:groupName:]):
+
 2017-01-31  Joseph Pecoraro  <pecor...@apple.com>
 
         ld: warning: instance method '_setAutofilled:' in category conflicts with same method from another category

Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (211491 => 211492)


--- trunk/Source/WebKit/mac/WebView/WebView.mm	2017-02-01 18:12:08 UTC (rev 211491)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm	2017-02-01 18:15:13 UTC (rev 211492)
@@ -1354,9 +1354,6 @@
     pageConfiguration.contextMenuClient = new WebContextMenuClient(self);
     // FIXME: We should enable this on iOS as well.
     pageConfiguration.validationMessageClient = std::make_unique<WebValidationMessageClient>(self);
-#if ENABLE(DRAG_SUPPORT)
-    pageConfiguration.dragClient = new WebDragClient(self);
-#endif
     pageConfiguration.inspectorClient = new WebInspectorClient(self);
 #else
     pageConfiguration.chromeClient = new WebChromeClientIOS(self);
@@ -1363,6 +1360,10 @@
     pageConfiguration.inspectorClient = new WebInspectorClient(self);
 #endif
 
+#if ENABLE(DRAG_SUPPORT)
+    pageConfiguration.dragClient = new WebDragClient(self);
+#endif
+
     pageConfiguration.backForwardClient = BackForwardList::create(self);
 
 #if ENABLE(APPLE_PAY)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to