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.

This commit is contained in:
pinkerton%netscape.com 2001-03-08 23:13:27 +00:00
Родитель 3cbe4bdbec
Коммит b5c0a94be4
1 изменённых файлов: 6 добавлений и 3 удалений

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

@ -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;
}
}
}
}