From 370943637c2ef5f6db09bb0c1a74584d37e73314 Mon Sep 17 00:00:00 2001 From: "hyatt%netscape.com" Date: Fri, 18 Jun 1999 06:34:29 +0000 Subject: [PATCH] Some fixes to row groups. git-svn-id: svn://10.0.0.236/branches/TREEWIDGET_19990616_BRANCH@35851 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/table/src/nsTableRowGroupFrame.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp index bd4dd179dda..5fe32fec1ef 100644 --- a/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -366,7 +366,7 @@ nsTableRowGroupFrame::GetFrameForPoint(const nsPoint& aPoint, nsIFrame** aFrame) return kid->GetFrameForPoint(tmp, aFrame); } } - else if (NS_STYLE_DISPLAY_TABLE_ROW_GROUP == childDisplay->mDisplay) { + else { if (kidRect.Contains(aPoint)) { tmp.MoveTo(aPoint.x - kidRect.x, aPoint.y - kidRect.y); return kid->GetFrameForPoint(tmp, aFrame); @@ -667,13 +667,7 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext, { const nsStyleDisplay *childDisplay; rowFrame->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)childDisplay)); - if (NS_STYLE_DISPLAY_TABLE_ROW_GROUP == childDisplay->mDisplay) { - // Only for the tree widget does this code fire. - nsSize rowGroupSize; - rowFrame->GetSize(rowGroupSize); - rowGroupHeight += rowGroupSize.height; - } - else if (NS_STYLE_DISPLAY_TABLE_ROW == childDisplay->mDisplay) + if (NS_STYLE_DISPLAY_TABLE_ROW == childDisplay->mDisplay) { if (gsDebug) printf("TRGF CalcRowH: Step 2 for row %d (%p)...\n", rowIndex + startRowIndex, rowFrame); @@ -779,6 +773,13 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext, rowGroupHeight += rowHeights[rowIndex]; rowIndex++; } + else { + // Anything that isn't a row contributes to the row group's total height. + nsSize frameSize; + rowFrame->GetSize(frameSize); + rowGroupHeight += frameSize.height; + } + // Get the next rowgroup child (row frame) rowFrame->GetNextSibling(&rowFrame); }