diff --git a/layout/html/table/src/BasicTableLayoutStrategy.cpp b/layout/html/table/src/BasicTableLayoutStrategy.cpp index 34be3091e71a..16da2e777ae5 100644 --- a/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -30,7 +30,7 @@ NS_DEF_PTR(nsIStyleContext); #ifdef NS_DEBUG -static PRBool gsDebug = PR_FALSE; +static PRBool gsDebug = PR_TRUE; static PRBool gsDebugCLD = PR_FALSE; #else static const PRBool gsDebug = PR_FALSE; diff --git a/layout/html/table/src/nsTableCellFrame.cpp b/layout/html/table/src/nsTableCellFrame.cpp index bc83a1822264..f579a668d5ef 100644 --- a/layout/html/table/src/nsTableCellFrame.cpp +++ b/layout/html/table/src/nsTableCellFrame.cpp @@ -369,8 +369,12 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, if (nsnull!=aDesiredSize.maxElementSize) { *aDesiredSize.maxElementSize = *pMaxElementSize; - aDesiredSize.maxElementSize->height += topInset + bottomInset; - aDesiredSize.maxElementSize->width += leftInset + rightInset; + // NAV4 compatibility: only add insets if cell content was not 0 min height + if (0!=pMaxElementSize->height) + aDesiredSize.maxElementSize->height += topInset + bottomInset; + // NAV4 compatibility: only add insets if cell content was not 0 min width + if (0!=pMaxElementSize->width) + aDesiredSize.maxElementSize->width += leftInset + rightInset; } SetDesiredSize(aDesiredSize); if (nsnull!=aDesiredSize.maxElementSize) diff --git a/layout/tables/BasicTableLayoutStrategy.cpp b/layout/tables/BasicTableLayoutStrategy.cpp index 34be3091e71a..16da2e777ae5 100644 --- a/layout/tables/BasicTableLayoutStrategy.cpp +++ b/layout/tables/BasicTableLayoutStrategy.cpp @@ -30,7 +30,7 @@ NS_DEF_PTR(nsIStyleContext); #ifdef NS_DEBUG -static PRBool gsDebug = PR_FALSE; +static PRBool gsDebug = PR_TRUE; static PRBool gsDebugCLD = PR_FALSE; #else static const PRBool gsDebug = PR_FALSE; diff --git a/layout/tables/nsTableCellFrame.cpp b/layout/tables/nsTableCellFrame.cpp index bc83a1822264..f579a668d5ef 100644 --- a/layout/tables/nsTableCellFrame.cpp +++ b/layout/tables/nsTableCellFrame.cpp @@ -369,8 +369,12 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext, if (nsnull!=aDesiredSize.maxElementSize) { *aDesiredSize.maxElementSize = *pMaxElementSize; - aDesiredSize.maxElementSize->height += topInset + bottomInset; - aDesiredSize.maxElementSize->width += leftInset + rightInset; + // NAV4 compatibility: only add insets if cell content was not 0 min height + if (0!=pMaxElementSize->height) + aDesiredSize.maxElementSize->height += topInset + bottomInset; + // NAV4 compatibility: only add insets if cell content was not 0 min width + if (0!=pMaxElementSize->width) + aDesiredSize.maxElementSize->width += leftInset + rightInset; } SetDesiredSize(aDesiredSize); if (nsnull!=aDesiredSize.maxElementSize)