Fixing bug 279945. Prevent drag n' drop of images whose extensions don't map to image mimetypes. r=caillon@gmail.com, sr=dveditz@cruzio.com

git-svn-id: svn://10.0.0.236/trunk@168753 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
jst%mozilla.jstenback.com
2005-02-03 17:23:35 +00:00
parent 797583d07b
commit eddb05cf73
7 changed files with 47 additions and 45 deletions

View File

@@ -1108,8 +1108,9 @@ nsTransferableFactory::Produce(nsITransferable** outTrans)
// pass out the image source string
mImageSourceString = mUrlString;
// also grab the image data
mImage = nsContentUtils::GetImageFromContent(image);
// also grab the image data, assuming the image extension in
// the image URI maps to a known image mimetype.
mImage = nsContentUtils::GetImageFromContent(image, PR_TRUE);
if (parentLink)
{