| Index: third_party/mozilla/NSPasteboard+Utils.mm
|
| diff --git a/third_party/mozilla/NSPasteboard+Utils.mm b/third_party/mozilla/NSPasteboard+Utils.mm
|
| index 0af5c48361ed0bec9d6367b7dd84eae450299e5a..0cd0eee5f1f3ed8d7bee4c9240ed9052271cfc61 100644
|
| --- a/third_party/mozilla/NSPasteboard+Utils.mm
|
| +++ b/third_party/mozilla/NSPasteboard+Utils.mm
|
| @@ -231,21 +231,6 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
|
| if (!title && [types containsObject:NSStringPboardType])
|
| title = [self stringForType:NSStringPboardType];
|
| *outTitles = [NSArray arrayWithObject:(title ? title : @"")];
|
| - } else if ([types containsObject:NSStringPboardType]) {
|
| - NSString* potentialURLString = [self cleanedStringWithPasteboardString:[self stringForType:NSStringPboardType]];
|
| - if ([potentialURLString isValidURI]) {
|
| - *outUrls = [NSArray arrayWithObject:potentialURLString];
|
| - NSString* title = nil;
|
| - if ([types containsObject:kCorePasteboardFlavorType_urld])
|
| - title = [self stringForType:kCorePasteboardFlavorType_urld];
|
| - if (!title && [types containsObject:kCorePasteboardFlavorType_urln])
|
| - title = [self stringForType:kCorePasteboardFlavorType_urln];
|
| - *outTitles = [NSArray arrayWithObject:(title ? title : @"")];
|
| - } else {
|
| - // The string doesn't look like a URL - return empty arrays
|
| - *outUrls = [NSArray array];
|
| - *outTitles = [NSArray array];
|
| - }
|
| } else {
|
| // We don't recognise any of these formats - return empty arrays
|
| *outUrls = [NSArray array];
|
| @@ -264,19 +249,9 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
|
| - (BOOL) containsURLData
|
| {
|
| NSArray* types = [self types];
|
| - if ( [types containsObject:kWebURLsWithTitlesPboardType]
|
| - || [types containsObject:NSURLPboardType]
|
| - || [types containsObject:NSFilenamesPboardType] )
|
| - return YES;
|
| -
|
| - if ([types containsObject:NSStringPboardType]) {
|
| - // Trim whitespace off the ends and newlines out of the middle so we don't reject otherwise-valid URLs;
|
| - // we'll do another cleaning when we set the URLs and titles later, so this is safe.
|
| - NSString* potentialURLString = [self cleanedStringWithPasteboardString:[self stringForType:NSStringPboardType]];
|
| - return [potentialURLString isValidURI];
|
| - }
|
| -
|
| - return NO;
|
| + return [types containsObject:kWebURLsWithTitlesPboardType] ||
|
| + [types containsObject:NSURLPboardType] ||
|
| + [types containsObject:NSFilenamesPboardType];
|
| }
|
| @end
|
|
|
|
|