Bug 293504. Make MEW/max-width calculations in scrollframes consistent with regular reflow about how we handle the scrollbar width. r+sr=dbaron,a=chofmann

git-svn-id: svn://10.0.0.236/trunk@175285 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
roc+%cs.cmu.edu
2005-06-29 04:17:21 +00:00
parent 4a29541c83
commit 38bb755f3e
3 changed files with 30 additions and 12 deletions

View File

@@ -386,9 +386,12 @@ nsHTMLReflowState::AdjustIntrinsicMinContentWidthForStyle(nscoord aWidth) const
if (eStyleUnit_Percent == widthUnit) {
aWidth = 0;
} else if (eStyleUnit_Coord == widthUnit) {
NS_ASSERTION(NS_UNCONSTRAINEDSIZE != mComputedWidth,
"Should be a computed width here");
aWidth = mComputedWidth;
// Sometimes we can get an unconstrained size here because we're
// computing the maximum-width. Although it doesn't seem right
// for max-width computation to change our computed width.
if (NS_UNCONSTRAINEDSIZE != mComputedWidth) {
aWidth = mComputedWidth;
}
}
nsStyleUnit maxWidthUnit = mStylePosition->mMaxWidth.GetUnit();
@@ -415,9 +418,12 @@ nsHTMLReflowState::AdjustIntrinsicContentWidthForStyle(nscoord aWidth) const
{
nsStyleUnit widthUnit = mStylePosition->mWidth.GetUnit();
if (eStyleUnit_Coord == widthUnit) {
NS_ASSERTION(NS_UNCONSTRAINEDSIZE != mComputedWidth,
"Should be a computed width here");
aWidth = mComputedWidth;
// Sometimes we can get an unconstrained size here because we're
// computing the maximum-width. Although it doesn't seem right
// for max-width computation to change our computed width.
if (NS_UNCONSTRAINEDSIZE != mComputedWidth) {
aWidth = mComputedWidth;
}
}
nsStyleUnit maxWidthUnit = mStylePosition->mMaxWidth.GetUnit();