fixed table maxElementSize
git-svn-id: svn://10.0.0.236/trunk@5821 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user