Bug 966986 - Part 2: Return true from nsDragService::IsDataFlavorSupported for text/x-moz-url-desc and text/x-moz-url-data on Mac. r=smichaud, vlad
authorTooru Fujisawa <arai_a@mac.com>
Sat, 15 Aug 2015 06:34:13 +0900
changeset 307839 97e7e631a9f5adba2616189199ea5f6122b21e27
parent 307838 200d18cf0eecdc929dfc1a26f985c807d1924de2
child 307840 a9da8af1087161565a4812cf770d1a3cb00e6855
push id1040
push userraliiev@mozilla.com
push dateMon, 29 Feb 2016 17:11:22 +0000
treeherdermozilla-release@8c3167321162 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmichaud, vlad
bugs966986
milestone45.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 966986 - Part 2: Return true from nsDragService::IsDataFlavorSupported for text/x-moz-url-desc and text/x-moz-url-data on Mac. r=smichaud, vlad
widget/cocoa/nsDragService.mm
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
@@ -591,18 +591,21 @@ nsDragService::IsDataFlavorSupported(con
   bool allowFileURL = false;
   if (dataFlavor.EqualsLiteral(kFileMime)) {
     type = (const NSString*)kUTTypeFileURL;
     allowFileURL = true;
   } else if (dataFlavor.EqualsLiteral(kUnicodeMime)) {
     type = (const NSString*)kUTTypeUTF8PlainText;
   } else if (dataFlavor.EqualsLiteral(kHTMLMime)) {
     type = (const NSString*)kUTTypeHTML;
-  } else if (dataFlavor.EqualsLiteral(kURLMime)) {
+  } else if (dataFlavor.EqualsLiteral(kURLMime) ||
+             dataFlavor.EqualsLiteral(kURLDataMime)) {
     type = (const NSString*)kUTTypeURL;
+  } else if (dataFlavor.EqualsLiteral(kURLDescriptionMime)) {
+    type = (const NSString*)kUTTypeURLName;
   }
   NSString* availableType = [globalDragPboard availableTypeFromArray:[NSArray arrayWithObjects:(id)type, nil]];
   if (availableType && IsValidType(availableType, allowFileURL)) {
     *_retval = true;
   }
 
   return NS_OK;