added Nav4 compatibility code for 0-width cells

git-svn-id: svn://10.0.0.236/trunk@5400 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
buster
1998-07-13 19:22:45 +00:00
parent e51faf6d00
commit b481b4f1eb
2 changed files with 14 additions and 4 deletions

View File

@@ -326,15 +326,20 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
// first, compute the height
// the height can be set w/o being restricted by aMaxSize.height
nscoord cellHeight = kidSize.height;
cellHeight += topInset + bottomInset;
// NAV4 compatibility: only add insets if cell content was not 0 height
if (0!=kidSize.height)
cellHeight += topInset + bottomInset;
if (PR_TRUE==gsDebugNT)
printf(" %p cellFrame height set to %d from kidSize=%d and insets %d,%d\n",
this, cellHeight, kidSize.height, topInset, bottomInset);
// next determine the cell's width
nscoord cellWidth = kidSize.width; // at this point, we've factored in the cell's style attributes
cellWidth += leftInset + rightInset; // factor in insets
// NAV4 compatibility: only add insets if cell content was not 0 width
if (0!=kidSize.width)
cellWidth += leftInset + rightInset; // factor in insets
// Nav4 hack for 0 width cells. If the cell has any content, it must have a desired width of at least 1
// see testcase "cellHeights.html"
/*
if (0==cellWidth)
{

View File

@@ -326,15 +326,20 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
// first, compute the height
// the height can be set w/o being restricted by aMaxSize.height
nscoord cellHeight = kidSize.height;
cellHeight += topInset + bottomInset;
// NAV4 compatibility: only add insets if cell content was not 0 height
if (0!=kidSize.height)
cellHeight += topInset + bottomInset;
if (PR_TRUE==gsDebugNT)
printf(" %p cellFrame height set to %d from kidSize=%d and insets %d,%d\n",
this, cellHeight, kidSize.height, topInset, bottomInset);
// next determine the cell's width
nscoord cellWidth = kidSize.width; // at this point, we've factored in the cell's style attributes
cellWidth += leftInset + rightInset; // factor in insets
// NAV4 compatibility: only add insets if cell content was not 0 width
if (0!=kidSize.width)
cellWidth += leftInset + rightInset; // factor in insets
// Nav4 hack for 0 width cells. If the cell has any content, it must have a desired width of at least 1
// see testcase "cellHeights.html"
/*
if (0==cellWidth)
{