Title: [218834] trunk/Source/WebKit2
- Revision
- 218834
- Author
- wenson_hs...@apple.com
- Date
- 2017-06-27 07:49:20 -0700 (Tue, 27 Jun 2017)
Log Message
[iOS DnD] [WK2] WKWebView does not handle drag sessions that exit and re-enter
https://bugs.webkit.org/show_bug.cgi?id=173856
<rdar://problem/32957100>
Reviewed by Ryosuke Niwa.
Upon exiting a WKContentView, the dropSession tracked by _dataInteractionState is not cleared out. If the drag
session re-enters the WKWebView, a _different_ UIDropSession is sent to the drop delegate, causing us to bail
from handling the session altogether in -dropInteraction:canHandleSession:. To fix this, we need to clear out
the dropSession when the drag session exits the view.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dropInteraction:sessionDidExit:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (218833 => 218834)
--- trunk/Source/WebKit2/ChangeLog 2017-06-27 14:47:29 UTC (rev 218833)
+++ trunk/Source/WebKit2/ChangeLog 2017-06-27 14:49:20 UTC (rev 218834)
@@ -1,3 +1,19 @@
+2017-06-27 Wenson Hsieh <wenson_hs...@apple.com>
+
+ [iOS DnD] [WK2] WKWebView does not handle drag sessions that exit and re-enter
+ https://bugs.webkit.org/show_bug.cgi?id=173856
+ <rdar://problem/32957100>
+
+ Reviewed by Ryosuke Niwa.
+
+ Upon exiting a WKContentView, the dropSession tracked by _dataInteractionState is not cleared out. If the drag
+ session re-enters the WKWebView, a _different_ UIDropSession is sent to the drop delegate, causing us to bail
+ from handling the session altogether in -dropInteraction:canHandleSession:. To fix this, we need to clear out
+ the dropSession when the drag session exits the view.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView dropInteraction:sessionDidExit:]):
+
2017-06-26 Chris Dumez <cdu...@apple.com>
WebsiteDataStore::fetchDataForTopPrivatelyControlledDomains() is inefficient
Modified: trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm (218833 => 218834)
--- trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-06-27 14:47:29 UTC (rev 218833)
+++ trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm 2017-06-27 14:49:20 UTC (rev 218834)
@@ -4712,6 +4712,8 @@
auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny];
_page->dragExited(dragData, "data interaction pasteboard");
_page->resetCurrentDragInformation();
+
+ _dataInteractionState.dropSession = nil;
}
- (void)dropInteraction:(UIDropInteraction *)interaction performDrop:(id <UIDropSession>)session
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes