Index: Source/core/rendering/RenderFileUploadControl.cpp |
diff --git a/Source/core/rendering/RenderFileUploadControl.cpp b/Source/core/rendering/RenderFileUploadControl.cpp |
index 9fd7784719c59437121e4294249fff060f16ef59..8b12dc0edaaf9c644fe298712aa2992e72854aa3 100644 |
--- a/Source/core/rendering/RenderFileUploadControl.cpp |
+++ b/Source/core/rendering/RenderFileUploadControl.cpp |
@@ -35,8 +35,6 @@ |
#include "platform/text/TextRun.h" |
#include <math.h> |
-using namespace std; |
- |
namespace WebCore { |
using namespace HTMLNames; |
@@ -83,7 +81,7 @@ static int nodeWidth(Node* node) |
int RenderFileUploadControl::maxFilenameWidth() const |
{ |
- return max(0, contentBoxRect().pixelSnappedWidth() - nodeWidth(uploadButton()) - afterButtonSpacing); |
+ return std::max(0, contentBoxRect().pixelSnappedWidth() - nodeWidth(uploadButton()) - afterButtonSpacing); |
} |
void RenderFileUploadControl::paintObject(PaintInfo& paintInfo, const LayoutPoint& paintOffset) |
@@ -161,7 +159,7 @@ void RenderFileUploadControl::computeIntrinsicLogicalWidths(LayoutUnit& minLogic |
if (HTMLInputElement* button = uploadButton()) |
if (RenderObject* buttonRenderer = button->renderer()) |
defaultLabelWidth += buttonRenderer->maxPreferredLogicalWidth() + afterButtonSpacing; |
- maxLogicalWidth = static_cast<int>(ceilf(max(minDefaultLabelWidth, defaultLabelWidth))); |
+ maxLogicalWidth = static_cast<int>(ceilf(std::max(minDefaultLabelWidth, defaultLabelWidth))); |
if (!style()->width().isPercent()) |
minLogicalWidth = maxLogicalWidth; |
@@ -181,13 +179,13 @@ void RenderFileUploadControl::computePreferredLogicalWidths() |
computeIntrinsicLogicalWidths(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth); |
if (styleToUse->minWidth().isFixed() && styleToUse->minWidth().value() > 0) { |
- m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
- m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
+ m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
+ m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->minWidth().value())); |
} |
if (styleToUse->maxWidth().isFixed()) { |
- m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
- m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
+ m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
+ m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->maxWidth().value())); |
} |
int toAdd = borderAndPaddingWidth(); |