From 7696e1467487c2acc40fc36f0683ead8481aaddf Mon Sep 17 00:00:00 2001 From: "cbiesinger%web.de" Date: Fri, 30 May 2003 19:47:08 +0000 Subject: [PATCH] address reviewer comments that I forgot when checking in patch for bug 204386. r+sr=bz --- layout/generic/nsImageFrame.cpp | 4 +++- layout/html/base/src/nsImageFrame.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/layout/generic/nsImageFrame.cpp b/layout/generic/nsImageFrame.cpp index c2b763ddc00..591b8862b6a 100644 --- a/layout/generic/nsImageFrame.cpp +++ b/layout/generic/nsImageFrame.cpp @@ -666,8 +666,10 @@ nsImageFrame::OnStopDecode(imgIRequest *aRequest, NS_ASSERTION(imageContainer, "Successful load with no container?"); intrinsicSizeChanged = RecalculateTransform(imageContainer); } - else + else { + // Have to size to 0,0 so that GetDesiredSize recalculates the size mIntrinsicSize.SizeTo(0, 0); + } if (mState & IMAGE_GOTINITIALREFLOW) { // do nothing if we havn't gotten the inital reflow yet if (!(mState & IMAGE_SIZECONSTRAINED) && intrinsicSizeChanged) { diff --git a/layout/html/base/src/nsImageFrame.cpp b/layout/html/base/src/nsImageFrame.cpp index c2b763ddc00..591b8862b6a 100644 --- a/layout/html/base/src/nsImageFrame.cpp +++ b/layout/html/base/src/nsImageFrame.cpp @@ -666,8 +666,10 @@ nsImageFrame::OnStopDecode(imgIRequest *aRequest, NS_ASSERTION(imageContainer, "Successful load with no container?"); intrinsicSizeChanged = RecalculateTransform(imageContainer); } - else + else { + // Have to size to 0,0 so that GetDesiredSize recalculates the size mIntrinsicSize.SizeTo(0, 0); + } if (mState & IMAGE_GOTINITIALREFLOW) { // do nothing if we havn't gotten the inital reflow yet if (!(mState & IMAGE_SIZECONSTRAINED) && intrinsicSizeChanged) {