Title: [259534] trunk
Revision
259534
Author
[email protected]
Date
2020-04-04 11:52:15 -0700 (Sat, 04 Apr 2020)

Log Message

Add even more logging to try and diagnose <webkit.org/b/209685>
https://bugs.webkit.org/show_bug.cgi?id=210008

Reviewed by Tim Horton.

Source/WebCore:

* platform/ios/WebItemProviderPasteboard.mm:
(-[WebItemProviderPasteboard stageRegistrationLists:]):

Source/WebKit:

Revert all (except one) of the logging statements added in r259518, and add several new ones. This last logging
pass demonstrated that DragController had failed to start a drag, since -[WKContentView _didHandleDragStartRequest:]
receives word that the drag has started, yet there are no staged drag items.

* UIProcess/ios/DragDropInteractionState.mm:
(WebKit::DragDropInteractionState::stageDragItem):
(WebKit::DragDropInteractionState::clearStagedDragSource):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didHandleAdditionalDragItemsRequest:]):
(-[WKContentView cleanUpDragSourceSessionState]):
(-[WKContentView _didPerformDragOperation:]):
(-[WKContentView _prepareToDragPromisedAttachment:]):
(-[WKContentView _dragInteraction:prepareForSession:completion:]):
(-[WKContentView dragInteraction:itemsForBeginningSession:]):
(-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
(-[WKContentView dragInteraction:sessionWillBegin:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:canHandleSession:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidExit:]):
(-[WKContentView dropInteraction:performDrop:]):
(-[WKContentView dropInteraction:sessionDidEnd:]):

Tools:

Replace old logging with new logging (in different places).

* TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
(-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
(-[DragAndDropSimulator _advanceProgress]):
(-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):

Rule out the possibility that the WebKit client (in this case, the drag and drop simulator) is overriding the
list of drag items by logging the given NSItemProvider that will be used to start the drag.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (259533 => 259534)


--- trunk/Source/WebCore/ChangeLog	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Source/WebCore/ChangeLog	2020-04-04 18:52:15 UTC (rev 259534)
@@ -1,3 +1,13 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        Add even more logging to try and diagnose <webkit.org/b/209685>
+        https://bugs.webkit.org/show_bug.cgi?id=210008
+
+        Reviewed by Tim Horton.
+
+        * platform/ios/WebItemProviderPasteboard.mm:
+        (-[WebItemProviderPasteboard stageRegistrationLists:]):
+
 2020-04-04  Myles C. Maxfield  <[email protected]>
 
         Ahom text is busted

Modified: trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm (259533 => 259534)


--- trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2020-04-04 18:52:15 UTC (rev 259534)
@@ -856,6 +856,7 @@
 - (void)stageRegistrationLists:(NSArray<WebItemProviderRegistrationInfoList *> *)lists
 {
     ASSERT(lists.count);
+    NSLog(@"%s - %@", __PRETTY_FUNCTION__, lists);
     _stagedRegistrationInfoLists = lists;
 }
 

Modified: trunk/Source/WebKit/ChangeLog (259533 => 259534)


--- trunk/Source/WebKit/ChangeLog	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Source/WebKit/ChangeLog	2020-04-04 18:52:15 UTC (rev 259534)
@@ -1,3 +1,34 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        Add even more logging to try and diagnose <webkit.org/b/209685>
+        https://bugs.webkit.org/show_bug.cgi?id=210008
+
+        Reviewed by Tim Horton.
+
+        Revert all (except one) of the logging statements added in r259518, and add several new ones. This last logging
+        pass demonstrated that DragController had failed to start a drag, since -[WKContentView _didHandleDragStartRequest:]
+        receives word that the drag has started, yet there are no staged drag items.
+
+        * UIProcess/ios/DragDropInteractionState.mm:
+        (WebKit::DragDropInteractionState::stageDragItem):
+        (WebKit::DragDropInteractionState::clearStagedDragSource):
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView _didHandleAdditionalDragItemsRequest:]):
+        (-[WKContentView cleanUpDragSourceSessionState]):
+        (-[WKContentView _didPerformDragOperation:]):
+        (-[WKContentView _prepareToDragPromisedAttachment:]):
+        (-[WKContentView _dragInteraction:prepareForSession:completion:]):
+        (-[WKContentView dragInteraction:itemsForBeginningSession:]):
+        (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]):
+        (-[WKContentView dragInteraction:sessionWillBegin:]):
+        (-[WKContentView dragInteraction:session:didEndWithOperation:]):
+        (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
+        (-[WKContentView dropInteraction:canHandleSession:]):
+        (-[WKContentView dropInteraction:sessionDidEnter:]):
+        (-[WKContentView dropInteraction:sessionDidExit:]):
+        (-[WKContentView dropInteraction:performDrop:]):
+        (-[WKContentView dropInteraction:sessionDidEnd:]):
+
 2020-04-03  David Kilzer  <[email protected]>
 
         WebPlatformStrategies::{readBufferFromPasteboard,bufferForType} should validate their `size` parameter

Modified: trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm (259533 => 259534)


--- trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Source/WebKit/UIProcess/ios/DragDropInteractionState.mm	2020-04-04 18:52:15 UTC (rev 259534)
@@ -339,6 +339,7 @@
 
 void DragDropInteractionState::stageDragItem(const DragItem& item, UIImage *dragImage)
 {
+    NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, item.sourceAction);
     static NSInteger currentDragSourceItemIdentifier = 0;
 
     m_adjustedPositionForDragEnd = item.eventPositionInContentCoordinates;
@@ -363,6 +364,9 @@
 
 void DragDropInteractionState::clearStagedDragSource(DidBecomeActive didBecomeActive)
 {
+    if (m_stagedDragSource)
+        NSLog(@"%s - source action := %02x", __PRETTY_FUNCTION__, m_stagedDragSource->action);
+
     if (didBecomeActive == DidBecomeActive::Yes)
         m_activeDragSources.append(stagedDragSource());
     m_stagedDragSource = WTF::nullopt;

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (259533 => 259534)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2020-04-04 18:52:15 UTC (rev 259534)
@@ -7065,7 +7065,7 @@
     auto stagedDragSource = _dragDropInteractionState.stagedDragSource();
     NSArray *dragItemsToAdd = [self _itemsForBeginningOrAddingToSessionWithRegistrationLists:registrationLists stagedDragSource:stagedDragSource];
 
-    NSLog(@"Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);
+    RELEASE_LOG(DragAndDrop, "Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);
     _dragDropInteractionState.clearStagedDragSource(dragItemsToAdd.count ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No);
 
     completion(dragItemsToAdd);
@@ -7134,7 +7134,7 @@
         return;
 
     if (_dragDropInteractionState.dragSession() || _dragDropInteractionState.isPerformingDrop())
-        NSLog(@"Cleaning up dragging state (has pending operation: %d)", [[WebItemProviderPasteboard sharedInstance] hasPendingOperation]);
+        RELEASE_LOG(DragAndDrop, "Cleaning up dragging state (has pending operation: %d)", [[WebItemProviderPasteboard sharedInstance] hasPendingOperation]);
 
     if (![[WebItemProviderPasteboard sharedInstance] hasPendingOperation]) {
         // If we're performing a drag operation, don't clear out the pasteboard yet, since another web view may still require access to it.
@@ -7218,7 +7218,7 @@
 
 - (void)_didPerformDragOperation:(BOOL)handled
 {
-    NSLog(@"Finished performing drag controller operation (handled: %d)", handled);
+    RELEASE_LOG(DragAndDrop, "Finished performing drag controller operation (handled: %d)", handled);
     [[WebItemProviderPasteboard sharedInstance] decrementPendingOperationCount];
     id <UIDropSession> dropSession = _dragDropInteractionState.dropSession();
     if ([self.webViewUIDelegate respondsToSelector:@selector(_webView:dataInteractionOperationWasHandled:forSession:itemProviders:)])
@@ -7264,7 +7264,7 @@
     auto numberOfAdditionalTypes = info.additionalTypes.size();
     ASSERT(numberOfAdditionalTypes == info.additionalData.size());
 
-    NSLog(@"Drag session: %p preparing to drag blob: %s with attachment identifier: %s", session.get(), info.blobURL.string().utf8().data(), info.attachmentIdentifier.utf8().data());
+    RELEASE_LOG(DragAndDrop, "Drag session: %p preparing to drag blob: %s with attachment identifier: %s", session.get(), info.blobURL.string().utf8().data(), info.attachmentIdentifier.utf8().data());
 
     NSString *utiType = info.contentType;
     NSString *fileName = info.fileName;
@@ -7296,7 +7296,7 @@
 
         auto attachment = strongSelf->_page->attachmentForIdentifier(info.attachmentIdentifier);
         if (attachment && attachment->fileWrapper()) {
-            NSLog(@"Drag session: %p delivering promised attachment: %s at path: %@", session.get(), info.attachmentIdentifier.utf8().data(), destinationURL.path);
+            RELEASE_LOG(DragAndDrop, "Drag session: %p delivering promised attachment: %s at path: %@", session.get(), info.attachmentIdentifier.utf8().data(), destinationURL.path);
             NSError *fileWrapperError = nil;
             if ([attachment->fileWrapper() writeToURL:destinationURL options:0 originalContentsURL:nil error:&fileWrapperError])
                 callback(destinationURL, nil);
@@ -7619,10 +7619,10 @@
 {
     [self _cancelLongPressGestureRecognizer];
 
-    NSLog(@"Preparing for drag session: %p", session);
+    RELEASE_LOG(DragAndDrop, "Preparing for drag session: %p", session);
     if (self.currentDragOrDropSession) {
         // FIXME: Support multiple simultaneous drag sessions in the future.
-        NSLog(@"Drag session failed: %p (a current drag session already exists)", session);
+        RELEASE_LOG(DragAndDrop, "Drag session failed: %p (a current drag session already exists)", session);
         completion();
         return;
     }
@@ -7634,20 +7634,20 @@
     auto dragOrigin = WebCore::roundedIntPoint([session locationInView:self]);
     _page->requestDragStart(dragOrigin, WebCore::roundedIntPoint([self convertPoint:dragOrigin toView:self.window]), self._allowedDragSourceActions);
 
-    NSLog(@"Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());
+    RELEASE_LOG(DragAndDrop, "Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());
 }
 
 - (NSArray<UIDragItem *> *)dragInteraction:(UIDragInteraction *)interaction itemsForBeginningSession:(id <UIDragSession>)session
 {
     ASSERT(interaction == _dragInteraction);
-    NSLog(@"Drag items requested for session: %p", session);
+    RELEASE_LOG(DragAndDrop, "Drag items requested for session: %p", session);
     if (_dragDropInteractionState.dragSession() != session) {
-        NSLog(@"Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession());
+        RELEASE_LOG(DragAndDrop, "Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession());
         return @[ ];
     }
 
     if (!_dragDropInteractionState.hasStagedDragSource()) {
-        NSLog(@"Drag session failed: %p (missing staged drag source)", session);
+        RELEASE_LOG(DragAndDrop, "Drag session failed: %p (missing staged drag source)", session);
         return @[ ];
     }
 
@@ -7657,7 +7657,7 @@
     if (![dragItems count])
         _page->dragCancelled();
 
-    NSLog(@"Drag session: %p starting with %tu items", session, [dragItems count]);
+    RELEASE_LOG(DragAndDrop, "Drag session: %p starting with %tu items", session, [dragItems count]);
     _dragDropInteractionState.clearStagedDragSource([dragItems count] ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No);
 
     return dragItems;
@@ -7676,7 +7676,7 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction willAnimateLiftWithAnimator:(id <UIDragAnimating>)animator session:(id <UIDragSession>)session
 {
-    NSLog(@"Drag session willAnimateLiftWithAnimator: %p", session);
+    RELEASE_LOG(DragAndDrop, "Drag session willAnimateLiftWithAnimator: %p", session);
     if (_dragDropInteractionState.anyActiveDragSourceIs(WebCore::DragSourceActionSelection)) {
         [self cancelActiveTextInteractionGestures];
         if (!_shouldRestoreCalloutBarAfterDrop) {
@@ -7693,7 +7693,7 @@
         UNUSED_PARAM(session);
 #endif
         if (finalPosition == UIViewAnimatingPositionStart) {
-            NSLog(@"Drag session ended at start: %p", session);
+            RELEASE_LOG(DragAndDrop, "Drag session ended at start: %p", session);
             // The lift was canceled, so -dropInteraction:sessionDidEnd: will never be invoked. This is the last chance to clean up.
             [protectedSelf cleanUpDragSourceSessionState];
             page->dragEnded(positionForDragEnd, positionForDragEnd, WebCore::DragOperationNone);
@@ -7700,7 +7700,7 @@
         }
 #if !RELEASE_LOG_DISABLED
         else
-            NSLog(@"Drag session did not end at start: %p", session);
+            RELEASE_LOG(DragAndDrop, "Drag session did not end at start: %p", session);
 #endif
     }];
 }
@@ -7707,7 +7707,7 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction sessionWillBegin:(id <UIDragSession>)session
 {
-    NSLog(@"Drag session beginning: %p", session);
+    RELEASE_LOG(DragAndDrop, "Drag session beginning: %p", session);
     id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate;
     if ([uiDelegate respondsToSelector:@selector(_webView:dataInteraction:sessionWillBegin:)])
         [uiDelegate _webView:self.webView dataInteraction:interaction sessionWillBegin:session];
@@ -7719,7 +7719,7 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction session:(id <UIDragSession>)session didEndWithOperation:(UIDropOperation)operation
 {
-    NSLog(@"Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
+    RELEASE_LOG(DragAndDrop, "Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
 
     [self _restoreCalloutBarIfNeeded];
 
@@ -7753,9 +7753,9 @@
 
 - (void)dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator
 {
-    NSLog(@"Drag interaction willAnimateCancelWithAnimator");
+    RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator");
     [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
-        NSLog(@"Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");
+        RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");
         page->dragCancelled();
         if (auto completion = protectedSelf->_dragDropInteractionState.takeDragCancelSetDownBlock()) {
             page->callAfterNextPresentationUpdate([completion] (WebKit::CallbackBase::Error) {
@@ -7785,7 +7785,7 @@
 {
     // FIXME: Support multiple simultaneous drop sessions in the future.
     id <UIDragDropSession> dragOrDropSession = self.currentDragOrDropSession;
-    NSLog(@"Can handle drag session: %p with local session: %p existing session: %p?", session, session.localDragSession, dragOrDropSession);
+    RELEASE_LOG(DragAndDrop, "Can handle drag session: %p with local session: %p existing session: %p?", session, session.localDragSession, dragOrDropSession);
 
     return !dragOrDropSession || session.localDragSession == dragOrDropSession;
 }
@@ -7792,7 +7792,7 @@
 
 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnter:(id <UIDropSession>)session
 {
-    NSLog(@"Drop session entered: %p with %tu items", session, session.items.count);
+    RELEASE_LOG(DragAndDrop, "Drop session entered: %p with %tu items", session, session.items.count);
     auto dragData = [self dragDataForDropSession:session dragDestinationAction:[self _dragDestinationActionForDropSession:session]];
 
     _dragDropInteractionState.dropSessionDidEnterOrUpdate(session, dragData);
@@ -7834,7 +7834,7 @@
 
 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidExit:(id <UIDropSession>)session
 {
-    NSLog(@"Drop session exited: %p with %tu items", session, session.items.count);
+    RELEASE_LOG(DragAndDrop, "Drop session exited: %p with %tu items", session, session.items.count);
     [[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)];
 
     auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny];
@@ -7866,7 +7866,7 @@
     auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny];
     BOOL shouldSnapshotView = ![self _handleDropByInsertingImagePlaceholders:itemProviders session:session];
 
-    NSLog(@"Loading data from %tu item providers for session: %p", itemProviders.count, session);
+    RELEASE_LOG(DragAndDrop, "Loading data from %tu item providers for session: %p", itemProviders.count, session);
     // Always loading content from the item provider ensures that the web process will be allowed to call back in to the UI
     // process to access pasteboard contents at a later time. Ideally, we only need to do this work if we're over a file input
     // or the page prevented default on `dragover`, but without this, dropping into a normal editable areas will fail due to
@@ -7873,7 +7873,7 @@
     // item providers not loading any data.
     RetainPtr<WKContentView> retainedSelf(self);
     [[WebItemProviderPasteboard sharedInstance] doAfterLoadingProvidedContentIntoFileURLs:[retainedSelf, capturedDragData = WTFMove(dragData), shouldSnapshotView] (NSArray *fileURLs) mutable {
-        NSLog(@"Loaded data into %tu files", fileURLs.count);
+        RELEASE_LOG(DragAndDrop, "Loaded data into %tu files", fileURLs.count);
         Vector<String> filenames;
         for (NSURL *fileURL in fileURLs)
             filenames.append([fileURL path]);
@@ -7935,7 +7935,7 @@
 
 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnd:(id <UIDropSession>)session
 {
-    NSLog(@"Drop session ended: %p (performing operation: %d, began dragging: %d)", session, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
+    RELEASE_LOG(DragAndDrop, "Drop session ended: %p (performing operation: %d, began dragging: %d)", session, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
     if (_dragDropInteractionState.isPerformingDrop()) {
         // In the case where we are performing a drop, wait until after the drop is handled in the web process to reset drag and drop interaction state.
         return;

Modified: trunk/Tools/ChangeLog (259533 => 259534)


--- trunk/Tools/ChangeLog	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Tools/ChangeLog	2020-04-04 18:52:15 UTC (rev 259534)
@@ -1,3 +1,20 @@
+2020-04-04  Wenson Hsieh  <[email protected]>
+
+        Add even more logging to try and diagnose <webkit.org/b/209685>
+        https://bugs.webkit.org/show_bug.cgi?id=210008
+
+        Reviewed by Tim Horton.
+
+        Replace old logging with new logging (in different places).
+
+        * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm:
+        (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]):
+        (-[DragAndDropSimulator _advanceProgress]):
+        (-[DragAndDropSimulator _webView:adjustedDataInteractionItemProvidersForItemProvider:representingObjects:additionalData:]):
+
+        Rule out the possibility that the WebKit client (in this case, the drag and drop simulator) is overriding the
+        list of drag items by logging the given NSItemProvider that will be used to start the drag.
+
 2020-04-04  Peng Liu  <[email protected]>
 
         REGRESSION (r259095): ASSERTION FAILED: m_videoFullscreenMode != VideoFullscreenModeNone seen with TestWebKitAPI.WebKitLegacy.AudioSessionCategoryIOS

Modified: trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm (259533 => 259534)


--- trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-04-04 18:38:24 UTC (rev 259533)
+++ trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm	2020-04-04 18:52:15 UTC (rev 259534)
@@ -455,9 +455,7 @@
     } else {
         _dragSession = adoptNS([[MockDragSession alloc] initWithWindow:[_webView window] allowMove:self.shouldAllowMoveOperation]);
         [_dragSession setMockLocationInWindow:_startLocation];
-        NSLog(@"%s - preparing for drag session", __PRETTY_FUNCTION__);
         [(id <UIDragInteractionDelegate_ForWebKitOnly>)[_webView dragInteractionDelegate] _dragInteraction:[_webView dragInteraction] prepareForSession:_dragSession.get() completion:[strongSelf = retainPtr(self)] {
-            NSLog(@"%s - done preparing for drag session with phase: %ld", __PRETTY_FUNCTION__, strongSelf->_phase);
             if (strongSelf->_phase == DragAndDropPhaseCancelled)
                 return;
 
@@ -604,12 +602,12 @@
         return;
     }
 
-    NSLog(@"%s - phase: %ld", __PRETTY_FUNCTION__, _phase);
     switch (_phase) {
     case DragAndDropPhaseBeginning: {
         NSMutableArray<NSItemProvider *> *itemProviders = [NSMutableArray array];
         NSArray *items = [[_webView dragInteractionDelegate] dragInteraction:[_webView dragInteraction] itemsForBeginningSession:_dragSession.get()];
         if (!items.count) {
+            NSLog(@"%s (found no drag items when beginning session)", __PRETTY_FUNCTION__);
             _phase = DragAndDropPhaseCancelled;
             _currentProgress = 1;
             _isDoneWithCurrentRun = true;
@@ -900,6 +898,7 @@
 
 - (NSArray *)_webView:(WKWebView *)webView adjustedDataInteractionItemProvidersForItemProvider:(NSItemProvider *)itemProvider representingObjects:(NSArray *)representingObjects additionalData:(NSDictionary *)additionalData
 {
+    NSLog(@"%s - self.convertItemProvidersBlock := %p; itemProvider.registeredTypeIdentifiers := %@", __PRETTY_FUNCTION__, self.convertItemProvidersBlock, itemProvider.registeredTypeIdentifiers);
     return self.convertItemProvidersBlock ? self.convertItemProvidersBlock(itemProvider, representingObjects, additionalData) : @[ itemProvider ];
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to