fix for bug 73345. r=hixie,bryner sr=cls

git-svn-id: svn://10.0.0.236/trunk@90354 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pavlov%netscape.com 2001-03-25 02:56:38 +00:00
parent 8874b002ef
commit b754d759a4
2 changed files with 4 additions and 4 deletions

View File

@ -576,7 +576,7 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
// We have a width, and an auto height. Compute height from
// width once we have the intrinsic image size.
if (mIntrinsicSize.height != 0) {
newHeight = mIntrinsicSize.height;
newHeight = (mIntrinsicSize.height * newWidth) / mIntrinsicSize.width;
haveComputedSize = PR_TRUE;
} else {
newHeight = NSIntPixelsToTwips(1, p2t); // XXX?
@ -588,7 +588,7 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
// once we have the intrinsic image size.
newHeight = MINMAX(heightConstraint, minHeight, maxHeight);
if (mIntrinsicSize.width != 0) {
newWidth = mIntrinsicSize.width;
newWidth = (mIntrinsicSize.width * newHeight) / mIntrinsicSize.height;
haveComputedSize = PR_TRUE;
} else {
newWidth = NSIntPixelsToTwips(1, p2t);

View File

@ -576,7 +576,7 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
// We have a width, and an auto height. Compute height from
// width once we have the intrinsic image size.
if (mIntrinsicSize.height != 0) {
newHeight = mIntrinsicSize.height;
newHeight = (mIntrinsicSize.height * newWidth) / mIntrinsicSize.width;
haveComputedSize = PR_TRUE;
} else {
newHeight = NSIntPixelsToTwips(1, p2t); // XXX?
@ -588,7 +588,7 @@ nsImageFrame::GetDesiredSize(nsIPresContext* aPresContext,
// once we have the intrinsic image size.
newHeight = MINMAX(heightConstraint, minHeight, maxHeight);
if (mIntrinsicSize.width != 0) {
newWidth = mIntrinsicSize.width;
newWidth = (mIntrinsicSize.width * newHeight) / mIntrinsicSize.height;
haveComputedSize = PR_TRUE;
} else {
newWidth = NSIntPixelsToTwips(1, p2t);