diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index e392ad96901..88fc761030b 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -685,7 +685,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext, // center child horizontally nscoord xoff = 0; - if (aReflowState.mComputedHeight != NS_INTRINSICSIZE) { + if (aReflowState.mComputedWidth != NS_INTRINSICSIZE) { xoff = (aReflowState.mComputedWidth - aDesiredSize.width)/2; if (xoff < 0) { xoff = 0; diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index e392ad96901..88fc761030b 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -685,7 +685,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext* aPresContext, // center child horizontally nscoord xoff = 0; - if (aReflowState.mComputedHeight != NS_INTRINSICSIZE) { + if (aReflowState.mComputedWidth != NS_INTRINSICSIZE) { xoff = (aReflowState.mComputedWidth - aDesiredSize.width)/2; if (xoff < 0) { xoff = 0;