don't break out of loop early unless we actually find the flavor on the clipboard when checking if flavor is present. r=brade/sr=sfraser.

git-svn-id: svn://10.0.0.236/trunk@89001 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pinkerton%netscape.com 2001-03-08 23:13:27 +00:00
parent 984ff6f935
commit d3ea22d104

View File

@ -449,16 +449,19 @@ nsClipboard :: HasDataMatchingFlavors ( nsISupportsArray* aFlavorList, PRInt32 a
// the mapper returns a null flavor, then it ain't there.
ResType macFlavor = theMapper.MapMimeTypeToMacOSType ( flavor, PR_FALSE );
if ( macFlavor ) {
if ( CheckIfFlavorPresent(macFlavor) )
if ( CheckIfFlavorPresent(macFlavor) ) {
*outResult = PR_TRUE; // we found one!
break;
break;
}
}
else {
// if the client asked for unicode and it wasn't present, check if we have TEXT.
// We'll handle the actual data substitution in GetNativeClipboardData().
if ( strcmp(flavor, kUnicodeMime) == 0 ) {
if ( CheckIfFlavorPresent('TEXT') )
if ( CheckIfFlavorPresent('TEXT') ) {
*outResult = PR_TRUE;
break;
}
}
}
}