Index: Source/core/dom/ViewportDescription.cpp |
diff --git a/Source/core/dom/ViewportDescription.cpp b/Source/core/dom/ViewportDescription.cpp |
index f6c88184eca18d469c3a538636c33c68595c5ef6..88e31cfe6dcbeadb706dfe0e93d9d811b6815ba4 100644 |
--- a/Source/core/dom/ViewportDescription.cpp |
+++ b/Source/core/dom/ViewportDescription.cpp |
@@ -35,6 +35,8 @@ |
#include "core/frame/Settings.h" |
#include "platform/weborigin/KURL.h" |
#include "public/platform/Platform.h" |
+ |
+using namespace std; |
namespace WebCore { |
@@ -110,13 +112,13 @@ |
// 1. Resolve min-zoom and max-zoom values. |
if (resultMinZoom != ViewportDescription::ValueAuto && resultMaxZoom != ViewportDescription::ValueAuto) |
- resultMaxZoom = std::max(resultMinZoom, resultMaxZoom); |
+ resultMaxZoom = max(resultMinZoom, resultMaxZoom); |
// 2. Constrain zoom value to the [min-zoom, max-zoom] range. |
if (resultZoom != ViewportDescription::ValueAuto) |
- resultZoom = compareIgnoringAuto(resultMinZoom, compareIgnoringAuto(resultMaxZoom, resultZoom, std::min), std::max); |
- |
- float extendZoom = compareIgnoringAuto(resultZoom, resultMaxZoom, std::min); |
+ resultZoom = compareIgnoringAuto(resultMinZoom, compareIgnoringAuto(resultMaxZoom, resultZoom, min), max); |
+ |
+ float extendZoom = compareIgnoringAuto(resultZoom, resultMaxZoom, min); |
// 3. Resolve non-"auto" lengths to pixel lengths. |
if (extendZoom == ViewportDescription::ValueAuto) { |
@@ -142,19 +144,19 @@ |
resultMaxHeight = extendHeight; |
if (resultMinWidth == ViewportDescription::ValueExtendToZoom) |
- resultMinWidth = compareIgnoringAuto(extendWidth, resultMaxWidth, std::max); |
+ resultMinWidth = compareIgnoringAuto(extendWidth, resultMaxWidth, max); |
if (resultMinHeight == ViewportDescription::ValueExtendToZoom) |
- resultMinHeight = compareIgnoringAuto(extendHeight, resultMaxHeight, std::max); |
+ resultMinHeight = compareIgnoringAuto(extendHeight, resultMaxHeight, max); |
} |
// 4. Resolve initial width from min/max descriptors. |
if (resultMinWidth != ViewportDescription::ValueAuto || resultMaxWidth != ViewportDescription::ValueAuto) |
- resultWidth = compareIgnoringAuto(resultMinWidth, compareIgnoringAuto(resultMaxWidth, initialViewportSize.width(), std::min), std::max); |
+ resultWidth = compareIgnoringAuto(resultMinWidth, compareIgnoringAuto(resultMaxWidth, initialViewportSize.width(), min), max); |
// 5. Resolve initial height from min/max descriptors. |
if (resultMinHeight != ViewportDescription::ValueAuto || resultMaxHeight != ViewportDescription::ValueAuto) |
- resultHeight = compareIgnoringAuto(resultMinHeight, compareIgnoringAuto(resultMaxHeight, initialViewportSize.height(), std::min), std::max); |
+ resultHeight = compareIgnoringAuto(resultMinHeight, compareIgnoringAuto(resultMaxHeight, initialViewportSize.height(), min), max); |
// 6-7. Resolve width value. |
if (resultWidth == ViewportDescription::ValueAuto) { |
@@ -178,7 +180,7 @@ |
resultZoom = initialViewportSize.width() / resultWidth; |
if (resultHeight != ViewportDescription::ValueAuto && resultHeight > 0) { |
// if 'auto', the initial-scale will be negative here and thus ignored. |
- resultZoom = std::max<float>(resultZoom, initialViewportSize.height() / resultHeight); |
+ resultZoom = max<float>(resultZoom, initialViewportSize.height() / resultHeight); |
} |
} |