Changeset 259008 in webkit
- Timestamp:
- Mar 25, 2020 2:13:55 PM (4 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r259006 r259008 1 2020-03-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Rename "data interaction pasteboard" to "drag and drop pasteboard" 4 https://bugs.webkit.org/show_bug.cgi?id=209556 5 6 Reviewed by Tim Horton. 7 8 "Data interaction" is an obsolete term for drag and drop on iOS, and was meant only to be used early on in 9 development. Replace this with the more descriptive name "drag and drop pasteboard", and additionally hide the 10 name behind a Cocoa-only Pasteboard helper method so that each call site won't need to repeat the string. 11 12 * platform/Pasteboard.h: 13 * platform/cocoa/DragDataCocoa.mm: 14 (WebCore::DragData::DragData): 15 * platform/ios/PasteboardIOS.mm: 16 (WebCore::Pasteboard::nameOfDragPasteboard): 17 (WebCore::Pasteboard::createForDragAndDrop): 18 (WebCore::Pasteboard::respectsUTIFidelities const): 19 * platform/ios/PlatformPasteboardIOS.mm: 20 (WebCore::PlatformPasteboard::PlatformPasteboard): 21 * platform/mac/PasteboardMac.mm: 22 (WebCore::Pasteboard::nameOfDragPasteboard): 23 1 24 2020-03-25 Frank Yang <guowei_yang@apple.com> 2 25 -
trunk/Source/WebCore/platform/Pasteboard.h
r251421 r259008 251 251 252 252 #if PLATFORM(COCOA) 253 #if ENABLE(DRAG_SUPPORT) 254 WEBCORE_EXPORT static String nameOfDragPasteboard(); 255 #endif 253 256 static bool shouldTreatCocoaTypeAsFile(const String&); 254 257 WEBCORE_EXPORT static NSArray *supportedFileUploadPasteboardTypes(); -
trunk/Source/WebCore/platform/cocoa/DragDataCocoa.mm
r258980 r259008 127 127 , m_pasteboardName([[m_platformDragData draggingPasteboard] name]) 128 128 #else 129 , m_pasteboardName( "data interaction pasteboard")129 , m_pasteboardName(Pasteboard::nameOfDragPasteboard()) 130 130 #endif 131 131 { -
trunk/Source/WebCore/platform/ios/PasteboardIOS.mm
r251421 r259008 65 65 } 66 66 67 String Pasteboard::nameOfDragPasteboard() 68 { 69 return "drag and drop pasteboard"; 70 } 71 67 72 std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop() 68 73 { 69 return makeUnique<Pasteboard>( "data interaction pasteboard");74 return makeUnique<Pasteboard>(Pasteboard::nameOfDragPasteboard()); 70 75 } 71 76 … … 349 354 // In the future, we may need to consult the client layer to determine whether or not the pasteboard supports 350 355 // item types ranked by fidelity. 351 return m_pasteboardName == "data interaction pasteboard";356 return m_pasteboardName == Pasteboard::nameOfDragPasteboard(); 352 357 } 353 358 -
trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm
r258896 r259008 61 61 PlatformPasteboard::PlatformPasteboard(const String& name) 62 62 { 63 if (name == "data interaction pasteboard")63 if (name == Pasteboard::nameOfDragPasteboard()) 64 64 m_pasteboard = [WebItemProviderPasteboard sharedInstance]; 65 65 else -
trunk/Source/WebCore/platform/mac/PasteboardMac.mm
r251421 r259008 106 106 107 107 #if ENABLE(DRAG_SUPPORT) 108 String Pasteboard::nameOfDragPasteboard() 109 { 110 return NSPasteboardNameDrag; 111 } 112 108 113 std::unique_ptr<Pasteboard> Pasteboard::createForDragAndDrop() 109 114 { -
trunk/Source/WebKit/ChangeLog
r259005 r259008 1 2020-03-25 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Rename "data interaction pasteboard" to "drag and drop pasteboard" 4 https://bugs.webkit.org/show_bug.cgi?id=209556 5 6 Reviewed by Tim Horton. 7 8 Adopt Pasteboard::nameOfDragPasteboard instead of the literal string "data interaction pasteboard". 9 10 * UIProcess/ios/WKContentViewInteraction.mm: 11 (-[WKContentView dropInteraction:sessionDidEnter:]): 12 (-[WKContentView dropInteraction:sessionDidUpdate:]): 13 (-[WKContentView dropInteraction:sessionDidExit:]): 14 (-[WKContentView dropInteraction:performDrop:]): 15 1 16 2020-03-25 Brady Eidson <beidson@apple.com> 2 17 -
trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm
r258919 r259008 7789 7789 7790 7790 [[WebItemProviderPasteboard sharedInstance] setItemProviders:extractItemProvidersFromDropSession(session)]; 7791 _page->dragEntered(dragData, "data interaction pasteboard");7791 _page->dragEntered(dragData, WebCore::Pasteboard::nameOfDragPasteboard()); 7792 7792 } 7793 7793 … … 7797 7797 7798 7798 auto dragData = [self dragDataForDropSession:session dragDestinationAction:[self _dragDestinationActionForDropSession:session]]; 7799 _page->dragUpdated(dragData, "data interaction pasteboard");7799 _page->dragUpdated(dragData, WebCore::Pasteboard::nameOfDragPasteboard()); 7800 7800 _dragDropInteractionState.dropSessionDidEnterOrUpdate(session, dragData); 7801 7801 … … 7829 7829 7830 7830 auto dragData = [self dragDataForDropSession:session dragDestinationAction:WKDragDestinationActionAny]; 7831 _page->dragExited(dragData, "data interaction pasteboard");7831 _page->dragExited(dragData, WebCore::Pasteboard::nameOfDragPasteboard()); 7832 7832 _page->resetCurrentDragInformation(); 7833 7833 … … 7873 7873 WebKit::SandboxExtension::HandleArray sandboxExtensionForUpload; 7874 7874 retainedSelf->_page->createSandboxExtensionsIfNeeded(filenames, sandboxExtensionHandle, sandboxExtensionForUpload); 7875 retainedSelf->_page->performDragOperation(capturedDragData, "data interaction pasteboard", WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionForUpload));7875 retainedSelf->_page->performDragOperation(capturedDragData, WebCore::Pasteboard::nameOfDragPasteboard(), WTFMove(sandboxExtensionHandle), WTFMove(sandboxExtensionForUpload)); 7876 7876 if (shouldSnapshotView) { 7877 7877 retainedSelf->_visibleContentViewSnapshot = [retainedSelf snapshotViewAfterScreenUpdates:NO];
Note: See TracChangeset
for help on using the changeset viewer.