Replace staging-prefixed UIKit drag and drop delegate methods with their public SDK...
authorwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jun 2017 16:09:36 +0000 (16:09 +0000)
committerwenson_hsieh@apple.com <wenson_hsieh@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 29 Jun 2017 16:09:36 +0000 (16:09 +0000)
https://bugs.webkit.org/show_bug.cgi?id=173959

Reviewed by Sam Weinig.

Remove references to _api_-prefixed UIDragInteractionDelegate and UIDropInteractionDelegate methods,
and replace them with their counterparts in the public SDK.

* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView dragInteraction:previewForLiftingItem:session:]):
(-[WKContentView dragInteraction:session:didEndWithOperation:]):
(-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
(-[WKContentView dropInteraction:sessionDidEnter:]):
(-[WKContentView dropInteraction:sessionDidUpdate:]):
(-[WKContentView _simulateDataInteractionEntered:]):
(-[WKContentView _simulateDataInteractionUpdated:]):
(-[WKContentView _simulateDataInteractionSessionDidEnd:]):
(-[WKContentView _api_dragInteraction:previewForLiftingItem:session:]): Deleted.
(-[WKContentView _api_dragInteraction:session:didEndWithOperation:]): Deleted.
(-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]): Deleted.
(-[WKContentView _api_dropInteraction:sessionDidEnter:]): Deleted.
(-[WKContentView _api_dropInteraction:sessionDidUpdate:]): Deleted.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@218924 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm

index 439f567..88ab230 100644 (file)
@@ -1,3 +1,28 @@
+2017-06-29  Wenson Hsieh  <wenson_hsieh@apple.com>
+
+        Replace staging-prefixed UIKit drag and drop delegate methods with their public SDK versions
+        https://bugs.webkit.org/show_bug.cgi?id=173959
+
+        Reviewed by Sam Weinig.
+
+        Remove references to _api_-prefixed UIDragInteractionDelegate and UIDropInteractionDelegate methods,
+        and replace them with their counterparts in the public SDK.
+
+        * UIProcess/ios/WKContentViewInteraction.mm:
+        (-[WKContentView dragInteraction:previewForLiftingItem:session:]):
+        (-[WKContentView dragInteraction:session:didEndWithOperation:]):
+        (-[WKContentView dragInteraction:item:willAnimateCancelWithAnimator:]):
+        (-[WKContentView dropInteraction:sessionDidEnter:]):
+        (-[WKContentView dropInteraction:sessionDidUpdate:]):
+        (-[WKContentView _simulateDataInteractionEntered:]):
+        (-[WKContentView _simulateDataInteractionUpdated:]):
+        (-[WKContentView _simulateDataInteractionSessionDidEnd:]):
+        (-[WKContentView _api_dragInteraction:previewForLiftingItem:session:]): Deleted.
+        (-[WKContentView _api_dragInteraction:session:didEndWithOperation:]): Deleted.
+        (-[WKContentView _api_dragInteraction:item:willAnimateCancelWithAnimator:]): Deleted.
+        (-[WKContentView _api_dropInteraction:sessionDidEnter:]): Deleted.
+        (-[WKContentView _api_dropInteraction:sessionDidUpdate:]): Deleted.
+
 2017-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ unit tests crashing after r218922.
 2017-06-29  Carlos Garcia Campos  <cgarcia@igalia.com>
 
         Unreviewed. Fix GTK+ unit tests crashing after r218922.
index 6280f04..b6fdfbb 100644 (file)
@@ -4597,7 +4597,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     return itemsForDragInteraction.get();
 }
 
     return itemsForDragInteraction.get();
 }
 
-- (UITargetedDragPreview *)_api_dragInteraction:(UIDragInteraction *)interaction previewForLiftingItem:(UIDragItem *)item session:(id <UIDragSession>)session
+- (UITargetedDragPreview *)dragInteraction:(UIDragInteraction *)interaction previewForLiftingItem:(UIDragItem *)item session:(id <UIDragSession>)session
 {
     id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate;
     if ([uiDelegate respondsToSelector:@selector(_webView:previewForLiftingItem:session:)]) {
 {
     id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate;
     if ([uiDelegate respondsToSelector:@selector(_webView:previewForLiftingItem:session:)]) {
@@ -4638,7 +4638,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     _page->didStartDrag();
 }
 
     _page->didStartDrag();
 }
 
-- (void)_api_dragInteraction:(UIDragInteraction *)interaction session:(id <UIDragSession>)session didEndWithOperation:(UIDropOperation)operation
+- (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, _dataInteractionState.isPerformingOperation, _dataInteractionState.didBeginDragging);
     id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate;
 {
     RELEASE_LOG(DragAndDrop, "Drag session ended: %p (with operation: %tu, performing operation: %d, began dragging: %d)", session, operation, _dataInteractionState.isPerformingOperation, _dataInteractionState.didBeginDragging);
     id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate;
@@ -4669,7 +4669,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     return YES;
 }
 
     return YES;
 }
 
-- (void)_api_dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator
+- (void)dragInteraction:(UIDragInteraction *)interaction item:(UIDragItem *)item willAnimateCancelWithAnimator:(id <UIDragAnimating>)animator
 {
     [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
         page->dragCancelled();
 {
     [animator addCompletion:[protectedSelf = retainPtr(self), page = _page] (UIViewAnimatingPosition finalPosition) {
         page->dragCancelled();
@@ -4693,7 +4693,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     return !dragOrDropSession || session.localDragSession == dragOrDropSession;
 }
 
     return !dragOrDropSession || session.localDragSession == dragOrDropSession;
 }
 
-- (void)_api_dropInteraction:(UIDropInteraction *)interaction sessionDidEnter:(id <UIDropSession>)session
+- (void)dropInteraction:(UIDropInteraction *)interaction sessionDidEnter:(id <UIDropSession>)session
 {
     RELEASE_LOG(DragAndDrop, "Drop session entered: %p with %tu items", session, session.items.count);
     _dataInteractionState.dropSession = session;
 {
     RELEASE_LOG(DragAndDrop, "Drop session entered: %p with %tu items", session, session.items.count);
     _dataInteractionState.dropSession = session;
@@ -4706,7 +4706,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
     _dataInteractionState.lastGlobalPosition = dragData.globalPosition();
 }
 
     _dataInteractionState.lastGlobalPosition = dragData.globalPosition();
 }
 
-- (UIDropProposal *)_api_dropInteraction:(UIDropInteraction *)interaction sessionDidUpdate:(id <UIDropSession>)session
+- (UIDropProposal *)dropInteraction:(UIDropInteraction *)interaction sessionDidUpdate:(id <UIDropSession>)session
 {
     [[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)];
 
 {
     [[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)];
 
@@ -4812,12 +4812,12 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
 - (void)_simulateDataInteractionEntered:(id)session
 {
 
 - (void)_simulateDataInteractionEntered:(id)session
 {
-    [self _api_dropInteraction:_dataOperation.get() sessionDidEnter:session];
+    [self dropInteraction:_dataOperation.get() sessionDidEnter:session];
 }
 
 - (BOOL)_simulateDataInteractionUpdated:(id)session
 {
 }
 
 - (BOOL)_simulateDataInteractionUpdated:(id)session
 {
-    return [self _api_dropInteraction:_dataOperation.get() sessionDidUpdate:session].operation != UIDropOperationCancel;
+    return [self dropInteraction:_dataOperation.get() sessionDidUpdate:session].operation != UIDropOperationCancel;
 }
 
 - (void)_simulateDataInteractionEnded:(id)session
 }
 
 - (void)_simulateDataInteractionEnded:(id)session
@@ -4832,7 +4832,7 @@ static NSArray<UIItemProvider *> *extractItemProvidersFromDropSession(id <UIDrop
 
 - (void)_simulateDataInteractionSessionDidEnd:(id)session
 {
 
 - (void)_simulateDataInteractionSessionDidEnd:(id)session
 {
-    [self _api_dragInteraction:_dataInteraction.get() session:session didEndWithOperation:UIDropOperationCopy];
+    [self dragInteraction:_dataInteraction.get() session:session didEndWithOperation:UIDropOperationCopy];
 }
 
 - (void)_simulateWillBeginDataInteractionWithSession:(id)session
 }
 
 - (void)_simulateWillBeginDataInteractionWithSession:(id)session