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);