Changeset 219224 in webkit
- Timestamp:
- Jul 6, 2017 4:30:10 PM (7 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r219220 r219224 1 2017-07-06 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 [iOS DnD] [WK2] Add delegate hooks for specifying the data owner for a drag or drop session 4 https://bugs.webkit.org/show_bug.cgi?id=174139 5 <rdar://problem/33126212> 6 7 Reviewed by Beth Dakin. 8 9 Add hooks to query the UI delegate for a _UIDataOwner on both drag and drop sides. 10 11 * Platform/spi/ios/UIKitSPI.h: 12 * UIProcess/API/Cocoa/WKUIDelegatePrivate.h: 13 * UIProcess/ios/WKContentViewInteraction.mm: 14 (-[WKContentView _dragInteraction:dataOwnerForSession:]): 15 (-[WKContentView _dropInteraction:dataOwnerForSession:]): 16 1 17 2017-07-06 Brent Fulgham <bfulgham@apple.com> 2 18 -
trunk/Source/WebKit2/Platform/spi/ios/UIKitSPI.h
r219055 r219224 82 82 #endif 83 83 84 #if ENABLE(DATA_INTERACTION) 84 #if ENABLE(DRAG_SUPPORT) 85 #import <UIKit/NSItemProvider+UIKitAdditions_Private.h> 85 86 #import <UIKit/UIItemProvider_Private.h> 86 87 #endif … … 123 124 @property (strong, nonatomic, readonly) UIGestureRecognizer *presentationSecondaryGestureRecognizer; 124 125 @end 126 #endif 127 128 #if ENABLE(DRAG_SUPPORT) 129 typedef NS_ENUM(NSInteger, _UIDataOwner) { 130 _UIDataOwnerUndefined, 131 _UIDataOwnerUser, 132 _UIDataOwnerEnterprise, 133 _UIDataOwnerShared, 134 }; 125 135 #endif 126 136 -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKUIDelegatePrivate.h
r218453 r219224 115 115 - (UITargetedDragPreview *)_webView:(WKWebView *)webView previewForCancellingItem:(UIDragItem *)item withDefault:(UITargetedDragPreview *)defaultPreview WK_API_AVAILABLE(ios(WK_IOS_TBA)); 116 116 - (NSArray<UIDragItem *> *)_webView:(WKWebView *)webView willPerformDropWithSession:(id <UIDropSession>)session WK_API_AVAILABLE(ios(WK_IOS_TBA)); 117 - (NSInteger)_webView:(WKWebView *)webView dataOwnerForDropSession:(id <UIDropSession>)session; 118 - (NSInteger)_webView:(WKWebView *)webView dataOwnerForDragSession:(id <UIDragSession>)session; 117 119 #endif 118 120 - (void)_webView:(WKWebView *)webView didChangeSafeAreaShouldAffectObscuredInsets:(BOOL)safeAreaShouldAffectObscuredInsets WK_API_AVAILABLE(ios(WK_IOS_TBA)); -
trunk/Source/WebKit2/UIProcess/ios/WKContentViewInteraction.mm
r219191 r219224 4536 4536 } 4537 4537 4538 - (_UIDataOwner)_dragInteraction:(UIDragInteraction *)interaction dataOwnerForSession:(id <UIDragSession>)session 4539 { 4540 id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate; 4541 _UIDataOwner dataOwner = _UIDataOwnerUndefined; 4542 if ([uiDelegate respondsToSelector:@selector(_webView:dataOwnerForDragSession:)]) 4543 dataOwner = (_UIDataOwner)[uiDelegate _webView:_webView dataOwnerForDragSession:session]; 4544 return dataOwner; 4545 } 4546 4538 4547 - (void)_dragInteraction:(UIDragInteraction *)interaction prepareForSession:(id <UIDragSession>)session completion:(dispatch_block_t)completion 4539 4548 { … … 4709 4718 4710 4719 #pragma mark - UIDropInteractionDelegate 4720 4721 - (_UIDataOwner)_dropInteraction:(UIDropInteraction *)interaction dataOwnerForSession:(id <UIDropSession>)session 4722 { 4723 id <WKUIDelegatePrivate> uiDelegate = self.webViewUIDelegate; 4724 _UIDataOwner dataOwner = _UIDataOwnerUndefined; 4725 if ([uiDelegate respondsToSelector:@selector(_webView:dataOwnerForDropSession:)]) 4726 dataOwner = (_UIDataOwner)[uiDelegate _webView:_webView dataOwnerForDropSession:session]; 4727 return dataOwner; 4728 } 4711 4729 4712 4730 - (BOOL)dropInteraction:(UIDropInteraction *)interaction canHandleSession:(id<UIDropSession>)session
Note: See TracChangeset
for help on using the changeset viewer.