From 99db15ab7dd9004d199ddaf96b5ec665050ef46a Mon Sep 17 00:00:00 2001 From: "asqueella@gmail.com" Date: Fri, 27 Apr 2007 07:40:17 -0700 Subject: [PATCH] Bug 376034 - Possible incorrect coordinate transform in nsImageFramep=Jeremy Lea r+sr=roc --- layout/generic/nsImageFrame.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index 5c3f84940fac..baffbb66c3a6 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -560,10 +560,14 @@ 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); + // handle iconLoads first... if (HandleIconLoads(aRequest, PR_FALSE)) { // Image changed, invalidate - Invalidate(*aRect, PR_FALSE); + Invalidate(r, PR_FALSE); return NS_OK; } @@ -585,9 +589,6 @@ nsImageFrame::OnDataAvailable(imgIRequest *aRequest, } } - // XXX We really need to round this out, now that we're doing better - // image scaling! - nsRect r = 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,