Bug 276431 Patch 8: Handle kFullImageSpaceRect in the only nontrivial imgIDecoderObserver::OnDataAvailable impl. r=roc a=blocking
This commit is contained in:
@@ -565,10 +565,6 @@ nsImageFrame::OnDataAvailable(imgIRequest *aRequest,
|
|||||||
return NS_OK;
|
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)) {
|
if (IsPendingLoad(aRequest)) {
|
||||||
// We don't care
|
// We don't care
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
@@ -579,6 +575,12 @@ nsImageFrame::OnDataAvailable(imgIRequest *aRequest,
|
|||||||
if (!aCurrentFrame)
|
if (!aCurrentFrame)
|
||||||
return NS_OK;
|
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
|
#ifdef DEBUG_decode
|
||||||
printf("Source rect (%d,%d,%d,%d) -> invalidate dest rect (%d,%d,%d,%d)\n",
|
printf("Source rect (%d,%d,%d,%d) -> invalidate dest rect (%d,%d,%d,%d)\n",
|
||||||
aRect->x, aRect->y, aRect->width, aRect->height,
|
aRect->x, aRect->y, aRect->width, aRect->height,
|
||||||
|
|||||||
Reference in New Issue
Block a user