From dafbd8aee3a800579b28657466e6ee92a5cb95aa Mon Sep 17 00:00:00 2001 From: "bernd.mielke%snafu.de" Date: Tue, 4 Jun 2002 04:37:06 +0000 Subject: [PATCH] no math with NS_UNCONSTRAINEDSIZE please, bug 14862 r=karnaze sr=roc+moz git-svn-id: svn://10.0.0.236/trunk@122641 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/generic/nsBlockFrame.cpp | 3 ++- mozilla/layout/html/base/src/nsBlockFrame.cpp | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/generic/nsBlockFrame.cpp b/mozilla/layout/generic/nsBlockFrame.cpp index 8893c414086..af62f4d6a8f 100644 --- a/mozilla/layout/generic/nsBlockFrame.cpp +++ b/mozilla/layout/generic/nsBlockFrame.cpp @@ -5256,7 +5256,8 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState, availWidth -= availWidth % twp; } } - nscoord availHeight = (NS_UNCONSTRAINEDSIZE == aState.mAvailSpaceRect.height) + nscoord availHeight = ((NS_UNCONSTRAINEDSIZE == aState.mAvailSpaceRect.height) || + (NS_UNCONSTRAINEDSIZE == aState.mContentArea.height)) ? NS_UNCONSTRAINEDSIZE : PR_MAX(0, aState.mContentArea.height - aState.mY); diff --git a/mozilla/layout/html/base/src/nsBlockFrame.cpp b/mozilla/layout/html/base/src/nsBlockFrame.cpp index 8893c414086..af62f4d6a8f 100644 --- a/mozilla/layout/html/base/src/nsBlockFrame.cpp +++ b/mozilla/layout/html/base/src/nsBlockFrame.cpp @@ -5256,7 +5256,8 @@ nsBlockFrame::ReflowFloater(nsBlockReflowState& aState, availWidth -= availWidth % twp; } } - nscoord availHeight = (NS_UNCONSTRAINEDSIZE == aState.mAvailSpaceRect.height) + nscoord availHeight = ((NS_UNCONSTRAINEDSIZE == aState.mAvailSpaceRect.height) || + (NS_UNCONSTRAINEDSIZE == aState.mContentArea.height)) ? NS_UNCONSTRAINEDSIZE : PR_MAX(0, aState.mContentArea.height - aState.mY);