Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (259517 => 259518)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-04-03 22:14:18 UTC (rev 259517)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2020-04-03 22:45:16 UTC (rev 259518)
@@ -7065,7 +7065,7 @@
auto stagedDragSource = _dragDropInteractionState.stagedDragSource();
NSArray *dragItemsToAdd = [self _itemsForBeginningOrAddingToSessionWithRegistrationLists:registrationLists stagedDragSource:stagedDragSource];
- RELEASE_LOG(DragAndDrop, "Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);
+ NSLog(@"Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);
_dragDropInteractionState.clearStagedDragSource(dragItemsToAdd.count ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No);
completion(dragItemsToAdd);
@@ -7079,7 +7079,7 @@
BlockPtr<void()> savedCompletionBlock = _dragDropInteractionState.takeDragStartCompletionBlock();
ASSERT(savedCompletionBlock);
- RELEASE_LOG(DragAndDrop, "Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
+ NSLog(@"Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());
if (savedCompletionBlock)
savedCompletionBlock();
@@ -7134,7 +7134,7 @@
return;
if (_dragDropInteractionState.dragSession() || _dragDropInteractionState.isPerformingDrop())
- RELEASE_LOG(DragAndDrop, "Cleaning up dragging state (has pending operation: %d)", [[WebItemProviderPasteboard sharedInstance] hasPendingOperation]);
+ NSLog(@"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
{
- RELEASE_LOG(DragAndDrop, "Finished performing drag controller operation (handled: %d)", handled);
+ NSLog(@"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());
- 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());
+ NSLog(@"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()) {
- RELEASE_LOG(DragAndDrop, "Drag session: %p delivering promised attachment: %s at path: %@", session.get(), info.attachmentIdentifier.utf8().data(), destinationURL.path);
+ NSLog(@"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];
- RELEASE_LOG(DragAndDrop, "Preparing for drag session: %p", session);
+ NSLog(@"Preparing for drag session: %p", session);
if (self.currentDragOrDropSession) {
// FIXME: Support multiple simultaneous drag sessions in the future.
- RELEASE_LOG(DragAndDrop, "Drag session failed: %p (a current drag session already exists)", session);
+ NSLog(@"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);
- RELEASE_LOG(DragAndDrop, "Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());
+ NSLog(@"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);
- RELEASE_LOG(DragAndDrop, "Drag items requested for session: %p", session);
+ NSLog(@"Drag items requested for session: %p", session);
if (_dragDropInteractionState.dragSession() != session) {
- RELEASE_LOG(DragAndDrop, "Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession());
+ NSLog(@"Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession());
return @[ ];
}
if (!_dragDropInteractionState.hasStagedDragSource()) {
- RELEASE_LOG(DragAndDrop, "Drag session failed: %p (missing staged drag source)", session);
+ NSLog(@"Drag session failed: %p (missing staged drag source)", session);
return @[ ];
}
@@ -7657,7 +7657,7 @@
if (![dragItems count])
_page->dragCancelled();
- RELEASE_LOG(DragAndDrop, "Drag session: %p starting with %tu items", session, [dragItems count]);
+ NSLog(@"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
{
- RELEASE_LOG(DragAndDrop, "Drag session willAnimateLiftWithAnimator: %p", session);
+ NSLog(@"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) {
- RELEASE_LOG(DragAndDrop, "Drag session ended at start: %p", session);
+ NSLog(@"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
- RELEASE_LOG(DragAndDrop, "Drag session did not end at start: %p", session);
+ NSLog(@"Drag session did not end at start: %p", session);
#endif
}];
}
@@ -7707,7 +7707,7 @@
- (void)dragInteraction:(UIDragInteraction *)interaction sessionWillBegin:(id <UIDragSession>)session
{
- RELEASE_LOG(DragAndDrop, "Drag session beginning: %p", session);
+ NSLog(@"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
{
- RELEASE_LOG(DragAndDrop, "Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
+ NSLog(@"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
{
- RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator");
+ NSLog(@"Drag interaction willAnimateCancelWithAnimator");
[animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
- RELEASE_LOG(DragAndDrop, "Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");
+ NSLog(@"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;
- RELEASE_LOG(DragAndDrop, "Can handle drag session: %p with local session: %p existing session: %p?", session, session.localDragSession, dragOrDropSession);
+ NSLog(@"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
{
- RELEASE_LOG(DragAndDrop, "Drop session entered: %p with %tu items", session, session.items.count);
+ NSLog(@"Drop session entered: %p with %tu items", session, session.items.count);
auto dragData = [self dragDataForDropSession:session dragDestinationAction:[self _dragDestinationActionForDropSession:session]];
_dragDropInteractionState.dropSessionDidEnterOrUpdate(session, dragData);
@@ -7829,13 +7829,12 @@
if ([delegate respondsToSelector:@selector(_webView:willUpdateDropProposalToProposal:forSession:)])
proposal = [delegate _webView:self.webView willUpdateDropProposalToProposal:proposal.get() forSession:session];
- NSLog(@"%s => %lu", __PRETTY_FUNCTION__, [proposal operation]);
return proposal.autorelease();
}
- (void)dropInteraction:(UIDropInteraction *)interaction sessionDidExit:(id <UIDropSession>)session
{
- RELEASE_LOG(DragAndDrop, "Drop session exited: %p with %tu items", session, session.items.count);
+ NSLog(@"Drop session exited: %p with %tu items", session, session.items.count);
[[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)];
auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny];
@@ -7867,7 +7866,7 @@
auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny];
BOOL shouldSnapshotView = ![self _handleDropByInsertingImagePlaceholders:itemProviders session:session];
- RELEASE_LOG(DragAndDrop, "Loading data from %tu item providers for session: %p", itemProviders.count, session);
+ NSLog(@"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
@@ -7874,7 +7873,7 @@
// item providers not loading any data.
RetainPtr<WKContentView> retainedSelf(self);
[[WebItemProviderPasteboard sharedInstance] doAfterLoadingProvidedContentIntoFileURLs:[retainedSelf, capturedDragData = WTFMove(dragData), shouldSnapshotView] (NSArray *fileURLs) mutable {
- RELEASE_LOG(DragAndDrop, "Loaded data into %tu files", fileURLs.count);
+ NSLog(@"Loaded data into %tu files", fileURLs.count);
Vector<String> filenames;
for (NSURL *fileURL in fileURLs)
filenames.append([fileURL path]);
@@ -7936,7 +7935,7 @@
- (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnd:(id <UIDropSession>)session
{
- RELEASE_LOG(DragAndDrop, "Drop session ended: %p (performing operation: %d, began dragging: %d)", session, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());
+ NSLog(@"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;