| 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;
|
|
|