Bug 1822845: Partially revert dfd7e060998e1780e50e0a29ea3cfc767a3eadfb (bug 1779478) for causing errors when using macOS Services. r=mac-reviewers,mstange

Differential Revision: https://phabricator.services.mozilla.com/D173153
This commit is contained in:
Stephen A Pohl 2023-03-21 18:54:17 +00:00
Родитель f82b21501b
Коммит f534a28b58
2 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -4460,7 +4460,8 @@ static CFTypeRefPtr<CFURLRef> GetPasteLocation(NSPasteboard* aPasteboard) {
nsAutoRetainCocoaObject kungFuDeathGrip(self);
// Make sure that the service will accept strings or HTML.
if (![types containsObject:[UTIHelper stringFromPboardType:NSPasteboardTypeString]] &&
if (![types containsObject:[UTIHelper stringFromPboardType:NSStringPboardType]] &&
![types containsObject:[UTIHelper stringFromPboardType:NSPasteboardTypeString]] &&
![types containsObject:[UTIHelper stringFromPboardType:NSPasteboardTypeHTML]]) {
return NO;
}

Просмотреть файл

@ -95,6 +95,7 @@ NSString* const kMozFileUrlsPboardType = @"org.mozilla.file-urls";
[aType isEqualToString:(NSString*)kPasteboardTypeFileURLPromise] ||
[aType isEqualToString:(NSString*)kPasteboardTypeFilePromiseContent] ||
[aType isEqualToString:(NSString*)kUTTypeFileURL] ||
[aType isEqualToString:NSStringPboardType] ||
[aType isEqualToString:NSPasteboardTypeString] ||
[aType isEqualToString:NSPasteboardTypeHTML] || [aType isEqualToString:NSPasteboardTypeRTF] ||
[aType isEqualToString:NSPasteboardTypeTIFF] || [aType isEqualToString:NSPasteboardTypePNG]) {