diff --git a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp
index cebe8fc266d..8d8cbe6e66e 100644
--- a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp
+++ b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp
@@ -279,7 +279,8 @@ nsButtonControlFrame::Reflow(nsIPresContext& aPresContext,
if (NS_FORM_INPUT_IMAGE == type) {
nsSize ignore;
GetDesiredSize(&aPresContext, aReflowState, aDesiredSize, ignore);
- AddBordersAndPadding(&aPresContext, aDesiredSize);
+ nsMargin bp;
+ AddBordersAndPadding(&aPresContext, aReflowState, aDesiredSize, bp);
if (nsnull != aDesiredSize.maxElementSize) {
aDesiredSize.maxElementSize->width = aDesiredSize.width;
aDesiredSize.maxElementSize->height = aDesiredSize.height;