From b481b4f1eb99176eac4af3fa804370fda4010bf3 Mon Sep 17 00:00:00 2001 From: buster Date: Mon, 13 Jul 1998 19:22:45 +0000 Subject: [PATCH] added Nav4 compatibility code for 0-width cells git-svn-id: svn://10.0.0.236/trunk@5400 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/html/table/src/nsTableCellFrame.cpp | 9 +++++++-- mozilla/layout/tables/nsTableCellFrame.cpp | 9 +++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index 6c19957a4fb..bc83a182226 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableCellFrame.cpp @@ -326,15 +326,20 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, // first, compute the height // the height can be set w/o being restricted by aMaxSize.height nscoord cellHeight = kidSize.height; - cellHeight += topInset + bottomInset; + // NAV4 compatibility: only add insets if cell content was not 0 height + if (0!=kidSize.height) + cellHeight += topInset + bottomInset; if (PR_TRUE==gsDebugNT) printf(" %p cellFrame height set to %d from kidSize=%d and insets %d,%d\n", this, cellHeight, kidSize.height, topInset, bottomInset); // next determine the cell's width nscoord cellWidth = kidSize.width; // at this point, we've factored in the cell's style attributes - cellWidth += leftInset + rightInset; // factor in insets + // NAV4 compatibility: only add insets if cell content was not 0 width + if (0!=kidSize.width) + cellWidth += leftInset + rightInset; // factor in insets // Nav4 hack for 0 width cells. If the cell has any content, it must have a desired width of at least 1 + // see testcase "cellHeights.html" /* if (0==cellWidth) { diff --git a/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index 6c19957a4fb..bc83a182226 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/layout/tables/nsTableCellFrame.cpp @@ -326,15 +326,20 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, // first, compute the height // the height can be set w/o being restricted by aMaxSize.height nscoord cellHeight = kidSize.height; - cellHeight += topInset + bottomInset; + // NAV4 compatibility: only add insets if cell content was not 0 height + if (0!=kidSize.height) + cellHeight += topInset + bottomInset; if (PR_TRUE==gsDebugNT) printf(" %p cellFrame height set to %d from kidSize=%d and insets %d,%d\n", this, cellHeight, kidSize.height, topInset, bottomInset); // next determine the cell's width nscoord cellWidth = kidSize.width; // at this point, we've factored in the cell's style attributes - cellWidth += leftInset + rightInset; // factor in insets + // NAV4 compatibility: only add insets if cell content was not 0 width + if (0!=kidSize.width) + cellWidth += leftInset + rightInset; // factor in insets // Nav4 hack for 0 width cells. If the cell has any content, it must have a desired width of at least 1 + // see testcase "cellHeights.html" /* if (0==cellWidth) {