From 79395becd57f856c8943fb824a2ea61b20ed1fe0 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 20 Nov 2001 01:21:18 +0000 Subject: [PATCH] bug 110566 - get correct cell spacing value when calculating pct height basis on table. sr=attinasi, r=alexsavulov. git-svn-id: svn://10.0.0.236/trunk@108523 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp | 2 +- mozilla/layout/tables/nsTableRowGroupFrame.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index 767f34e27b5..a72011d9c3b 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -1376,7 +1376,7 @@ nsTableRowGroupFrame::GetHeightBasis(const nsHTMLReflowState& aReflowState) } if (parentRS && (tableFrame == parentRS->frame) && (parentRS->mComputedHeight > 0) && (parentRS->mComputedHeight < NS_UNCONSTRAINEDSIZE)) { - nscoord cellSpacing = PR_MAX(0, tableFrame->GetRowCount() - 1) * tableFrame->GetCellSpacingY(); + nscoord cellSpacing = PR_MAX(0, tableFrame->GetRowCount() + 1) * tableFrame->GetCellSpacingY(); result = parentRS->mComputedHeight - cellSpacing; } } diff --git a/mozilla/layout/tables/nsTableRowGroupFrame.cpp b/mozilla/layout/tables/nsTableRowGroupFrame.cpp index 767f34e27b5..a72011d9c3b 100644 --- a/mozilla/layout/tables/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/tables/nsTableRowGroupFrame.cpp @@ -1376,7 +1376,7 @@ nsTableRowGroupFrame::GetHeightBasis(const nsHTMLReflowState& aReflowState) } if (parentRS && (tableFrame == parentRS->frame) && (parentRS->mComputedHeight > 0) && (parentRS->mComputedHeight < NS_UNCONSTRAINEDSIZE)) { - nscoord cellSpacing = PR_MAX(0, tableFrame->GetRowCount() - 1) * tableFrame->GetCellSpacingY(); + nscoord cellSpacing = PR_MAX(0, tableFrame->GetRowCount() + 1) * tableFrame->GetCellSpacingY(); result = parentRS->mComputedHeight - cellSpacing; } }