mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 574005 - Make obtaining CF_HTML directly work on Windows and Linux (application/x-moz-nativehtml); r=ehsan
This commit is contained in:
parent
2c26a7a9aa
commit
61dead824b
@ -136,14 +136,7 @@ function runTest() {
|
||||
}, SimpleTest.finish);
|
||||
}
|
||||
|
||||
var isMac = ("nsILocalFileMac" in Components.interfaces);
|
||||
if (isMac)
|
||||
SimpleTest.waitForFocus(runTest);
|
||||
else {
|
||||
// This test is not yet supported on non-Mac platforms, see bug 574005.
|
||||
todo(false, "Test not supported on this platform");
|
||||
SimpleTest.finish();
|
||||
}
|
||||
SimpleTest.waitForFocus(runTest);
|
||||
|
||||
</script>
|
||||
</pre>
|
||||
|
@ -143,6 +143,15 @@ nsPrimitiveHelpers :: CreateDataFromPrimitive ( const char* aFlavor, nsISupports
|
||||
plainText->GetData ( data );
|
||||
*aDataBuff = ToNewCString(data);
|
||||
}
|
||||
// CF_HTML only supports single byte.
|
||||
// Reference: http://msdn.microsoft.com/en-us/library/aa767917(v=vs.85).aspx
|
||||
} else if ( strcmp(aFlavor,kNativeHTMLMime) == 0 ) {
|
||||
nsCOMPtr<nsISupportsCString> plainText ( do_QueryInterface(aPrimitive) );
|
||||
if ( plainText ) {
|
||||
nsCAutoString data;
|
||||
plainText->GetData ( data );
|
||||
*aDataBuff = ToNewUnicode(data);
|
||||
}
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISupportsString> doubleByteText ( do_QueryInterface(aPrimitive) );
|
||||
|
Loading…
Reference in New Issue
Block a user