Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Unified Diff: Source/core/dom/ViewportDescription.cpp

Issue 330933002: Revert of Removing "using" declarations that import names in the C++ Standard library. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
« no previous file with comments | « Source/core/dom/Text.cpp ('k') | Source/core/editing/CompositeEditCommand.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698