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
This commit is contained in:
troy%netscape.com 2000-01-30 18:40:48 +00:00
parent 3b23873b58
commit 6476da726e
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;
}
}
}