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

Unified Diff: Source/platform/transforms/PerspectiveTransformOperation.cpp

Issue 641643004: Reapply the non-MathExtras parts of (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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/platform/mac/ThemeMac.mm ('k') | Source/wtf/CheckedArithmetic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/transforms/PerspectiveTransformOperation.cpp
diff --git a/Source/platform/transforms/PerspectiveTransformOperation.cpp b/Source/platform/transforms/PerspectiveTransformOperation.cpp
index 8ad426556065089cc7c4c6ef454d6831697af044..7149758afea29c686ca9dc1de2912bf2f34644bf 100644
--- a/Source/platform/transforms/PerspectiveTransformOperation.cpp
+++ b/Source/platform/transforms/PerspectiveTransformOperation.cpp
@@ -38,7 +38,7 @@ PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const Transf
if (blendToIdentity) {
double p = blink::blend(m_p, 1., progress); // FIXME: this seems wrong. https://bugs.webkit.org/show_bug.cgi?id=52700
- return PerspectiveTransformOperation::create(clampToPositiveInteger(p));
+ return PerspectiveTransformOperation::create(clampTo<int>(p, 0));
}
const PerspectiveTransformOperation* fromOp = static_cast<const PerspectiveTransformOperation*>(from);
@@ -53,7 +53,7 @@ PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const Transf
if (decomp.perspectiveZ) {
double val = -1.0 / decomp.perspectiveZ;
- return PerspectiveTransformOperation::create(clampToPositiveInteger(val));
+ return PerspectiveTransformOperation::create(clampTo<int>(val, 0));
}
return PerspectiveTransformOperation::create(0);
}
« no previous file with comments | « Source/platform/mac/ThemeMac.mm ('k') | Source/wtf/CheckedArithmetic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698