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

Unified Diff: Source/core/html/forms/StepRange.cpp

Issue 334593005: 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/html/forms/RangeInputType.cpp ('k') | Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/StepRange.cpp
diff --git a/Source/core/html/forms/StepRange.cpp b/Source/core/html/forms/StepRange.cpp
index 62a3afac9b47be031dc26a11f069d001d9ebbb07..cba592c5799eccfe73eda8440207bf80861b04e3 100644
--- a/Source/core/html/forms/StepRange.cpp
+++ b/Source/core/html/forms/StepRange.cpp
@@ -27,8 +27,6 @@
#include "wtf/text/WTFString.h"
#include <float.h>
-using namespace std;
-
namespace WebCore {
using namespace HTMLNames;
@@ -84,7 +82,7 @@ Decimal StepRange::alignValueForStep(const Decimal& currentValue, const Decimal&
Decimal StepRange::clampValue(const Decimal& value) const
{
- const Decimal inRangeValue = max(m_minimum, min(value, m_maximum));
+ const Decimal inRangeValue = std::max(m_minimum, std::min(value, m_maximum));
if (!m_hasStep)
return inRangeValue;
// Rounds inRangeValue to stepBase + N * step.
@@ -121,13 +119,13 @@ Decimal StepRange::parseStep(AnyStepHandling anyStepHandling, const StepDescript
break;
case ParsedStepValueShouldBeInteger:
// For date, month, and week, the parsed value should be an integer for some types.
- step = max(step.round(), Decimal(1));
+ step = std::max(step.round(), Decimal(1));
step *= stepDescription.stepScaleFactor;
break;
case ScaledStepValueShouldBeInteger:
// For datetime, datetime-local, time, the result should be an integer.
step *= stepDescription.stepScaleFactor;
- step = max(step.round(), Decimal(1));
+ step = std::max(step.round(), Decimal(1));
break;
default:
ASSERT_NOT_REACHED();
« no previous file with comments | « Source/core/html/forms/RangeInputType.cpp ('k') | Source/core/html/shadow/SliderThumbElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698