mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-01 00:32:11 +00:00
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:
parent
16e29cc346
commit
7bf0c43eb4
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user