From 076aca175150480b2ba4c9e5777c0ddea156b361 Mon Sep 17 00:00:00 2001 From: "dbaron@dbaron.org" Date: Thu, 28 Feb 2008 17:52:06 -0800 Subject: [PATCH] Fix bug under some valid types of optimization where we cross margin and padding. b=420069 r+sr=roc a1.9b4=damons a-sheriff=sayrer --- layout/generic/nsContainerFrame.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/layout/generic/nsContainerFrame.cpp b/layout/generic/nsContainerFrame.cpp index f3570400267..070da842e4a 100644 --- a/layout/generic/nsContainerFrame.cpp +++ b/layout/generic/nsContainerFrame.cpp @@ -655,16 +655,16 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext, const nsStylePadding *stylePadding = GetStylePadding(); const nsStyleBorder *styleBorder = GetStyleBorder(); const nsStyleMargin *styleMargin = GetStyleMargin(); - nsStyleCoord tmp; + nsStyleCoord marginCoord, paddingCoord; // This goes at the beginning no matter how things are broken and how // messy the bidi situations are, since per CSS2.1 section 8.6 // (implemented in bug 328168), the startSide border is always on the // first line. aData->currentLine += - GetCoord(stylePadding->mPadding.Get(startSide, tmp), 0) + + GetCoord(stylePadding->mPadding.Get(startSide, paddingCoord), 0) + styleBorder->GetBorderWidth(startSide) + - GetCoord(styleMargin->mMargin.Get(startSide, tmp), 0); + GetCoord(styleMargin->mMargin.Get(startSide, marginCoord), 0); const nsLineList_iterator* savedLine = aData->line; @@ -692,9 +692,9 @@ nsContainerFrame::DoInlineIntrinsicWidth(nsIRenderingContext *aRenderingContext, // (implemented in bug 328168), the endSide border is always on the // last line. aData->currentLine += - GetCoord(stylePadding->mPadding.Get(endSide, tmp), 0) + + GetCoord(stylePadding->mPadding.Get(endSide, paddingCoord), 0) + styleBorder->GetBorderWidth(endSide) + - GetCoord(styleMargin->mMargin.Get(endSide, tmp), 0); + GetCoord(styleMargin->mMargin.Get(endSide, marginCoord), 0); } /* virtual */ nsSize