Fix for bug #6630. Don't force the desired width to 0 for zero-height

frames, and don't have the document element frame shrink wrap


git-svn-id: svn://10.0.0.236/trunk@36985 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 1999-06-26 03:21:49 +00:00
parent e64b8aa601
commit 7b82473d6a
4 changed files with 10 additions and 12 deletions

View File

@ -388,8 +388,8 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit,
y = mSpace.y;
// Empty blocks do not have anything special done to them and they
// always fit.
nsRect r(x, y, 0, 0);
// always fit. Note: don't force the width to 0
nsRect r(x, y, mMetrics.width, 0);
mFrame->SetRect(r);
aInFlowBounds = r;

View File

@ -260,11 +260,10 @@ inline nsresult NS_NewTableCaptionFrame(nsIFrame** aNewFrame) {
return NS_NewAreaFrame(aNewFrame, NS_AREA_WRAP_HEIGHT);
}
// This type of AreaFrame shrink wraps, and is the document root and is a
// margin root for margin collapsing.
// This type of AreaFrame is the document root and is a margin root for
// margin collapsing.
inline nsresult NS_NewDocumentElementFrame(nsIFrame** aNewFrame) {
return NS_NewAreaFrame(aNewFrame, NS_BLOCK_DOCUMENT_ROOT |
NS_BLOCK_MARGIN_ROOT | NS_BLOCK_SHRINK_WRAP);
return NS_NewAreaFrame(aNewFrame, NS_BLOCK_DOCUMENT_ROOT|NS_BLOCK_MARGIN_ROOT);
}
// This type of AreaFrame is a margin root, but does not shrink wrap

View File

@ -388,8 +388,8 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit,
y = mSpace.y;
// Empty blocks do not have anything special done to them and they
// always fit.
nsRect r(x, y, 0, 0);
// always fit. Note: don't force the width to 0
nsRect r(x, y, mMetrics.width, 0);
mFrame->SetRect(r);
aInFlowBounds = r;

View File

@ -260,11 +260,10 @@ inline nsresult NS_NewTableCaptionFrame(nsIFrame** aNewFrame) {
return NS_NewAreaFrame(aNewFrame, NS_AREA_WRAP_HEIGHT);
}
// This type of AreaFrame shrink wraps, and is the document root and is a
// margin root for margin collapsing.
// This type of AreaFrame is the document root and is a margin root for
// margin collapsing.
inline nsresult NS_NewDocumentElementFrame(nsIFrame** aNewFrame) {
return NS_NewAreaFrame(aNewFrame, NS_BLOCK_DOCUMENT_ROOT |
NS_BLOCK_MARGIN_ROOT | NS_BLOCK_SHRINK_WRAP);
return NS_NewAreaFrame(aNewFrame, NS_BLOCK_DOCUMENT_ROOT|NS_BLOCK_MARGIN_ROOT);
}
// This type of AreaFrame is a margin root, but does not shrink wrap