| Index: Source/core/rendering/RenderReplaced.cpp
|
| diff --git a/Source/core/rendering/RenderReplaced.cpp b/Source/core/rendering/RenderReplaced.cpp
|
| index 8997082784716cc185d74a90d3db4c36b75a4e47..f2231c55709c25e278ef44cb7728a6ea81ac7693 100644
|
| --- a/Source/core/rendering/RenderReplaced.cpp
|
| +++ b/Source/core/rendering/RenderReplaced.cpp
|
| @@ -34,8 +34,6 @@
|
| #include "platform/RuntimeEnabledFeatures.h"
|
| #include "platform/graphics/GraphicsContext.h"
|
|
|
| -using namespace std;
|
| -
|
| namespace WebCore {
|
|
|
| const int cDefaultWidth = 300;
|
| @@ -198,8 +196,8 @@ bool RenderReplaced::shouldPaint(PaintInfo& paintInfo, const LayoutPoint& paintO
|
| if (isSelected() && inlineBoxWrapper()) {
|
| LayoutUnit selTop = paintOffset.y() + inlineBoxWrapper()->root().selectionTop();
|
| LayoutUnit selBottom = paintOffset.y() + selTop + inlineBoxWrapper()->root().selectionHeight();
|
| - top = min(selTop, top);
|
| - bottom = max(selBottom, bottom);
|
| + top = std::min(selTop, top);
|
| + bottom = std::max(selBottom, bottom);
|
| }
|
|
|
| if (adjustedPaintOffset.x() + visualOverflowRect().x() >= paintInfo.rect.maxX() || adjustedPaintOffset.x() + visualOverflowRect().maxX() <= paintInfo.rect.x())
|
| @@ -412,7 +410,7 @@ LayoutUnit RenderReplaced::computeReplacedLogicalWidth(ShouldComputePreferred sh
|
| // This solves above equation for 'width' (== logicalWidth).
|
| LayoutUnit marginStart = minimumValueForLength(style()->marginStart(), logicalWidth);
|
| LayoutUnit marginEnd = minimumValueForLength(style()->marginEnd(), logicalWidth);
|
| - logicalWidth = max<LayoutUnit>(0, logicalWidth - (marginStart + marginEnd + (width() - clientWidth())));
|
| + logicalWidth = std::max<LayoutUnit>(0, logicalWidth - (marginStart + marginEnd + (width() - clientWidth())));
|
| return computeReplacedLogicalWidthRespectingMinMaxWidth(logicalWidth, shouldComputePreferred);
|
| }
|
| }
|
| @@ -486,13 +484,13 @@ void RenderReplaced::computePreferredLogicalWidths()
|
| m_minPreferredLogicalWidth = 0;
|
|
|
| if (styleToUse->logicalMinWidth().isFixed() && styleToUse->logicalMinWidth().value() > 0) {
|
| - m_maxPreferredLogicalWidth = max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
|
| - m_minPreferredLogicalWidth = max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
|
| + m_maxPreferredLogicalWidth = std::max(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
|
| + m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMinWidth().value()));
|
| }
|
|
|
| if (styleToUse->logicalMaxWidth().isFixed()) {
|
| - m_maxPreferredLogicalWidth = min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
|
| - m_minPreferredLogicalWidth = min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
|
| + m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
|
| + m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse->logicalMaxWidth().value()));
|
| }
|
|
|
| LayoutUnit borderAndPadding = borderAndPaddingLogicalWidth();
|
|
|