From c6eae7d71d1df871bdd6e4f3f63e3bb1f59138f5 Mon Sep 17 00:00:00 2001 From: kipp Date: Sun, 12 Jul 1998 00:19:17 +0000 Subject: [PATCH] Reflow child when max-element-size is requested (this works around a purify detected crash) git-svn-id: svn://10.0.0.236/trunk@5375 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableRowFrame.cpp | 7 ++++++- mozilla/layout/tables/nsTableRowFrame.cpp | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableRowFrame.cpp b/mozilla/layout/html/table/src/nsTableRowFrame.cpp index 67335442017..4944a7790d6 100644 --- a/mozilla/layout/html/table/src/nsTableRowFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableRowFrame.cpp @@ -390,7 +390,12 @@ nsresult nsTableRowFrame::ResizeReflow(nsIPresContext* aPresContext, // just reflow the cell, and have the cell decide whether it could use the // cached value rather than having the row make that determination? nsReflowMetrics desiredSize(pKidMaxElementSize); - if (availWidth != ((nsTableCellFrame *)kidFrame)->GetPriorAvailWidth()) + + // XXX kipp added the check for a non-null pKidMaxElementSize; if + // we need the max-element-size we must reflow the child to get + // it, right? + if ((nsnull != pKidMaxElementSize) || + (availWidth != ((nsTableCellFrame *)kidFrame)->GetPriorAvailWidth())) { // Always let the cell be as high as it wants. We ignore the height that's // passed in and always place the entire row. Let the row group decide diff --git a/mozilla/layout/tables/nsTableRowFrame.cpp b/mozilla/layout/tables/nsTableRowFrame.cpp index 67335442017..4944a7790d6 100644 --- a/mozilla/layout/tables/nsTableRowFrame.cpp +++ b/mozilla/layout/tables/nsTableRowFrame.cpp @@ -390,7 +390,12 @@ nsresult nsTableRowFrame::ResizeReflow(nsIPresContext* aPresContext, // just reflow the cell, and have the cell decide whether it could use the // cached value rather than having the row make that determination? nsReflowMetrics desiredSize(pKidMaxElementSize); - if (availWidth != ((nsTableCellFrame *)kidFrame)->GetPriorAvailWidth()) + + // XXX kipp added the check for a non-null pKidMaxElementSize; if + // we need the max-element-size we must reflow the child to get + // it, right? + if ((nsnull != pKidMaxElementSize) || + (availWidth != ((nsTableCellFrame *)kidFrame)->GetPriorAvailWidth())) { // Always let the cell be as high as it wants. We ignore the height that's // passed in and always place the entire row. Let the row group decide