Index: Source/core/rendering/RenderMenuList.cpp |
diff --git a/Source/core/rendering/RenderMenuList.cpp b/Source/core/rendering/RenderMenuList.cpp |
index f900e5885f08ec01e0a2c94393b9697ada470c5d..b38ac33f0f72b708ebdac7554294c3fa33843329 100644 |
--- a/Source/core/rendering/RenderMenuList.cpp |
+++ b/Source/core/rendering/RenderMenuList.cpp |
@@ -47,8 +47,6 @@ |
#include "platform/text/PlatformLocale.h" |
#include <math.h> |
-using namespace std; |
- |
namespace WebCore { |
using namespace HTMLNames; |
@@ -181,9 +179,10 @@ void RenderMenuList::updateOptionsWidth() |
optionWidth += minimumValueForLength(optionStyle->textIndent(), 0); |
if (!text.isEmpty()) |
optionWidth += style()->font().width(text); |
- maxOptionWidth = max(maxOptionWidth, optionWidth); |
- } else if (!text.isEmpty()) |
- maxOptionWidth = max(maxOptionWidth, style()->font().width(text)); |
+ maxOptionWidth = std::max(maxOptionWidth, optionWidth); |
+ } else if (!text.isEmpty()) { |
+ maxOptionWidth = std::max(maxOptionWidth, style()->font().width(text)); |
+ } |
} |
int width = static_cast<int>(ceilf(maxOptionWidth)); |
@@ -323,7 +322,7 @@ LayoutRect RenderMenuList::controlClipRect(const LayoutPoint& additionalOffset) |
void RenderMenuList::computeIntrinsicLogicalWidths(LayoutUnit& minLogicalWidth, LayoutUnit& maxLogicalWidth) const |
{ |
- maxLogicalWidth = max(m_optionsWidth, RenderTheme::theme().minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight(); |
+ maxLogicalWidth = std::max(m_optionsWidth, RenderTheme::theme().minimumMenuListSize(style())) + m_innerBlock->paddingLeft() + m_innerBlock->paddingRight(); |
if (!style()->width().isPercent()) |
minLogicalWidth = maxLogicalWidth; |
} |
@@ -340,13 +339,13 @@ void RenderMenuList::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())); |
} |
LayoutUnit toAdd = borderAndPaddingWidth(); |