Bug 400603 Last row of bottom-up bitmap is never updated r+a=pavlov sr=tor

git-svn-id: svn://10.0.0.236/trunk@239049 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
neil%parkwaycc.co.uk 2007-11-09 12:47:50 +00:00
parent 6e24267e0a
commit bd9a0ad1a2

View File

@ -596,12 +596,12 @@ NS_METHOD nsBMPDecoder::ProcessData(const char* aBuffer, PRUint32 aCount)
const PRUint32 rows = mOldLine - mCurLine;
if (rows) {
nsIntRect r(0, LINE(mCurLine), mBIH.width, rows);
nsIntRect r(0, mBIH.height < 0 ? -mBIH.height - mOldLine : mCurLine,
mBIH.width, rows);
// Tell the image that it's data has been updated
nsCOMPtr<nsIImage> img(do_GetInterface(mFrame));
if (!img)
return PR_FALSE;
nsCOMPtr<nsIImage> img(do_GetInterface(mFrame, &rv));
NS_ENSURE_SUCCESS(rv, rv);
img->ImageUpdated(nsnull, nsImageUpdateFlags_kBitsChanged, &r);
mObserver->OnDataAvailable(nsnull, mFrame, &r);