Changeset 259518 in webkit
- Timestamp:
- Apr 3, 2020 3:45:16 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259513 r259518 1 2020-04-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Add more logging to help diagnose <webkit.org/b/209685> 4 https://bugs.webkit.org/show_bug.cgi?id=209988 5 6 Reviewed by Timothy Hatcher. 7 8 Remove logging that was previously added in r259465. 9 10 * platform/ios/WebItemProviderPasteboard.mm: 11 (-[WebItemProviderPasteboard updateSupportedTypeIdentifiers:]): 12 1 13 2020-04-02 Ryosuke Niwa <rniwa@webkit.org> 2 14 -
trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm
r259465 r259518 493 493 - (void)updateSupportedTypeIdentifiers:(NSArray<NSString *> *)types 494 494 { 495 NSLog(@"%s => %@", __PRETTY_FUNCTION__, types);496 495 _supportedTypeIdentifiers = types; 497 496 } -
trunk/Source/WebKit/ChangeLog
r259517 r259518 1 2020-04-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Add more logging to help diagnose <webkit.org/b/209685> 4 https://bugs.webkit.org/show_bug.cgi?id=209988 5 6 Reviewed by Timothy Hatcher. 7 8 Replace logging that was previously added in r259465 with different logging. The fact that the prior logging 9 never showed up in the failing tests suggests that the problem happens earlier than I had expected, so we need 10 to ensure that codepaths for preparing and beginning a drag session are logged instead. 11 12 This turns several existing `RELEASE_LOG`s in WKContentView into `NSLog`s, so that they will show up in test 13 failure output when run on the bots. 14 15 * UIProcess/ios/WKContentViewInteraction.mm: 16 (-[WKContentView _didHandleAdditionalDragItemsRequest:]): 17 (-[WKContentView _didHandleDragStartRequest:]): 18 (-[WKContentView cleanUpDragSourceSessionState]): 19 (-[WKContentView _didPerformDragOperation:]): 20 (-[WKContentView _prepareToDragPromisedAttachment:]): 21 (-[WKContentView _dragInteraction:prepareForSession:completion:]): 22 (-[WKContentView dragInteraction:itemsForBeginningSession:]): 23 (-[WKContentView dragInteraction:willAnimateLiftWithAnimator:session:]): 24 (-[WKContentView dragInteraction:sessionWillBegin:]): 25 (-[WKContentView dragInteraction:session:didEndWithOperation:]): 26 (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]): 27 (-[WKContentView dropInteraction:canHandleSession:]): 28 (-[WKContentView dropInteraction:sessionDidEnter:]): 29 (-[WKContentView dropInteraction:sessionDidUpdate:]): 30 (-[WKContentView dropInteraction:sessionDidExit:]): 31 (-[WKContentView dropInteraction:performDrop:]): 32 (-[WKContentView dropInteraction:sessionDidEnd:]): 33 1 34 2020-04-03 Chris Dumez <cdumez@apple.com> 2 35 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r259465 r259518 7066 7066 NSArray *dragItemsToAdd = [self _itemsForBeginningOrAddingToSessionWithRegistrationLists:registrationLists stagedDragSource:stagedDragSource]; 7067 7067 7068 RELEASE_LOG(DragAndDrop,"Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count);7068 NSLog(@"Drag session: %p adding %tu items", _dragDropInteractionState.dragSession(), dragItemsToAdd.count); 7069 7069 _dragDropInteractionState.clearStagedDragSource(dragItemsToAdd.count ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No); 7070 7070 … … 7080 7080 ASSERT(savedCompletionBlock); 7081 7081 7082 RELEASE_LOG(DragAndDrop,"Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get());7082 NSLog(@"Handling drag start request (started: %d, completion block: %p)", started, savedCompletionBlock.get()); 7083 7083 if (savedCompletionBlock) 7084 7084 savedCompletionBlock(); … … 7135 7135 7136 7136 if (_dragDropInteractionState.dragSession() || _dragDropInteractionState.isPerformingDrop()) 7137 RELEASE_LOG(DragAndDrop,"Cleaning up dragging state (has pending operation: %d)", [[WebItemProviderPasteboard sharedInstance] hasPendingOperation]);7137 NSLog(@"Cleaning up dragging state (has pending operation: %d)", [[WebItemProviderPasteboard sharedInstance] hasPendingOperation]); 7138 7138 7139 7139 if (![[WebItemProviderPasteboard sharedInstance] hasPendingOperation]) { … … 7219 7219 - (void)_didPerformDragOperation:(BOOL)handled 7220 7220 { 7221 RELEASE_LOG(DragAndDrop,"Finished performing drag controller operation (handled: %d)", handled);7221 NSLog(@"Finished performing drag controller operation (handled: %d)", handled); 7222 7222 [[WebItemProviderPasteboard sharedInstance] decrementPendingOperationCount]; 7223 7223 id <UIDropSession> dropSession = _dragDropInteractionState.dropSession(); … … 7265 7265 ASSERT(numberOfAdditionalTypes == info.additionalData.size()); 7266 7266 7267 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());7267 NSLog(@"Drag session: %p preparing to drag blob: %s with attachment identifier: %s", session.get(), info.blobURL.string().utf8().data(), info.attachmentIdentifier.utf8().data()); 7268 7268 7269 7269 NSString *utiType = info.contentType; … … 7297 7297 auto attachment = strongSelf->_page->attachmentForIdentifier(info.attachmentIdentifier); 7298 7298 if (attachment && attachment->fileWrapper()) { 7299 RELEASE_LOG(DragAndDrop,"Drag session: %p delivering promised attachment: %s at path: %@", session.get(), info.attachmentIdentifier.utf8().data(), destinationURL.path);7299 NSLog(@"Drag session: %p delivering promised attachment: %s at path: %@", session.get(), info.attachmentIdentifier.utf8().data(), destinationURL.path); 7300 7300 NSError *fileWrapperError = nil; 7301 7301 if ([attachment->fileWrapper() writeToURL:destinationURL options:0 originalContentsURL:nil error:&fileWrapperError]) … … 7620 7620 [self _cancelLongPressGestureRecognizer]; 7621 7621 7622 RELEASE_LOG(DragAndDrop,"Preparing for drag session: %p", session);7622 NSLog(@"Preparing for drag session: %p", session); 7623 7623 if (self.currentDragOrDropSession) { 7624 7624 // FIXME: Support multiple simultaneous drag sessions in the future. 7625 RELEASE_LOG(DragAndDrop,"Drag session failed: %p (a current drag session already exists)", session);7625 NSLog(@"Drag session failed: %p (a current drag session already exists)", session); 7626 7626 completion(); 7627 7627 return; … … 7635 7635 _page->requestDragStart(dragOrigin, WebCore::roundedIntPoint([self convertPoint:dragOrigin toView:self.window]), self._allowedDragSourceActions); 7636 7636 7637 RELEASE_LOG(DragAndDrop,"Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y());7637 NSLog(@"Drag session requested: %p at origin: {%d, %d}", session, dragOrigin.x(), dragOrigin.y()); 7638 7638 } 7639 7639 … … 7641 7641 { 7642 7642 ASSERT(interaction == _dragInteraction); 7643 RELEASE_LOG(DragAndDrop,"Drag items requested for session: %p", session);7643 NSLog(@"Drag items requested for session: %p", session); 7644 7644 if (_dragDropInteractionState.dragSession() != session) { 7645 RELEASE_LOG(DragAndDrop,"Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession());7645 NSLog(@"Drag session failed: %p (delegate session does not match %p)", session, _dragDropInteractionState.dragSession()); 7646 7646 return @[ ]; 7647 7647 } 7648 7648 7649 7649 if (!_dragDropInteractionState.hasStagedDragSource()) { 7650 RELEASE_LOG(DragAndDrop,"Drag session failed: %p (missing staged drag source)", session);7650 NSLog(@"Drag session failed: %p (missing staged drag source)", session); 7651 7651 return @[ ]; 7652 7652 } … … 7658 7658 _page->dragCancelled(); 7659 7659 7660 RELEASE_LOG(DragAndDrop,"Drag session: %p starting with %tu items", session, [dragItems count]);7660 NSLog(@"Drag session: %p starting with %tu items", session, [dragItems count]); 7661 7661 _dragDropInteractionState.clearStagedDragSource([dragItems count] ? WebKit::DragDropInteractionState::DidBecomeActive::Yes : WebKit::DragDropInteractionState::DidBecomeActive::No); 7662 7662 … … 7677 7677 - (void)dragInteraction:(UIDragInteraction *)interaction willAnimateLiftWithAnimator:(id <UIDragAnimating>)animator session:(id <UIDragSession>)session 7678 7678 { 7679 RELEASE_LOG(DragAndDrop,"Drag session willAnimateLiftWithAnimator: %p", session);7679 NSLog(@"Drag session willAnimateLiftWithAnimator: %p", session); 7680 7680 if (_dragDropInteractionState.anyActiveDragSourceIs(WebCore::DragSourceActionSelection)) { 7681 7681 [self cancelActiveTextInteractionGestures]; … … 7694 7694 #endif 7695 7695 if (finalPosition == UIViewAnimatingPositionStart) { 7696 RELEASE_LOG(DragAndDrop,"Drag session ended at start: %p", session);7696 NSLog(@"Drag session ended at start: %p", session); 7697 7697 // The lift was canceled, so -dropInteraction:sessionDidEnd: will never be invoked. This is the last chance to clean up. 7698 7698 [protectedSelf cleanUpDragSourceSessionState]; … … 7701 7701 #if !RELEASE_LOG_DISABLED 7702 7702 else 7703 RELEASE_LOG(DragAndDrop,"Drag session did not end at start: %p", session);7703 NSLog(@"Drag session did not end at start: %p", session); 7704 7704 #endif 7705 7705 }]; … … 7708 7708 - (void)dragInteraction:(UIDragInteraction *)interaction sessionWillBegin:(id <UIDragSession>)session 7709 7709 { 7710 RELEASE_LOG(DragAndDrop,"Drag session beginning: %p", session);7710 NSLog(@"Drag session beginning: %p", session); 7711 7711 id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate; 7712 7712 if ([uiDelegate respondsToSelector:@selector(_webView:dataInteraction:sessionWillBegin:)]) … … 7720 7720 - (void)dragInteraction:(UIDragInteraction *)interaction session:(id <UIDragSession>)session didEndWithOperation:(UIDropOperation)operation 7721 7721 { 7722 RELEASE_LOG(DragAndDrop,"Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());7722 NSLog(@"Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging()); 7723 7723 7724 7724 [self _restoreCalloutBarIfNeeded]; … … 7754 7754 - (void)dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator 7755 7755 { 7756 RELEASE_LOG(DragAndDrop,"Drag interaction willAnimateCancelWithAnimator");7756 NSLog(@"Drag interaction willAnimateCancelWithAnimator"); 7757 7757 [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) { 7758 RELEASE_LOG(DragAndDrop,"Drag interaction willAnimateCancelWithAnimator (animation completion block fired)");7758 NSLog(@"Drag interaction willAnimateCancelWithAnimator (animation completion block fired)"); 7759 7759 page->dragCancelled(); 7760 7760 if (auto completion = protectedSelf->_dragDropInteractionState.takeDragCancelSetDownBlock()) { … … 7786 7786 // FIXME: Support multiple simultaneous drop sessions in the future. 7787 7787 id <UIDragDropSession> dragOrDropSession = self.currentDragOrDropSession; 7788 RELEASE_LOG(DragAndDrop,"Can handle drag session: %p with local session: %p existing session: %p?", session, session.localDragSession, dragOrDropSession);7788 NSLog(@"Can handle drag session: %p with local session: %p existing session: %p?", session, session.localDragSession, dragOrDropSession); 7789 7789 7790 7790 return !dragOrDropSession || session.localDragSession == dragOrDropSession; … … 7793 7793 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnter:(id <UIDropSession>)session 7794 7794 { 7795 RELEASE_LOG(DragAndDrop,"Drop session entered: %p with %tu items", session, session.items.count);7795 NSLog(@"Drop session entered: %p with %tu items", session, session.items.count); 7796 7796 auto dragData = [self dragDataForDropSession:session dragDestinationAction:[self _dragDestinationActionForDropSession:session]]; 7797 7797 … … 7830 7830 proposal = [delegate _webView:self.webView willUpdateDropProposalToProposal:proposal.get() forSession:session]; 7831 7831 7832 NSLog(@"%s => %lu", __PRETTY_FUNCTION__, [proposal operation]);7833 7832 return proposal.autorelease(); 7834 7833 } … … 7836 7835 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidExit:(id <UIDropSession>)session 7837 7836 { 7838 RELEASE_LOG(DragAndDrop,"Drop session exited: %p with %tu items", session, session.items.count);7837 NSLog(@"Drop session exited: %p with %tu items", session, session.items.count); 7839 7838 [[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)]; 7840 7839 … … 7868 7867 BOOL shouldSnapshotView = ![self _handleDropByInsertingImagePlaceholders:itemProviders session:session]; 7869 7868 7870 RELEASE_LOG(DragAndDrop,"Loading data from %tu item providers for session: %p", itemProviders.count, session);7869 NSLog(@"Loading data from %tu item providers for session: %p", itemProviders.count, session); 7871 7870 // Always loading content from the item provider ensures that the web process will be allowed to call back in to the UI 7872 7871 // process to access pasteboard contents at a later time. Ideally, we only need to do this work if we're over a file input … … 7875 7874 RetainPtr<WKContentView> retainedSelf(self); 7876 7875 [[WebItemProviderPasteboard sharedInstance] doAfterLoadingProvidedContentIntoFileURLs:[retainedSelf, capturedDragData = WTFMove(dragData), shouldSnapshotView] (NSArray *fileURLs) mutable { 7877 RELEASE_LOG(DragAndDrop,"Loaded data into %tu files", fileURLs.count);7876 NSLog(@"Loaded data into %tu files", fileURLs.count); 7878 7877 Vector<String> filenames; 7879 7878 for (NSURL *fileURL in fileURLs) … … 7937 7936 - (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnd:(id <UIDropSession>)session 7938 7937 { 7939 RELEASE_LOG(DragAndDrop,"Drop session ended: %p (performing operation: %d, began dragging: %d)", session, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging());7938 NSLog(@"Drop session ended: %p (performing operation: %d, began dragging: %d)", session, _dragDropInteractionState.isPerformingDrop(), _dragDropInteractionState.didBeginDragging()); 7940 7939 if (_dragDropInteractionState.isPerformingDrop()) { 7941 7940 // 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. -
trunk/Tools/ChangeLog
r259516 r259518 1 2020-04-03 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Add more logging to help diagnose <webkit.org/b/209685> 4 https://bugs.webkit.org/show_bug.cgi?id=209988 5 6 Reviewed by Timothy Hatcher. 7 8 * TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm: 9 10 Fix a few stray style mistakes (unnecessary `.get()`s). 11 12 * TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm: 13 (-[DragAndDropSimulator runFrom:to:additionalItemRequestLocations:]): 14 (-[DragAndDropSimulator _advanceProgress]): 15 1 16 2020-04-03 Truitt Savell <tsavell@apple.com> 2 17 -
trunk/Tools/TestWebKitAPI/Tests/ios/DragAndDropTestsIOS.mm
r251941 r259518 1973 1973 1974 1974 __block bool done = false; 1975 [simulator .get()setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session)1975 [simulator setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session) 1976 1976 { 1977 1977 EXPECT_EQ(1UL, session.items.count); … … 2010 2010 2011 2011 __block bool done = false; 2012 [simulator .get()setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session)2012 [simulator setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session) 2013 2013 { 2014 2014 EXPECT_EQ(1UL, session.items.count); … … 2071 2071 2072 2072 __block bool done = false; 2073 [simulator .get()setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session)2073 [simulator setOverridePerformDropBlock:^NSArray<UIDragItem *> *(id <UIDropSession> session) 2074 2074 { 2075 2075 EXPECT_EQ(1UL, session.items.count); -
trunk/Tools/TestWebKitAPI/ios/DragAndDropSimulatorIOS.mm
r258659 r259518 456 456 _dragSession = adoptNS([[MockDragSession alloc] initWithWindow:[_webView window] allowMove:self.shouldAllowMoveOperation]); 457 457 [_dragSession setMockLocationInWindow:_startLocation]; 458 NSLog(@"%s - preparing for drag session", __PRETTY_FUNCTION__); 458 459 [(id <UIDragInteractionDelegate_ForWebKitOnly>)[_webView dragInteractionDelegate] _dragInteraction:[_webView dragInteraction] prepareForSession:_dragSession.get() completion:[strongSelf = retainPtr(self)] { 460 NSLog(@"%s - done preparing for drag session with phase: %ld", __PRETTY_FUNCTION__, strongSelf->_phase); 459 461 if (strongSelf->_phase == DragAndDropPhaseCancelled) 460 462 return; … … 603 605 } 604 606 607 NSLog(@"%s - phase: %ld", __PRETTY_FUNCTION__, _phase); 605 608 switch (_phase) { 606 609 case DragAndDropPhaseBeginning: {
Note: See TracChangeset
for help on using the changeset viewer.