diff --git a/mozilla/layout/generic/nsBlockReflowContext.cpp b/mozilla/layout/generic/nsBlockReflowContext.cpp index 86eae91d634..288204704d4 100644 --- a/mozilla/layout/generic/nsBlockReflowContext.cpp +++ b/mozilla/layout/generic/nsBlockReflowContext.cpp @@ -44,7 +44,6 @@ nsBlockReflowContext::nsBlockReflowContext(nsIPresContext& aPresContext, mOuterReflowState(aParentRS), mMetrics(aComputeMaxElementSize ? &mMaxElementSize : nsnull) { - mCompactMarginWidth = 0; mStyleSpacing = nsnull; #ifdef DEBUG mIndent = 0; @@ -159,7 +158,6 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame, availSpace, reason); aComputedOffsets = reflowState.computedOffsets; reflowState.lineLayout = nsnull; - reflowState.mCompactMarginWidth = mCompactMarginWidth; if (!aIsAdjacentWithTop) { reflowState.isTopOfPage = PR_FALSE; // make sure this is cleared } @@ -410,7 +408,7 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, // Collapse the bottom margin with the top margin that was already // applied. nscoord newBottomMargin = MaxMargin(collapsedBottomMargin, mTopMargin); - *aBottomMarginResult = collapsedBottomMargin; + *aBottomMarginResult = newBottomMargin; } // Empty blocks do not have anything special done to them and they diff --git a/mozilla/layout/generic/nsBlockReflowContext.h b/mozilla/layout/generic/nsBlockReflowContext.h index 157dcf26879..0e78f2fd00a 100644 --- a/mozilla/layout/generic/nsBlockReflowContext.h +++ b/mozilla/layout/generic/nsBlockReflowContext.h @@ -38,10 +38,6 @@ public: PRBool aComputeMaxElementSize); ~nsBlockReflowContext() { } - void SetCompactMarginWidth(nscoord aCompactMarginWidth) { - mCompactMarginWidth = aCompactMarginWidth; - } - void SetNextRCFrame(nsIFrame* aNextRCFrame) { mNextRCFrame = aNextRCFrame; } @@ -107,7 +103,6 @@ protected: const nsHTMLReflowState& mOuterReflowState; nsIFrame* mFrame; - nscoord mCompactMarginWidth; nsRect mSpace; nsIFrame* mNextRCFrame; diff --git a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp index 86eae91d634..288204704d4 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowContext.cpp +++ b/mozilla/layout/html/base/src/nsBlockReflowContext.cpp @@ -44,7 +44,6 @@ nsBlockReflowContext::nsBlockReflowContext(nsIPresContext& aPresContext, mOuterReflowState(aParentRS), mMetrics(aComputeMaxElementSize ? &mMaxElementSize : nsnull) { - mCompactMarginWidth = 0; mStyleSpacing = nsnull; #ifdef DEBUG mIndent = 0; @@ -159,7 +158,6 @@ nsBlockReflowContext::ReflowBlock(nsIFrame* aFrame, availSpace, reason); aComputedOffsets = reflowState.computedOffsets; reflowState.lineLayout = nsnull; - reflowState.mCompactMarginWidth = mCompactMarginWidth; if (!aIsAdjacentWithTop) { reflowState.isTopOfPage = PR_FALSE; // make sure this is cleared } @@ -410,7 +408,7 @@ nsBlockReflowContext::PlaceBlock(PRBool aForceFit, // Collapse the bottom margin with the top margin that was already // applied. nscoord newBottomMargin = MaxMargin(collapsedBottomMargin, mTopMargin); - *aBottomMarginResult = collapsedBottomMargin; + *aBottomMarginResult = newBottomMargin; } // Empty blocks do not have anything special done to them and they diff --git a/mozilla/layout/html/base/src/nsBlockReflowContext.h b/mozilla/layout/html/base/src/nsBlockReflowContext.h index 157dcf26879..0e78f2fd00a 100644 --- a/mozilla/layout/html/base/src/nsBlockReflowContext.h +++ b/mozilla/layout/html/base/src/nsBlockReflowContext.h @@ -38,10 +38,6 @@ public: PRBool aComputeMaxElementSize); ~nsBlockReflowContext() { } - void SetCompactMarginWidth(nscoord aCompactMarginWidth) { - mCompactMarginWidth = aCompactMarginWidth; - } - void SetNextRCFrame(nsIFrame* aNextRCFrame) { mNextRCFrame = aNextRCFrame; } @@ -107,7 +103,6 @@ protected: const nsHTMLReflowState& mOuterReflowState; nsIFrame* mFrame; - nscoord mCompactMarginWidth; nsRect mSpace; nsIFrame* mNextRCFrame;