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