Work-in-progress for having maximum width (needed by tables) be updated

incrementally
This commit is contained in:
troy@netscape.com
1999-12-30 04:15:45 +00:00
parent cb153db103
commit f0465b161b
20 changed files with 346 additions and 34 deletions

View File

@@ -635,7 +635,7 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
if (availSize.height < 0)
availSize.height = 1;
nsHTMLReflowMetrics kidSize(pMaxElementSize);
nsHTMLReflowMetrics kidSize(pMaxElementSize, aDesiredSize.mFlags);
kidSize.width=kidSize.height=kidSize.ascent=kidSize.descent=0;
SetPriorAvailWidth(aReflowState.availableWidth);
nsIFrame* firstKid = mFrames.FirstChild();
@@ -761,6 +761,9 @@ NS_METHOD nsTableCellFrame::Reflow(nsIPresContext* aPresContext,
aDesiredSize.height = cellHeight;
aDesiredSize.ascent = topInset;
aDesiredSize.descent = bottomInset;
if (aDesiredSize.mFlags & NS_REFLOW_CALC_MAX_WIDTH) {
aDesiredSize.mMaximumWidth = kidSize.mMaximumWidth + leftInset + rightInset;
}
if (nsnull!=aDesiredSize.maxElementSize) {
*aDesiredSize.maxElementSize = *pMaxElementSize;
if (0!=pMaxElementSize->height) {