From 2280d3dcab8089a43cfcdeef83491c9cc8553379 Mon Sep 17 00:00:00 2001 From: "buster%netscape.com" Date: Fri, 17 Jul 1998 17:51:55 +0000 Subject: [PATCH] fixed table maxElementSize git-svn-id: svn://10.0.0.236/trunk@5821 18797224-902f-48f8-a5cc-f745e15eee43 --- .../html/table/src/BasicTableLayoutStrategy.cpp | 3 ++- mozilla/layout/html/table/src/nsTableFrame.cpp | 16 ---------------- .../layout/tables/BasicTableLayoutStrategy.cpp | 3 ++- mozilla/layout/tables/nsTableFrame.cpp | 16 ---------------- 4 files changed, 4 insertions(+), 34 deletions(-) diff --git a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp index 168b3c0606b..dba586ce8a5 100644 --- a/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/html/table/src/BasicTableLayoutStrategy.cpp @@ -143,7 +143,8 @@ PRBool BasicTableLayoutStrategy::Initialize(nsSize* aMaxElementSize) { aMaxElementSize->height = 0; aMaxElementSize->width = mMinTableWidth; - if (PR_TRUE==gsDebug) printf("BTLS::Init setting aMaxElementSize->width = %d\n", aMaxElementSize->width); + if (PR_TRUE==gsDebug) + printf("BTLS::Init setting aMaxElementSize->width = %d\n", aMaxElementSize->width); } return result; diff --git a/mozilla/layout/html/table/src/nsTableFrame.cpp b/mozilla/layout/html/table/src/nsTableFrame.cpp index 6c7d634f564..4a0df7ee977 100644 --- a/mozilla/layout/html/table/src/nsTableFrame.cpp +++ b/mozilla/layout/html/table/src/nsTableFrame.cpp @@ -100,9 +100,6 @@ struct InnerTableReflowState { // Running y-offset nscoord y; - // Flag for whether we're dealing with the first interior row group - PRBool firstRowGroup; - // a list of the footers in this table frame, for quick access when inserting bodies nsVoidArray *footerList; @@ -132,7 +129,6 @@ struct InnerTableReflowState { } topInset = aBorderPadding.top; - firstRowGroup = PR_TRUE; footerHeight = 0; footerList = nsnull; } @@ -1629,16 +1625,6 @@ void nsTableFrame::PlaceChild(nsIPresContext* aPresContext, } } } - - // Update the maximum element size - if (PR_TRUE==aState.firstRowGroup) - { - aState.firstRowGroup = PR_FALSE; - if (nsnull != aMaxElementSize) { - aMaxElementSize->width = aKidMaxElementSize.width; - aMaxElementSize->height = aKidMaxElementSize.height; - } - } } /** @@ -1724,8 +1710,6 @@ PRBool nsTableFrame::ReflowMappedChildren( nsIPresContext* aPresContext, nscoord y = aState.topInset + aState.y + topMargin; kidFrame->MoveTo(x, y); status = ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState); - if (nsnull!=desiredSize.maxElementSize) - desiredSize.maxElementSize->width = desiredSize.width; // Did the child fit? if ((kidFrame != mFirstChild) && (desiredSize.height > kidAvailSize.height)) { diff --git a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp index 168b3c0606b..dba586ce8a5 100644 --- a/mozilla/layout/tables/BasicTableLayoutStrategy.cpp +++ b/mozilla/layout/tables/BasicTableLayoutStrategy.cpp @@ -143,7 +143,8 @@ PRBool BasicTableLayoutStrategy::Initialize(nsSize* aMaxElementSize) { aMaxElementSize->height = 0; aMaxElementSize->width = mMinTableWidth; - if (PR_TRUE==gsDebug) printf("BTLS::Init setting aMaxElementSize->width = %d\n", aMaxElementSize->width); + if (PR_TRUE==gsDebug) + printf("BTLS::Init setting aMaxElementSize->width = %d\n", aMaxElementSize->width); } return result; diff --git a/mozilla/layout/tables/nsTableFrame.cpp b/mozilla/layout/tables/nsTableFrame.cpp index 6c7d634f564..4a0df7ee977 100644 --- a/mozilla/layout/tables/nsTableFrame.cpp +++ b/mozilla/layout/tables/nsTableFrame.cpp @@ -100,9 +100,6 @@ struct InnerTableReflowState { // Running y-offset nscoord y; - // Flag for whether we're dealing with the first interior row group - PRBool firstRowGroup; - // a list of the footers in this table frame, for quick access when inserting bodies nsVoidArray *footerList; @@ -132,7 +129,6 @@ struct InnerTableReflowState { } topInset = aBorderPadding.top; - firstRowGroup = PR_TRUE; footerHeight = 0; footerList = nsnull; } @@ -1629,16 +1625,6 @@ void nsTableFrame::PlaceChild(nsIPresContext* aPresContext, } } } - - // Update the maximum element size - if (PR_TRUE==aState.firstRowGroup) - { - aState.firstRowGroup = PR_FALSE; - if (nsnull != aMaxElementSize) { - aMaxElementSize->width = aKidMaxElementSize.width; - aMaxElementSize->height = aKidMaxElementSize.height; - } - } } /** @@ -1724,8 +1710,6 @@ PRBool nsTableFrame::ReflowMappedChildren( nsIPresContext* aPresContext, nscoord y = aState.topInset + aState.y + topMargin; kidFrame->MoveTo(x, y); status = ReflowChild(kidFrame, aPresContext, desiredSize, kidReflowState); - if (nsnull!=desiredSize.maxElementSize) - desiredSize.maxElementSize->width = desiredSize.width; // Did the child fit? if ((kidFrame != mFirstChild) && (desiredSize.height > kidAvailSize.height)) {