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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user