diff --git a/widget/src/cocoa/nsClipboard.mm b/widget/src/cocoa/nsClipboard.mm index f1819269882b..e5ed29ef2e8d 100644 --- a/widget/src/cocoa/nsClipboard.mm +++ b/widget/src/cocoa/nsClipboard.mm @@ -378,6 +378,9 @@ nsClipboard::PasteboardDictFromTransferable(nsITransferable* aTransferable) [pasteboardOutputDict setObject:tiffData forKey:NSTIFFPboardType]; } + else if (flavorStr.EqualsLiteral(kFilePromiseMime)) { + [pasteboardOutputDict setObject:[NSArray arrayWithObject:@""] forKey:NSFilesPromisePboardType]; + } // If it wasn't a type that we recognize as exportable we don't put it on the system // clipboard. We'll just access it from our cached transferable when we need it. diff --git a/widget/src/cocoa/nsDragService.mm b/widget/src/cocoa/nsDragService.mm index a71cdbe62606..e25099d099a3 100644 --- a/widget/src/cocoa/nsDragService.mm +++ b/widget/src/cocoa/nsDragService.mm @@ -134,6 +134,9 @@ static nsresult SetUpDragClipboard(nsISupportsArray* aTransferableArray) else if (currentKey == NSTIFFPboardType) { [dragPBoard setData:currentValue forType:currentKey]; } + else if (currentKey == NSFilesPromisePboardType) { + [dragPBoard setPropertyList:currentValue forType:currentKey]; + } } } @@ -271,18 +274,11 @@ nsDragService::InvokeDragSession(nsIDOMNode* aDOMNode, nsISupportsArray* aTransf nsBaseDragService::StartDragSession(); - // It is possible to specify what file types we will create, but the Finder doesn't - // care; it is happy to store any type of file it is handed. So use an empty string - // for type. - NSPasteboard* workingPBoard = [NSPasteboard pasteboardWithName:NSDragPboard]; - NSArray* fileTypeList = [NSArray arrayWithObject:@""]; - [workingPBoard setPropertyList:fileTypeList forType:NSFilesPromisePboardType]; - [globalDragView dragImage:image at:localPoint offset:NSMakeSize(0,0) event:globalDragEvent - pasteboard:workingPBoard + pasteboard:[NSPasteboard pasteboardWithName:NSDragPboard] source:globalDragView slideBack:YES];