From 252c4d8e70e1157b31a02cb474e5f30a282ecc40 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 16 Mar 1999 23:42:38 +0000 Subject: [PATCH] bug 1725 --- layout/html/table/src/nsTableRowGroupFrame.cpp | 15 ++++++++++++++- layout/tables/nsTableRowGroupFrame.cpp | 15 ++++++++++++++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/layout/html/table/src/nsTableRowGroupFrame.cpp b/layout/html/table/src/nsTableRowGroupFrame.cpp index 58c6b3ab4e34..2da9714675db 100644 --- a/layout/html/table/src/nsTableRowGroupFrame.cpp +++ b/layout/html/table/src/nsTableRowGroupFrame.cpp @@ -505,6 +505,19 @@ NS_METHOD nsTableRowGroupFrame::PullUpAllRowFrames(nsIPresContext& aPresContext) return NS_OK; } +void GetNextRowSibling(nsIFrame** aRowFrame) +{ + nsresult rv = (*aRowFrame)->GetNextSibling(aRowFrame); + while(*aRowFrame && (NS_SUCCEEDED(rv))) { + const nsStyleDisplay *display; + (*aRowFrame)->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); + if (NS_STYLE_DISPLAY_TABLE_ROW == display->mDisplay) { + return; + } + rv = (*aRowFrame)->GetNextSibling(aRowFrame); + } +} + /* CalculateRowHeights provides default heights for all rows in the rowgroup. * Actual row heights are ultimately determined by the table, when the table * height attribute is factored in. @@ -671,7 +684,7 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext, i, rowFrameToBeResized, rowRect.y + delta, delta); } // Get the next row frame - rowFrameToBeResized->GetNextSibling((nsIFrame**)&rowFrameToBeResized); + GetNextRowSibling((nsIFrame**)&rowFrameToBeResized); } delete []excessForRow; } diff --git a/layout/tables/nsTableRowGroupFrame.cpp b/layout/tables/nsTableRowGroupFrame.cpp index 58c6b3ab4e34..2da9714675db 100644 --- a/layout/tables/nsTableRowGroupFrame.cpp +++ b/layout/tables/nsTableRowGroupFrame.cpp @@ -505,6 +505,19 @@ NS_METHOD nsTableRowGroupFrame::PullUpAllRowFrames(nsIPresContext& aPresContext) return NS_OK; } +void GetNextRowSibling(nsIFrame** aRowFrame) +{ + nsresult rv = (*aRowFrame)->GetNextSibling(aRowFrame); + while(*aRowFrame && (NS_SUCCEEDED(rv))) { + const nsStyleDisplay *display; + (*aRowFrame)->GetStyleData(eStyleStruct_Display, ((const nsStyleStruct *&)display)); + if (NS_STYLE_DISPLAY_TABLE_ROW == display->mDisplay) { + return; + } + rv = (*aRowFrame)->GetNextSibling(aRowFrame); + } +} + /* CalculateRowHeights provides default heights for all rows in the rowgroup. * Actual row heights are ultimately determined by the table, when the table * height attribute is factored in. @@ -671,7 +684,7 @@ void nsTableRowGroupFrame::CalculateRowHeights(nsIPresContext& aPresContext, i, rowFrameToBeResized, rowRect.y + delta, delta); } // Get the next row frame - rowFrameToBeResized->GetNextSibling((nsIFrame**)&rowFrameToBeResized); + GetNextRowSibling((nsIFrame**)&rowFrameToBeResized); } delete []excessForRow; }