diff --git a/mozilla/layout/generic/nsAreaFrame.cpp b/mozilla/layout/generic/nsAreaFrame.cpp index e5e38745b75..ee3fa08d8b9 100644 --- a/mozilla/layout/generic/nsAreaFrame.cpp +++ b/mozilla/layout/generic/nsAreaFrame.cpp @@ -520,12 +520,8 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext, if (floaterYMost > 0) { // What we need to check for is if the bottom most floater extends below // the content area of the desired size - nsMargin borderPadding; - nscoord contentYMost; - - nsHTMLReflowState::ComputeBorderPaddingFor(this, aReflowState.parentReflowState, - borderPadding); - contentYMost = aDesiredSize.height - borderPadding.bottom; + nscoord contentYMost = aDesiredSize.height - + aReflowState.mComputedBorderPadding.bottom; if (floaterYMost > contentYMost) { aDesiredSize.height += floaterYMost - contentYMost; @@ -623,18 +619,14 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext, kidReflowState.reason = eReflowReason_Initial; } - // XXX Temporary hack until the block/inline code starts using 'computedWidth' - kidReflowState.availableWidth = kidReflowState.computedWidth; rv = htmlReflow->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus); // XXX If the child had a fixed height, then make sure it respected it... if (NS_AUTOHEIGHT != kidReflowState.computedHeight) { if (kidDesiredSize.height < kidReflowState.computedHeight) { kidDesiredSize.height = kidReflowState.computedHeight; - - nsMargin borderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, borderPadding); - kidDesiredSize.height += borderPadding.top + borderPadding.bottom; + kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top + + kidReflowState.mComputedBorderPadding.bottom; } } diff --git a/mozilla/layout/generic/nsBulletFrame.cpp b/mozilla/layout/generic/nsBulletFrame.cpp index 2a45ee80fee..c1c253fcc46 100644 --- a/mozilla/layout/generic/nsBulletFrame.cpp +++ b/mozilla/layout/generic/nsBulletFrame.cpp @@ -412,10 +412,7 @@ nsBulletFrame::Reflow(nsIPresContext& aPresContext, // Add in the border and padding; split the top/bottom between the // ascent and descent to make things look nice - nsMargin borderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(this, - aReflowState.parentReflowState, - borderPadding); + const nsMargin& borderPadding = aReflowState.mComputedBorderPadding; aMetrics.width += borderPadding.left + borderPadding.right; aMetrics.height += borderPadding.top + borderPadding.bottom; aMetrics.ascent += borderPadding.top; diff --git a/mozilla/layout/generic/nsHTMLReflowState.cpp b/mozilla/layout/generic/nsHTMLReflowState.cpp index 713d7a1e3ab..31a2fd5862f 100644 --- a/mozilla/layout/generic/nsHTMLReflowState.cpp +++ b/mozilla/layout/generic/nsHTMLReflowState.cpp @@ -421,9 +421,6 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, nscoord containingBlockWidth, nscoord containingBlockHeight) { - // XXX Correctly handle absolutely positioned elements by using the - // correct edge (computed width/height is the content edge)... - // If any of the offsets are 'auto', then get the placeholder frame // and compute its origin relative to the containing block nsPoint placeholderOffset(0, 0); diff --git a/mozilla/layout/generic/nsLeafFrame.cpp b/mozilla/layout/generic/nsLeafFrame.cpp index ba0f3c79adc..f3cc92676ad 100644 --- a/mozilla/layout/generic/nsLeafFrame.cpp +++ b/mozilla/layout/generic/nsLeafFrame.cpp @@ -93,9 +93,7 @@ nsLeafFrame::AddBordersAndPadding(nsIPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, nsMargin& aBorderPadding) { - nsHTMLReflowState::ComputeBorderPaddingFor(this, - aReflowState.parentReflowState, - aBorderPadding); + aBorderPadding = aReflowState.mComputedBorderPadding; aMetrics.width += aBorderPadding.left + aBorderPadding.right; aMetrics.height += aBorderPadding.top + aBorderPadding.bottom; aMetrics.ascent = aMetrics.height; diff --git a/mozilla/layout/html/base/src/nsAreaFrame.cpp b/mozilla/layout/html/base/src/nsAreaFrame.cpp index e5e38745b75..ee3fa08d8b9 100644 --- a/mozilla/layout/html/base/src/nsAreaFrame.cpp +++ b/mozilla/layout/html/base/src/nsAreaFrame.cpp @@ -520,12 +520,8 @@ nsAreaFrame::Reflow(nsIPresContext& aPresContext, if (floaterYMost > 0) { // What we need to check for is if the bottom most floater extends below // the content area of the desired size - nsMargin borderPadding; - nscoord contentYMost; - - nsHTMLReflowState::ComputeBorderPaddingFor(this, aReflowState.parentReflowState, - borderPadding); - contentYMost = aDesiredSize.height - borderPadding.bottom; + nscoord contentYMost = aDesiredSize.height - + aReflowState.mComputedBorderPadding.bottom; if (floaterYMost > contentYMost) { aDesiredSize.height += floaterYMost - contentYMost; @@ -623,18 +619,14 @@ nsAreaFrame::ReflowAbsoluteFrame(nsIPresContext& aPresContext, kidReflowState.reason = eReflowReason_Initial; } - // XXX Temporary hack until the block/inline code starts using 'computedWidth' - kidReflowState.availableWidth = kidReflowState.computedWidth; rv = htmlReflow->Reflow(aPresContext, kidDesiredSize, kidReflowState, aStatus); // XXX If the child had a fixed height, then make sure it respected it... if (NS_AUTOHEIGHT != kidReflowState.computedHeight) { if (kidDesiredSize.height < kidReflowState.computedHeight) { kidDesiredSize.height = kidReflowState.computedHeight; - - nsMargin borderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, borderPadding); - kidDesiredSize.height += borderPadding.top + borderPadding.bottom; + kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top + + kidReflowState.mComputedBorderPadding.bottom; } } diff --git a/mozilla/layout/html/base/src/nsBulletFrame.cpp b/mozilla/layout/html/base/src/nsBulletFrame.cpp index 2a45ee80fee..c1c253fcc46 100644 --- a/mozilla/layout/html/base/src/nsBulletFrame.cpp +++ b/mozilla/layout/html/base/src/nsBulletFrame.cpp @@ -412,10 +412,7 @@ nsBulletFrame::Reflow(nsIPresContext& aPresContext, // Add in the border and padding; split the top/bottom between the // ascent and descent to make things look nice - nsMargin borderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(this, - aReflowState.parentReflowState, - borderPadding); + const nsMargin& borderPadding = aReflowState.mComputedBorderPadding; aMetrics.width += borderPadding.left + borderPadding.right; aMetrics.height += borderPadding.top + borderPadding.bottom; aMetrics.ascent += borderPadding.top; diff --git a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp index 713d7a1e3ab..31a2fd5862f 100644 --- a/mozilla/layout/html/base/src/nsHTMLReflowState.cpp +++ b/mozilla/layout/html/base/src/nsHTMLReflowState.cpp @@ -421,9 +421,6 @@ nsHTMLReflowState::InitAbsoluteConstraints(nsIPresContext& aPresContext, nscoord containingBlockWidth, nscoord containingBlockHeight) { - // XXX Correctly handle absolutely positioned elements by using the - // correct edge (computed width/height is the content edge)... - // If any of the offsets are 'auto', then get the placeholder frame // and compute its origin relative to the containing block nsPoint placeholderOffset(0, 0); diff --git a/mozilla/layout/html/base/src/nsLeafFrame.cpp b/mozilla/layout/html/base/src/nsLeafFrame.cpp index ba0f3c79adc..f3cc92676ad 100644 --- a/mozilla/layout/html/base/src/nsLeafFrame.cpp +++ b/mozilla/layout/html/base/src/nsLeafFrame.cpp @@ -93,9 +93,7 @@ nsLeafFrame::AddBordersAndPadding(nsIPresContext* aPresContext, nsHTMLReflowMetrics& aMetrics, nsMargin& aBorderPadding) { - nsHTMLReflowState::ComputeBorderPaddingFor(this, - aReflowState.parentReflowState, - aBorderPadding); + aBorderPadding = aReflowState.mComputedBorderPadding; aMetrics.width += aBorderPadding.left + aBorderPadding.right; aMetrics.height += aBorderPadding.top + aBorderPadding.bottom; aMetrics.ascent = aMetrics.height;