mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset d5a514b9a0db (bug 586587) for mochitest failures.
This commit is contained in:
parent
174fd5a49c
commit
0227012397
@ -1277,14 +1277,7 @@ DataTransfer::FillInExternalData(TransferItem& aItem, uint32_t aIndex)
|
|||||||
variant->SetAsAString(str);
|
variant->SetAsAString(str);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
nsCOMPtr<nsISupportsCString> supportscstr = do_QueryInterface(data);
|
variant->SetAsISupports(data);
|
||||||
if (supportscstr) {
|
|
||||||
nsAutoCString str;
|
|
||||||
supportscstr->GetData(str);
|
|
||||||
variant->SetAsACString(str);
|
|
||||||
} else {
|
|
||||||
variant->SetAsISupports(data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
aItem.mData = variant;
|
aItem.mData = variant;
|
||||||
|
@ -103,8 +103,7 @@ UINT nsClipboard::GetFormat(const char* aMimeStr)
|
|||||||
else if (strcmp(aMimeStr, kFileMime) == 0 ||
|
else if (strcmp(aMimeStr, kFileMime) == 0 ||
|
||||||
strcmp(aMimeStr, kFilePromiseMime) == 0)
|
strcmp(aMimeStr, kFilePromiseMime) == 0)
|
||||||
format = CF_HDROP;
|
format = CF_HDROP;
|
||||||
else if (strcmp(aMimeStr, kNativeHTMLMime) == 0 ||
|
else if (strcmp(aMimeStr, kNativeHTMLMime) == 0)
|
||||||
strcmp(aMimeStr, kHTMLMime) == 0)
|
|
||||||
format = CF_HTML;
|
format = CF_HTML;
|
||||||
else
|
else
|
||||||
format = ::RegisterClipboardFormatW(NS_ConvertASCIItoUTF16(aMimeStr).get());
|
format = ::RegisterClipboardFormatW(NS_ConvertASCIItoUTF16(aMimeStr).get());
|
||||||
@ -642,8 +641,7 @@ nsresult nsClipboard::GetDataFromDataObject(IDataObject * aDataObject,
|
|||||||
genericDataWrapper = do_QueryInterface(file);
|
genericDataWrapper = do_QueryInterface(file);
|
||||||
nsMemory::Free(data);
|
nsMemory::Free(data);
|
||||||
}
|
}
|
||||||
else if ( strcmp(flavorStr, kNativeHTMLMime) == 0 ||
|
else if ( strcmp(flavorStr, kNativeHTMLMime) == 0) {
|
||||||
strcmp(flavorStr, kHTMLMime) == 0) {
|
|
||||||
// the editor folks want CF_HTML exactly as it's on the clipboard, no conversions,
|
// 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
|
// no fancy stuff. Pull it off the clipboard, stuff it into a wrapper and hand
|
||||||
// it back to them.
|
// it back to them.
|
||||||
|
@ -517,7 +517,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
|
|||||||
format = nsClipboard::GetFormat(aDataFlavor);
|
format = nsClipboard::GetFormat(aDataFlavor);
|
||||||
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
||||||
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
|
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
|
||||||
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
|
if (mDataObject->QueryGetData(&fe) == S_OK)
|
||||||
*_retval = true; // found it!
|
*_retval = true; // found it!
|
||||||
else {
|
else {
|
||||||
// We haven't found the exact flavor the client asked for, but
|
// 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);
|
format = nsClipboard::GetFormat(kTextMime);
|
||||||
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
||||||
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
|
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
|
||||||
if (SUCCEEDED(mDataObject->QueryGetData(&fe)))
|
if (mDataObject->QueryGetData(&fe) == S_OK)
|
||||||
*_retval = true; // found it!
|
*_retval = true; // found it!
|
||||||
}
|
}
|
||||||
else if (strcmp(aDataFlavor, kURLMime) == 0) {
|
else if (strcmp(aDataFlavor, kURLMime) == 0) {
|
||||||
@ -540,15 +540,7 @@ nsDragService::IsDataFlavorSupported(const char *aDataFlavor, bool *_retval)
|
|||||||
format = nsClipboard::GetFormat(kFileMime);
|
format = nsClipboard::GetFormat(kFileMime);
|
||||||
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
SET_FORMATETC(fe, format, 0, DVASPECT_CONTENT, -1,
|
||||||
TYMED_HGLOBAL | TYMED_FILE | TYMED_GDI);
|
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, 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)))
|
|
||||||
*_retval = true; // found it!
|
*_retval = true; // found it!
|
||||||
}
|
}
|
||||||
} // else try again
|
} // else try again
|
||||||
|
@ -53,9 +53,7 @@ nsPrimitiveHelpers :: CreatePrimitiveForData ( const char* aFlavor, const void*
|
|||||||
if ( !aPrimitive )
|
if ( !aPrimitive )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if ( strcmp(aFlavor,kTextMime) == 0 ||
|
if ( strcmp(aFlavor,kTextMime) == 0 || strcmp(aFlavor,kNativeHTMLMime) == 0 ) {
|
||||||
strcmp(aFlavor,kNativeHTMLMime) == 0 ||
|
|
||||||
strcmp(aFlavor,kHTMLMime) == 0) {
|
|
||||||
nsCOMPtr<nsISupportsCString> primitive =
|
nsCOMPtr<nsISupportsCString> primitive =
|
||||||
do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID);
|
do_CreateInstance(NS_SUPPORTS_CSTRING_CONTRACTID);
|
||||||
if ( primitive ) {
|
if ( primitive ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user