You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug 1802163: Improve dragging of file URLs on macOS. r=mac-reviewers,mstange
This patch fixes dragging of images to Photos.app and Pages.app (possibly others, more testing necessary). It is also the first time that we support dragging of images into Apple's drag & drop test app at https://developer.apple.com/documentation/appkit/supporting-drag-and-drop-through-file-promises?language=objc, which resolves bug 1450419 without actually implementing NSFilePromiseProvider. NSFilePromiseProvider is not easily implemented since it expects to be the only data provider for a drag session, which means that we wouldn't be able to write out other pasteboard types to the pasteboard like we have traditionally done and that third-party apps are relying on.
If the set of Gecko dragging transferables contains a transferable with flavor kFilePromiseMime, we will now create a file even if the pasteboard that's passed to -[NSPasteboardItemDataProvider pasteboard:item:provideDataForType:] does not come with a "paste location". Additionally, we will now write the path of the paste location into the pasteboard for type kUTTypeFileURL. In the past, we would only create a file for such transferables if the pasteboard provided the location to store the file, and we would not write a kUTTypeFileURL value - instead, we would write two empty strings for the types kPasteboardTypeFileURLPromise and kPasteboardTypeFilePromiseContent. We no longer write those empty strings.
Differential Revision: https://phabricator.services.mozilla.com/D260021
0 commit comments