| Index: third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| diff --git a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| index ced3d37ab6ea9ee35cb8bf1a02a35632a15b79a2..f1c208806ca92c72e272bab65162cc86054abde4 100644
|
| --- a/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| +++ b/third_party/WebKit/Source/platform/transforms/TransformationMatrix.cpp
|
| @@ -37,6 +37,9 @@
|
| #include "wtf/Assertions.h"
|
| #include "wtf/MathExtras.h"
|
|
|
| +#include <cmath>
|
| +#include <cstdlib>
|
| +
|
| #if CPU(X86_64)
|
| #include <emmintrin.h>
|
| #endif
|
| @@ -596,8 +599,7 @@ static void slerp(double qa[4], const double qb[4], double t)
|
|
|
| product = ax * bx + ay * by + az * bz + aw * bw;
|
|
|
| - // Clamp product to -1.0 <= product <= 1.0.
|
| - product = std::min(std::max(product, -1.0), 1.0);
|
| + product = clampTo(product, -1.0, 1.0);
|
|
|
| const double epsilon = 1e-5;
|
| if (std::abs(product - 1.0) < epsilon) {
|
| @@ -710,7 +712,7 @@ FloatQuad TransformationMatrix::projectQuad(const FloatQuad& q, bool* clamped) c
|
| static float clampEdgeValue(float f)
|
| {
|
| ASSERT(!std::isnan(f));
|
| - return std::min<float>(std::max<float>(f, (-LayoutUnit::max() / 2).toFloat()), (LayoutUnit::max() / 2).toFloat());
|
| + return clampTo(f, (-LayoutUnit::max() / 2).toFloat(), (LayoutUnit::max() / 2).toFloat());
|
| }
|
|
|
| LayoutRect TransformationMatrix::clampedBoundsOfProjectedQuad(const FloatQuad& q) const
|
|
|