diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index 34be3091e71..16da2e777ae 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/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/mozilla/layout/html/table/src/nsTableCellFrame.cpp b/mozilla/layout/html/table/src/nsTableCellFrame.cpp index bc83a182226..f579a668d5e 100644 --- a/mozilla/layout/html/table/src/nsTableCellFrame.cpp +++ b/mozilla/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/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 34be3091e71..16da2e777ae 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/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/mozilla/layout/tables/nsTableCellFrame.cpp b/mozilla/layout/tables/nsTableCellFrame.cpp index bc83a182226..f579a668d5e 100644 --- a/mozilla/layout/tables/nsTableCellFrame.cpp +++ b/mozilla/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)