From 5bd0174c4707a10a087af6d1339501ec8c6c0a2b Mon Sep 17 00:00:00 2001 From: "troy%netscape.com" Date: Sat, 6 Mar 1999 01:48:28 +0000 Subject: [PATCH] Eliminated some code that's no longer needed now that the info is in the HTML reflow state git-svn-id: svn://10.0.0.236/trunk@23029 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsButtonFrameRenderer.cpp | 6 +----- mozilla/layout/generic/nsViewportFrame.cpp | 9 ++------- mozilla/layout/html/base/src/nsViewportFrame.cpp | 9 ++------- mozilla/layout/html/forms/src/nsButtonFrameRenderer.cpp | 6 +----- 4 files changed, 6 insertions(+), 24 deletions(-) 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();