diff --git a/mozilla/layout/forms/nsFieldSetFrame.cpp b/mozilla/layout/forms/nsFieldSetFrame.cpp index 3f71b8584f8..87df47b3fe6 100644 --- a/mozilla/layout/forms/nsFieldSetFrame.cpp +++ b/mozilla/layout/forms/nsFieldSetFrame.cpp @@ -421,8 +421,9 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width = maxElementSize.width + borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height = maxElementSize.height + borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); + aDesiredSize.maxElementSize->width = maxElementSize.width; + aDesiredSize.maxElementSize->height = maxElementSize.height; } aStatus = NS_FRAME_COMPLETE; diff --git a/mozilla/layout/forms/nsFileControlFrame.cpp b/mozilla/layout/forms/nsFileControlFrame.cpp index b862db71991..273a9865b34 100644 --- a/mozilla/layout/forms/nsFileControlFrame.cpp +++ b/mozilla/layout/forms/nsFileControlFrame.cpp @@ -257,6 +257,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { +//XXX aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); aDesiredSize.maxElementSize->width = aDesiredSize.width; aDesiredSize.maxElementSize->height = aDesiredSize.height; } diff --git a/mozilla/layout/forms/nsFormControlFrame.cpp b/mozilla/layout/forms/nsFormControlFrame.cpp index 3f33e391c88..814030fdeb6 100644 --- a/mozilla/layout/forms/nsFormControlFrame.cpp +++ b/mozilla/layout/forms/nsFormControlFrame.cpp @@ -317,6 +317,7 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { +//XXX aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); aDesiredSize.maxElementSize->width = aDesiredSize.width; aDesiredSize.maxElementSize->height = aDesiredSize.height; } diff --git a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp index bcf275c1dd6..58cd203d85a 100644 --- a/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/forms/nsHTMLButtonControlFrame.cpp @@ -618,8 +618,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, // adjust our max element size, if necessary if (aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width += borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height += borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); } // if we are constrained and the child is smaller, use the constrained values diff --git a/mozilla/layout/forms/nsLegendFrame.cpp b/mozilla/layout/forms/nsLegendFrame.cpp index 45c3b4a5a1f..26e532917fa 100644 --- a/mozilla/layout/forms/nsLegendFrame.cpp +++ b/mozilla/layout/forms/nsLegendFrame.cpp @@ -152,8 +152,7 @@ nsLegendFrame::Reflow(nsIPresContext& aPresContext, // adjust our max element size, if necessary if (aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width += borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height += borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); } aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0; diff --git a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp index 5be7b60e982..7d6fad4f583 100644 --- a/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsButtonControlFrame.cpp @@ -272,6 +272,7 @@ nsButtonControlFrame::Reflow(nsIPresContext& aPresContext, nsMargin bp; AddBordersAndPadding(&aPresContext, aReflowState, aDesiredSize, bp); if (nsnull != aDesiredSize.maxElementSize) { + aDesiredSize.AddBorderPaddingToMaxElementSize(bp); aDesiredSize.maxElementSize->width = aDesiredSize.width; aDesiredSize.maxElementSize->height = aDesiredSize.height; } diff --git a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp index 3f71b8584f8..87df47b3fe6 100644 --- a/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFieldSetFrame.cpp @@ -421,8 +421,9 @@ nsFieldSetFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width = maxElementSize.width + borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height = maxElementSize.height + borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); + aDesiredSize.maxElementSize->width = maxElementSize.width; + aDesiredSize.maxElementSize->height = maxElementSize.height; } aStatus = NS_FRAME_COMPLETE; diff --git a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp index b862db71991..273a9865b34 100644 --- a/mozilla/layout/html/forms/src/nsFileControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFileControlFrame.cpp @@ -257,6 +257,7 @@ NS_IMETHODIMP nsFileControlFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { +//XXX aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); aDesiredSize.maxElementSize->width = aDesiredSize.width; aDesiredSize.maxElementSize->height = aDesiredSize.height; } diff --git a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp index 3f33e391c88..814030fdeb6 100644 --- a/mozilla/layout/html/forms/src/nsFormControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsFormControlFrame.cpp @@ -317,6 +317,7 @@ nsFormControlFrame::Reflow(nsIPresContext& aPresContext, aDesiredSize.descent = 0; if (nsnull != aDesiredSize.maxElementSize) { +//XXX aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); aDesiredSize.maxElementSize->width = aDesiredSize.width; aDesiredSize.maxElementSize->height = aDesiredSize.height; } diff --git a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp index bcf275c1dd6..58cd203d85a 100644 --- a/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp +++ b/mozilla/layout/html/forms/src/nsHTMLButtonControlFrame.cpp @@ -618,8 +618,7 @@ nsHTMLButtonControlFrame::Reflow(nsIPresContext& aPresContext, // adjust our max element size, if necessary if (aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width += borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height += borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); } // if we are constrained and the child is smaller, use the constrained values diff --git a/mozilla/layout/html/forms/src/nsLabelFrame.cpp b/mozilla/layout/html/forms/src/nsLabelFrame.cpp index 0ed02b6294a..194377eb513 100644 --- a/mozilla/layout/html/forms/src/nsLabelFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLabelFrame.cpp @@ -442,8 +442,7 @@ nsLabelFrame::Reflow(nsIPresContext& aPresContext, // adjust our max element size, if necessary if (aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width += borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height += borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); } // if we are constrained and the child is smaller, use the constrained values diff --git a/mozilla/layout/html/forms/src/nsLegendFrame.cpp b/mozilla/layout/html/forms/src/nsLegendFrame.cpp index 45c3b4a5a1f..26e532917fa 100644 --- a/mozilla/layout/html/forms/src/nsLegendFrame.cpp +++ b/mozilla/layout/html/forms/src/nsLegendFrame.cpp @@ -152,8 +152,7 @@ nsLegendFrame::Reflow(nsIPresContext& aPresContext, // adjust our max element size, if necessary if (aDesiredSize.maxElementSize) { - aDesiredSize.maxElementSize->width += borderPadding.left + borderPadding.right; - aDesiredSize.maxElementSize->height += borderPadding.top + borderPadding.bottom; + aDesiredSize.AddBorderPaddingToMaxElementSize(borderPadding); } aDesiredSize.ascent = aDesiredSize.height; aDesiredSize.descent = 0;