From b484183ca38ee0cc94f871f31d910b84a419a165 Mon Sep 17 00:00:00 2001 From: "karnaze%netscape.com" Date: Tue, 23 Feb 1999 21:03:57 +0000 Subject: [PATCH] added printf to flag when a table cell's max element size exceeds its desired size (for bug 3094) --- layout/html/table/src/nsTableRowFrame.cpp | 13 +++++++++---- layout/tables/nsTableRowFrame.cpp | 13 +++++++++---- 2 files changed, 18 insertions(+), 8 deletions(-) diff --git a/layout/html/table/src/nsTableRowFrame.cpp b/layout/html/table/src/nsTableRowFrame.cpp index bc093edf68c..2f2340e13db 100644 --- a/layout/html/table/src/nsTableRowFrame.cpp +++ b/layout/html/table/src/nsTableRowFrame.cpp @@ -785,12 +785,17 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, if (gsDebug) printf ("TR %p for cell %p Initial Reflow: desired=%d, MES=%d\n", this, kidFrame, kidSize.width, kidMaxElementSize.width); - //XXX: this is a hack, shouldn't it be the case that a min size is - // never larger than a desired size? - if (kidMaxElementSize.width>kidSize.width) + + // XXX the following alerts bugs in the content frames. + if (kidMaxElementSize.width > kidSize.width) { + printf("BUG - table cell content max element width greater than desired width \n"); kidSize.width = kidMaxElementSize.width; - if (kidMaxElementSize.height>kidSize.height) + } + if (kidMaxElementSize.height > kidSize.height) { + printf("BUG - table cell content max element height greater than desired height \n"); kidSize.height = kidMaxElementSize.height; + } + ((nsTableCellFrame *)kidFrame)->SetPass1DesiredSize(kidSize); ((nsTableCellFrame *)kidFrame)->SetPass1MaxElementSize(kidMaxElementSize); NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "unexpected child reflow status"); diff --git a/layout/tables/nsTableRowFrame.cpp b/layout/tables/nsTableRowFrame.cpp index bc093edf68c..2f2340e13db 100644 --- a/layout/tables/nsTableRowFrame.cpp +++ b/layout/tables/nsTableRowFrame.cpp @@ -785,12 +785,17 @@ nsTableRowFrame::InitialReflow(nsIPresContext& aPresContext, if (gsDebug) printf ("TR %p for cell %p Initial Reflow: desired=%d, MES=%d\n", this, kidFrame, kidSize.width, kidMaxElementSize.width); - //XXX: this is a hack, shouldn't it be the case that a min size is - // never larger than a desired size? - if (kidMaxElementSize.width>kidSize.width) + + // XXX the following alerts bugs in the content frames. + if (kidMaxElementSize.width > kidSize.width) { + printf("BUG - table cell content max element width greater than desired width \n"); kidSize.width = kidMaxElementSize.width; - if (kidMaxElementSize.height>kidSize.height) + } + if (kidMaxElementSize.height > kidSize.height) { + printf("BUG - table cell content max element height greater than desired height \n"); kidSize.height = kidMaxElementSize.height; + } + ((nsTableCellFrame *)kidFrame)->SetPass1DesiredSize(kidSize); ((nsTableCellFrame *)kidFrame)->SetPass1MaxElementSize(kidMaxElementSize); NS_ASSERTION(NS_FRAME_IS_COMPLETE(aStatus), "unexpected child reflow status");