| Index: Source/core/rendering/RenderListBox.cpp
|
| diff --git a/Source/core/rendering/RenderListBox.cpp b/Source/core/rendering/RenderListBox.cpp
|
| index 82c22b919454f18a40c8d1644d0f3cc8155ddb3a..59d5094ab2dc6111a0620b2a3856a25081fec5ea 100644
|
| --- a/Source/core/rendering/RenderListBox.cpp
|
| +++ b/Source/core/rendering/RenderListBox.cpp
|
| @@ -58,8 +58,6 @@
|
| #include "platform/text/BidiTextRun.h"
|
| #include <math.h>
|
|
|
| -using namespace std;
|
| -
|
| namespace WebCore {
|
|
|
| using namespace HTMLNames;
|
| @@ -161,7 +159,7 @@ void RenderListBox::updateFromElement()
|
| textRun.setDirection(direction);
|
| textRun.disableRoundingHacks();
|
| float textWidth = itemFont.width(textRun);
|
| - width = max(width, textWidth);
|
| + width = std::max(width, textWidth);
|
| }
|
| }
|
| m_optionsWidth = static_cast<int>(ceilf(width));
|
| @@ -246,13 +244,13 @@ void RenderListBox::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();
|
| @@ -266,7 +264,7 @@ int RenderListBox::size() const
|
| {
|
| int specifiedSize = selectElement()->size();
|
| if (specifiedSize > 1)
|
| - return max(minSize, specifiedSize);
|
| + return std::max(minSize, specifiedSize);
|
|
|
| return defaultSize;
|
| }
|
| @@ -274,7 +272,7 @@ int RenderListBox::size() const
|
| int RenderListBox::numVisibleItems() const
|
| {
|
| // Only count fully visible rows. But don't return 0 even if only part of a row shows.
|
| - return max<int>(1, (contentHeight() + rowSpacing) / itemHeight());
|
| + return std::max<int>(1, (contentHeight() + rowSpacing) / itemHeight());
|
| }
|
|
|
| int RenderListBox::numItems() const
|
| @@ -555,7 +553,7 @@ void RenderListBox::panScroll(const IntPoint& panStartMousePosition)
|
| int yDelta = lastKnownMousePosition.y() - panStartMousePosition.y();
|
|
|
| // If the point is too far from the center we limit the speed
|
| - yDelta = max<int>(min<int>(yDelta, maxSpeed), -maxSpeed);
|
| + yDelta = std::max<int>(std::min<int>(yDelta, maxSpeed), -maxSpeed);
|
|
|
| if (abs(yDelta) < iconRadius) // at the center we let the space for the icon
|
| return;
|
| @@ -703,7 +701,7 @@ LayoutUnit RenderListBox::scrollWidth() const
|
|
|
| LayoutUnit RenderListBox::scrollHeight() const
|
| {
|
| - return max(clientHeight(), listHeight());
|
| + return std::max(clientHeight(), listHeight());
|
| }
|
|
|
| LayoutUnit RenderListBox::scrollLeft() const
|
| @@ -914,7 +912,7 @@ int RenderListBox::lineStep(ScrollbarOrientation) const
|
|
|
| int RenderListBox::pageStep(ScrollbarOrientation orientation) const
|
| {
|
| - return max(1, numVisibleItems() - 1);
|
| + return std::max(1, numVisibleItems() - 1);
|
| }
|
|
|
| float RenderListBox::pixelStep(ScrollbarOrientation) const
|
|
|