Bug 189739. During SHRINKWRAP, lines that skip being reflowed need to add their right margin to their mBounds.XMost for the shrink-wrap width computation. Fixes an incremental reflow regression. r+sr=dbaron,a=bsmedberg

This commit is contained in:
roc+%cs.cmu.edu 2005-08-02 20:17:36 +00:00
parent 16e29cc346
commit 7bf0c43eb4

View File

@ -486,6 +486,14 @@ nsBlockReflowState::RecoverStateFrom(nsLineList::iterator aLine,
// Recover mKidXMost and mMaxElementWidth
nscoord xmost = aLine->mBounds.XMost();
// If we're shrink-wrapping, then include the right margin in the xmost
// so that shrink-wrapping includes it.
if (GetFlag(BRS_SHRINKWRAPWIDTH) && aLine->IsBlock()) {
nsHTMLReflowState blockHtmlRS(mPresContext, mReflowState, aLine->mFirstChild,
nsSize(NS_UNCONSTRAINEDSIZE, NS_UNCONSTRAINEDSIZE),
mReflowState.reason, PR_TRUE);
xmost += blockHtmlRS.mComputedMargin.right;
}
if (xmost > mKidXMost) {
#ifdef DEBUG
if (CRAZY_WIDTH(xmost)) {