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

Unified Diff: Source/core/css/CSSGradientValue.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/CSSFontSelector.cpp ('k') | Source/core/css/CSSReflectValue.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSGradientValue.cpp
diff --git a/Source/core/css/CSSGradientValue.cpp b/Source/core/css/CSSGradientValue.cpp
index afb56973727ed4e3cabbec8482c20c0962cd8de6..277162fd89ba49b8b354817c3e4bca249a68a349 100644
--- a/Source/core/css/CSSGradientValue.cpp
+++ b/Source/core/css/CSSGradientValue.cpp
@@ -39,8 +39,6 @@
#include "wtf/text/StringBuilder.h"
#include "wtf/text/WTFString.h"
-using namespace std;
-
namespace WebCore {
void CSSGradientColorStop::trace(Visitor* visitor)
@@ -1056,10 +1054,10 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(const CSSToLengthCon
// Horizontal
switch (fill) {
case ClosestSide: {
- float xDist = min(secondPoint.x(), size.width() - secondPoint.x());
- float yDist = min(secondPoint.y(), size.height() - secondPoint.y());
+ float xDist = std::min(secondPoint.x(), size.width() - secondPoint.x());
+ float yDist = std::min(secondPoint.y(), size.height() - secondPoint.y());
if (shape == Circle) {
- float smaller = min(xDist, yDist);
+ float smaller = std::min(xDist, yDist);
xDist = smaller;
yDist = smaller;
}
@@ -1068,10 +1066,10 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(const CSSToLengthCon
break;
}
case FarthestSide: {
- float xDist = max(secondPoint.x(), size.width() - secondPoint.x());
- float yDist = max(secondPoint.y(), size.height() - secondPoint.y());
+ float xDist = std::max(secondPoint.x(), size.width() - secondPoint.x());
+ float yDist = std::max(secondPoint.y(), size.height() - secondPoint.y());
if (shape == Circle) {
- float larger = max(xDist, yDist);
+ float larger = std::max(xDist, yDist);
xDist = larger;
yDist = larger;
}
@@ -1087,8 +1085,8 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(const CSSToLengthCon
else {
// If <shape> is ellipse, the gradient-shape has the same ratio of width to height
// that it would if closest-side or farthest-side were specified, as appropriate.
- float xDist = min(secondPoint.x(), size.width() - secondPoint.x());
- float yDist = min(secondPoint.y(), size.height() - secondPoint.y());
+ float xDist = std::min(secondPoint.x(), size.width() - secondPoint.x());
+ float yDist = std::min(secondPoint.y(), size.height() - secondPoint.y());
secondRadius = horizontalEllipseRadius(corner - secondPoint, xDist / yDist);
aspectRatio = xDist / yDist;
@@ -1104,8 +1102,8 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(const CSSToLengthCon
else {
// If <shape> is ellipse, the gradient-shape has the same ratio of width to height
// that it would if closest-side or farthest-side were specified, as appropriate.
- float xDist = max(secondPoint.x(), size.width() - secondPoint.x());
- float yDist = max(secondPoint.y(), size.height() - secondPoint.y());
+ float xDist = std::max(secondPoint.x(), size.width() - secondPoint.x());
+ float yDist = std::max(secondPoint.y(), size.height() - secondPoint.y());
secondRadius = horizontalEllipseRadius(corner - secondPoint, xDist / yDist);
aspectRatio = xDist / yDist;
« no previous file with comments | « Source/core/css/CSSFontSelector.cpp ('k') | Source/core/css/CSSReflectValue.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698