Backed out changeset d5a514b9a0db (bug 586587) for mochitest failures.

This commit is contained in:
Ryan VanderMeulen 2014-04-24 14:48:14 -04:00
Родитель a06f66ec95
Коммит d898e2dbcd
4 изменённых файлов: 7 добавлений и 26 удалений

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

@ -1277,14 +1277,7 @@ DataTransfer::FillInExternalData(TransferItem& aItem, uint32_t aIndex)
variant->SetAsAString(str);
}
else {
nsCOMPtr<nsISupportsCString> supportscstr = do_QueryInterface(data);
if (supportscstr) {
nsAutoCString str;
supportscstr->GetData(str);
variant->SetAsACString(str);
} else {
variant->SetAsISupports(data);
}
variant->SetAsISupports(data);
}
aItem.mData = variant;

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

@ -103,8 +103,7 @@ UINT nsClipboard::GetFormat(const char* aMimeStr)
else if (strcmp(aMimeStr, kFileMime) == 0 ||
strcmp(aMimeStr, kFilePromiseMime) == 0)
format = CF_HDROP;
else if (strcmp(aMimeStr, kNativeHTMLMime) == 0 ||
strcmp(aMimeStr, kHTMLMime) == 0)
else if (strcmp(aMimeStr, kNativeHTMLMime) == 0)
format = CF_HTML;
else
format = ::RegisterClipboardFormatW(NS_ConvertASCIItoUTF16(aMimeStr).get());
@ -642,8 +641,7 @@ nsresult nsClipboard::GetDataFromDataObject(IDataObject * aDataObject,
genericDataWrapper = do_QueryInterface(file);
nsMemory::Free(data);
}
else if ( strcmp(flavorStr, kNativeHTMLMime) == 0 ||
strcmp(flavorStr, kHTMLMime) == 0) {
else if ( strcmp(flavorStr, kNativeHTMLMime) == 0) {
// the editor folks want CF_HTML exactly as it's on the clipboard, no conversions,
// no fancy stuff. Pull it off the clipboard, stuff it into a wrapper and hand
// it back to them.

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

@ -517,7 +517,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
format = nsClipboard::GetFormat(aDataFlavor);
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
if (mDataObject->QueryGetData(&fe) == S_OK)
*_retval = true; // found it!
else {
// We haven't found the exact flavor the client asked for, but
@ -530,7 +530,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
format = nsClipboard::GetFormat(kTextMime);
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
if (mDataObject->QueryGetData(&fe) == S_OK)
*_retval = true; // found it!
}
else if (strcmp(aDataFlavor, kURLMime) == 0) {
@ -540,15 +540,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
format = nsClipboard::GetFormat(kFileMime);
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
*_retval = true; // found it!
}
else if (!strcmp(aDataFlavor, kHTMLMime)) {
// if the client wants html, maybe it's in "HTML Format"
format = nsClipboard::GetFormat(kHTMLMime);
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
TYMED_HGLOBAL);
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
if (mDataObject->QueryGetData(&fe) == S_OK)
*_retval = true; // found it!
}
} // else try again

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

@ -53,9 +53,7 @@ nsPrimitiveHelpers :: CreatePrimitiveForData ( const char* aFlavor, const void*
if ( !aPrimitive )
return;
if ( strcmp(aFlavor,kTextMime) == 0 ||
strcmp(aFlavor,kNativeHTMLMime) == 0 ||
strcmp(aFlavor,kHTMLMime) == 0) {
if ( strcmp(aFlavor,kTextMime) == 0 || strcmp(aFlavor,kNativeHTMLMime) == 0 ) {
nsCOMPtr<nsISupportsCString> primitive =
do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID);
if ( primitive ) {