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

Unified Diff: Source/core/css/parser/CSSPropertyParser.cpp

Issue 342693003: 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/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/parser/CSSPropertyParser.cpp
diff --git a/Source/core/css/parser/CSSPropertyParser.cpp b/Source/core/css/parser/CSSPropertyParser.cpp
index f33421fc1206c9186e5ff31bb5295fc304d9edf2..d9ade98a45e8478c0f2471091d3883d2927ea495 100644
--- a/Source/core/css/parser/CSSPropertyParser.cpp
+++ b/Source/core/css/parser/CSSPropertyParser.cpp
@@ -82,8 +82,6 @@
#include "wtf/text/TextEncoding.h"
#include <limits.h>
-using namespace std;
-
namespace WebCore {
static const double MAX_SCALE = 1000000;
@@ -5292,7 +5290,7 @@ bool CSSPropertyParser::parseColorParameters(CSSParserValue* value, int* colorAr
const double value = parsedDouble(v, ReleaseParsedCalcValue);
// Convert the floating pointer number of alpha to an integer in the range [0, 256),
// with an equal distribution across all 256 values.
- colorArray[3] = static_cast<int>(max(0.0, min(1.0, value)) * nextafter(256.0, 0.0));
+ colorArray[3] = static_cast<int>(std::max(0.0, std::min(1.0, value)) * nextafter(256.0, 0.0));
}
return true;
}
@@ -5318,7 +5316,7 @@ bool CSSPropertyParser::parseHSLParameters(CSSParserValue* value, double* colorA
v = args->next();
if (!validUnit(v, FPercent, HTMLStandardMode))
return false;
- colorArray[i] = max(0.0, min(100.0, parsedDouble(v, ReleaseParsedCalcValue))) / 100.0; // needs to be value between 0 and 1.0
+ colorArray[i] = std::max(0.0, std::min(100.0, parsedDouble(v, ReleaseParsedCalcValue))) / 100.0; // needs to be value between 0 and 1.0
}
if (parseAlpha) {
v = args->next();
@@ -5327,7 +5325,7 @@ bool CSSPropertyParser::parseHSLParameters(CSSParserValue* value, double* colorA
v = args->next();
if (!validUnit(v, FNumber, HTMLStandardMode))
return false;
- colorArray[3] = max(0.0, min(1.0, parsedDouble(v, ReleaseParsedCalcValue)));
+ colorArray[3] = std::max(0.0, std::min(1.0, parsedDouble(v, ReleaseParsedCalcValue)));
}
return true;
}
« no previous file with comments | « Source/core/css/parser/BisonCSSParser-in.cpp ('k') | Source/core/css/resolver/StyleResolver.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698