Bug 276431 Patch 8: Handle kFullImageSpaceRect in the only nontrivial imgIDecoderObserver::OnDataAvailable impl. r=roc a=blocking

This commit is contained in:
Daniel Holbert
2010-09-08 13:40:39 -07:00
parent 13f92fcc73
commit 82eb1f927f

View File

@@ -565,10 +565,6 @@ nsImageFrame::OnDataAvailable(imgIRequest *aRequest,
return NS_OK;
}
// XXX We really need to round this out, now that we're doing better
// image scaling!
nsRect r = SourceRectToDest(*aRect);
if (IsPendingLoad(aRequest)) {
// We don't care
return NS_OK;
@@ -579,6 +575,12 @@ nsImageFrame::OnDataAvailable(imgIRequest *aRequest,
if (!aCurrentFrame)
return NS_OK;
// XXX We really need to round this out, now that we're doing better
// image scaling!
nsRect r = (*aRect == mozilla::imagelib::kFullImageSpaceRect) ?
GetInnerArea() :
SourceRectToDest(*aRect);
#ifdef DEBUG_decode
printf("Source rect (%d,%d,%d,%d) -> invalidate dest rect (%d,%d,%d,%d)\n",
aRect->x, aRect->y, aRect->width, aRect->height,