Patching a function used only by the tree code.

git-svn-id: svn://10.0.0.236/trunk@44052 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
hyatt%netscape.com 1999-08-22 09:50:22 +00:00
parent 4a3290544c
commit 1f5079c7ff
2 changed files with 10 additions and 4 deletions

View File

@ -3299,7 +3299,7 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
if (RowGroupsShouldBeConstrained()) {
// Only applies to the tree widget.
nscoord tableSpecifiedHeight;
GetTableSpecifiedHeight(tableSpecifiedHeight, kidReflowState);
GetTableSpecifiedHeight(tableSpecifiedHeight, aReflowState.reflowState);
if (tableSpecifiedHeight != -1) {
kidReflowState.availableHeight = tableSpecifiedHeight - y;
if (kidReflowState.availableHeight < 0)
@ -3792,7 +3792,10 @@ NS_IMETHODIMP nsTableFrame::GetTableSpecifiedHeight(nscoord& aResult, const nsHT
const nsStyleTable* tableStyle;
GetStyleData(eStyleStruct_Table, (const nsStyleStruct *&)tableStyle);
nscoord tableSpecifiedHeight=-1;
if (eStyleUnit_Coord == tablePosition->mHeight.GetUnit())
if (aReflowState.mComputedHeight != NS_UNCONSTRAINEDSIZE &&
aReflowState.mComputedHeight > 0)
tableSpecifiedHeight = aReflowState.mComputedHeight;
else if (eStyleUnit_Coord == tablePosition->mHeight.GetUnit())
tableSpecifiedHeight = tablePosition->mHeight.GetCoordValue();
else if (eStyleUnit_Percent == tablePosition->mHeight.GetUnit())
{

View File

@ -3299,7 +3299,7 @@ NS_METHOD nsTableFrame::ReflowMappedChildren(nsIPresContext& aPresContext,
if (RowGroupsShouldBeConstrained()) {
// Only applies to the tree widget.
nscoord tableSpecifiedHeight;
GetTableSpecifiedHeight(tableSpecifiedHeight, kidReflowState);
GetTableSpecifiedHeight(tableSpecifiedHeight, aReflowState.reflowState);
if (tableSpecifiedHeight != -1) {
kidReflowState.availableHeight = tableSpecifiedHeight - y;
if (kidReflowState.availableHeight < 0)
@ -3792,7 +3792,10 @@ NS_IMETHODIMP nsTableFrame::GetTableSpecifiedHeight(nscoord& aResult, const nsHT
const nsStyleTable* tableStyle;
GetStyleData(eStyleStruct_Table, (const nsStyleStruct *&)tableStyle);
nscoord tableSpecifiedHeight=-1;
if (eStyleUnit_Coord == tablePosition->mHeight.GetUnit())
if (aReflowState.mComputedHeight != NS_UNCONSTRAINEDSIZE &&
aReflowState.mComputedHeight > 0)
tableSpecifiedHeight = aReflowState.mComputedHeight;
else if (eStyleUnit_Coord == tablePosition->mHeight.GetUnit())
tableSpecifiedHeight = tablePosition->mHeight.GetCoordValue();
else if (eStyleUnit_Percent == tablePosition->mHeight.GetUnit())
{