From de53e898e24dd7130e46f9905f8a95cf4e18f0fd Mon Sep 17 00:00:00 2001 From: "rods%netscape.com" Date: Tue, 3 Apr 2001 14:10:47 +0000 Subject: [PATCH] removing special centering code for width Bug 68573 r=kmcclusk sr=attinasi git-svn-id: svn://10.0.0.236/trunk@91140 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsHTMLButtonControlFrame.cpp | 13 +------------ .../html/forms/src/nsHTMLButtonControlFrame.cpp | 13 +------------ 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index 9663b44357f..6d0875c3adc 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -667,20 +667,9 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext, yoff = (minInternalHeight - aDesiredSize.height) / 2; } - // center child horizontally - nscoord xoff = 0; - if (aReflowState.mComputedWidth != NS_INTRINSICSIZE) { - xoff = (aReflowState.mComputedWidth - aDesiredSize.width)/2; - if (xoff < 0) { - xoff = 0; - } - } else if (aDesiredSize.width < minInternalWidth) { - xoff = (minInternalWidth - aDesiredSize.width) / 2; - } - // Place the child FinishReflowChild(firstKid, aPresContext, aDesiredSize, - xoff + focusPadding.left + aReflowState.mComputedBorderPadding.left, + focusPadding.left + aReflowState.mComputedBorderPadding.right, yoff + focusPadding.top + aReflowState.mComputedBorderPadding.top, 0); #if 0 // old way diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index 9663b44357f..6d0875c3adc 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -667,20 +667,9 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext, yoff = (minInternalHeight - aDesiredSize.height) / 2; } - // center child horizontally - nscoord xoff = 0; - if (aReflowState.mComputedWidth != NS_INTRINSICSIZE) { - xoff = (aReflowState.mComputedWidth - aDesiredSize.width)/2; - if (xoff < 0) { - xoff = 0; - } - } else if (aDesiredSize.width < minInternalWidth) { - xoff = (minInternalWidth - aDesiredSize.width) / 2; - } - // Place the child FinishReflowChild(firstKid, aPresContext, aDesiredSize, - xoff + focusPadding.left + aReflowState.mComputedBorderPadding.left, + focusPadding.left + aReflowState.mComputedBorderPadding.right, yoff + focusPadding.top + aReflowState.mComputedBorderPadding.top, 0); #if 0 // old way