diff --git a/mozilla/layout/forms/nsButtonFrameRenderer.cpp b/mozilla/layout/forms/nsButtonFrameRenderer.cpp index 27483af26dd..f753a7d347a 100644 --- a/mozilla/layout/forms/nsButtonFrameRenderer.cpp +++ b/mozilla/layout/forms/nsButtonFrameRenderer.cpp @@ -572,11 +572,7 @@ nsButtonFrameRenderer::AddFocusBordersAndPadding(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aMetrics, nsMargin& aBorderPadding) { - - nsHTMLReflowState::ComputeBorderPaddingFor(mFrame, - aReflowState.parentReflowState, - aBorderPadding); - + aBorderPadding = aReflowState.mComputedBorderPadding; aBorderPadding += GetButtonOuterFocusBorderAndPadding(); aBorderPadding += GetButtonInnerFocusMargin(); diff --git a/mozilla/layout/generic/nsViewportFrame.cpp b/mozilla/layout/generic/nsViewportFrame.cpp index 87651e47cae..ec79dc273e4 100644 --- a/mozilla/layout/generic/nsViewportFrame.cpp +++ b/mozilla/layout/generic/nsViewportFrame.cpp @@ -225,19 +225,14 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext, kidReflowState.reason = eReflowReason_Initial; } - // XXX Temporary hack until the block/inline code starts using 'computedWidth' - nsMargin kidBorderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, kidBorderPadding); - kidReflowState.availableWidth = kidReflowState.computedWidth + - kidBorderPadding.left + kidBorderPadding.right; - 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; - kidDesiredSize.height += kidBorderPadding.top + kidBorderPadding.bottom; + kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top + + kidReflowState.mComputedBorderPadding.bottom; } } diff --git a/mozilla/layout/html/base/src/nsViewportFrame.cpp b/mozilla/layout/html/base/src/nsViewportFrame.cpp index 87651e47cae..ec79dc273e4 100644 --- a/mozilla/layout/html/base/src/nsViewportFrame.cpp +++ b/mozilla/layout/html/base/src/nsViewportFrame.cpp @@ -225,19 +225,14 @@ ViewportFrame::ReflowFixedFrame(nsIPresContext& aPresContext, kidReflowState.reason = eReflowReason_Initial; } - // XXX Temporary hack until the block/inline code starts using 'computedWidth' - nsMargin kidBorderPadding; - nsHTMLReflowState::ComputeBorderPaddingFor(aKidFrame, &aReflowState, kidBorderPadding); - kidReflowState.availableWidth = kidReflowState.computedWidth + - kidBorderPadding.left + kidBorderPadding.right; - 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; - kidDesiredSize.height += kidBorderPadding.top + kidBorderPadding.bottom; + kidDesiredSize.height += kidReflowState.mComputedBorderPadding.top + + kidReflowState.mComputedBorderPadding.bottom; } } diff --git a/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp b/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp index 27483af26dd..f753a7d347a 100644 --- a/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp +++ b/mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp @@ -572,11 +572,7 @@ nsButtonFrameRenderer::AddFocusBordersAndPadding(nsIPresContext& aPresContext, nsHTMLReflowMetrics& aMetrics, nsMargin& aBorderPadding) { - - nsHTMLReflowState::ComputeBorderPaddingFor(mFrame, - aReflowState.parentReflowState, - aBorderPadding); - + aBorderPadding = aReflowState.mComputedBorderPadding; aBorderPadding += GetButtonOuterFocusBorderAndPadding(); aBorderPadding += GetButtonInnerFocusMargin();