Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include "nsIDOMHTMLInputElement.h"
|
||||
#include "nsStyleSet.h"
|
||||
#include "nsDisplayList.h"
|
||||
#include <algorithm>
|
||||
|
||||
using namespace mozilla;
|
||||
|
||||
@@ -276,12 +277,12 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(extraright >=0, "How'd that happen?");
|
||||
|
||||
// Do not allow the extras to be bigger than the relevant padding
|
||||
extraleft = NS_MIN(extraleft, aReflowState.mComputedPadding.left);
|
||||
extraright = NS_MIN(extraright, aReflowState.mComputedPadding.right);
|
||||
extraleft = std::min(extraleft, aReflowState.mComputedPadding.left);
|
||||
extraright = std::min(extraright, aReflowState.mComputedPadding.right);
|
||||
xoffset -= extraleft;
|
||||
availSize.width += extraleft + extraright;
|
||||
}
|
||||
availSize.width = NS_MAX(availSize.width,0);
|
||||
availSize.width = std::max(availSize.width,0);
|
||||
|
||||
nsHTMLReflowState reflowState(aPresContext, aReflowState, aFirstKid,
|
||||
availSize);
|
||||
@@ -295,7 +296,7 @@ nsHTMLButtonControlFrame::ReflowButtonContents(nsPresContext* aPresContext,
|
||||
// XXXbz this assumes border-box sizing.
|
||||
nscoord minInternalHeight = aReflowState.mComputedMinHeight -
|
||||
aReflowState.mComputedBorderPadding.TopBottom();
|
||||
minInternalHeight = NS_MAX(minInternalHeight, 0);
|
||||
minInternalHeight = std::max(minInternalHeight, 0);
|
||||
|
||||
// center child vertically
|
||||
nscoord yoff = 0;
|
||||
|
||||
Reference in New Issue
Block a user