forked from mirrors/gecko-dev
Bug 1897574 [Linux] Update MIME type conversions for D&D r=emilio
Fix wrong conversion orders introduced in Bug 1896863 where convert to/from is swapped. Differential Revision: https://phabricator.services.mozilla.com/D210942
This commit is contained in:
parent
c9faed31ae
commit
53e03a2808
1 changed files with 24 additions and 18 deletions
|
|
@ -1243,31 +1243,37 @@ nsDragService::IsDataFlavorSupported(const char* aDataFlavor, bool* _retval) {
|
||||||
*_retval = true;
|
*_retval = true;
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (requestedFlavor == sTextUriListTypeAtom &&
|
|
||||||
(IsDragFlavorAvailable(sURLMimeAtom) ||
|
// Check for file/url conversion from uri list
|
||||||
IsDragFlavorAvailable(sFileMimeAtom))) {
|
if ((requestedFlavor == sURLMimeAtom || requestedFlavor == sFileMimeAtom) &&
|
||||||
|
IsDragFlavorAvailable(sTextUriListTypeAtom)) {
|
||||||
|
LOGDRAGSERVICE(" %s supported with conversion from %s", aDataFlavor,
|
||||||
|
gTextUriListType);
|
||||||
*_retval = true;
|
*_retval = true;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for automatic _NETSCAPE_URL -> text/x-moz-url mapping
|
// check for automatic _NETSCAPE_URL -> text/x-moz-url mapping
|
||||||
if (requestedFlavor == sMozUrlTypeAtom &&
|
if (requestedFlavor == sURLMimeAtom &&
|
||||||
IsDragFlavorAvailable(sURLMimeAtom)) {
|
IsDragFlavorAvailable(sMozUrlTypeAtom)) {
|
||||||
|
LOGDRAGSERVICE(" %s supported with conversion from %s", aDataFlavor,
|
||||||
|
gMozUrlType);
|
||||||
*_retval = true;
|
*_retval = true;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
// check for file portal
|
|
||||||
// If we're asked for kURLMime/kFileMime we can convert gPortalFile
|
// If we're asked for kURLMime/kFileMime we can get it from PortalFile
|
||||||
// or gPortalFileTransfer to it.
|
// or PortalFileTransfer flavors.
|
||||||
if ((requestedFlavor == sPortalFileAtom ||
|
if ((requestedFlavor == sURLMimeAtom || requestedFlavor == sFileMimeAtom) &&
|
||||||
requestedFlavor == sPortalFileTransferAtom) &&
|
(IsDragFlavorAvailable(sPortalFileAtom) ||
|
||||||
(IsDragFlavorAvailable(sURLMimeAtom) ||
|
IsDragFlavorAvailable(sPortalFileTransferAtom))) {
|
||||||
IsDragFlavorAvailable(sFileMimeAtom))) {
|
LOGDRAGSERVICE(" %s supported with conversion from %s/%s", aDataFlavor,
|
||||||
|
gPortalFile, gPortalFileTransfer);
|
||||||
*_retval = true;
|
*_retval = true;
|
||||||
|
return NS_OK;
|
||||||
}
|
}
|
||||||
if (*_retval) {
|
|
||||||
LOGDRAGSERVICE(" %s supported with conversion", aDataFlavor);
|
LOGDRAGSERVICE(" %s is not supported", aDataFlavor);
|
||||||
}
|
|
||||||
if (!*_retval) {
|
|
||||||
LOGDRAGSERVICE(" %s is not supported", aDataFlavor);
|
|
||||||
}
|
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue