b=25245 Changed ComputeContainingBlockRectangle() to set the containing

block width to NS_UNCONSTRAINEDSIZE if it is an unconstrained reflow.
This way percentage based widths are treated properly


git-svn-id: svn://10.0.0.236/trunk@59232 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
troy%netscape.com 2000-01-30 18:40:48 +00:00
parent 1c1bc9d99d
commit 573b3e8c49
2 changed files with 14 additions and 0 deletions

View File

@ -828,6 +828,13 @@ nsHTMLReflowState::ComputeContainingBlockRectangle(const nsHTMLReflowState* aCon
aContainingBlockHeight += aContainingBlockRS->mComputedPadding.top +
aContainingBlockRS->mComputedPadding.bottom;
}
} else {
// If this is an unconstrained reflow, then reset the containing block
// width to NS_UNCONSTRAINEDSIZE. This way percentage based values have
// no effect
if (NS_UNCONSTRAINEDSIZE == availableWidth) {
aContainingBlockWidth = NS_UNCONSTRAINEDSIZE;
}
}
}

View File

@ -828,6 +828,13 @@ nsHTMLReflowState::ComputeContainingBlockRectangle(const nsHTMLReflowState* aCon
aContainingBlockHeight += aContainingBlockRS->mComputedPadding.top +
aContainingBlockRS->mComputedPadding.bottom;
}
} else {
// If this is an unconstrained reflow, then reset the containing block
// width to NS_UNCONSTRAINEDSIZE. This way percentage based values have
// no effect
if (NS_UNCONSTRAINEDSIZE == availableWidth) {
aContainingBlockWidth = NS_UNCONSTRAINEDSIZE;
}
}
}