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

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

Issue 73493002: Fix blendToIdentity case in PerspectiveTransformOperation::blend Base URL: http://src.chromium.org/blink/trunk/
Patch Set: updated patch Created 6 years, 11 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 | « LayoutTests/animations/3d/transform-perspective-expected.txt ('k') | no next file » | 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 7c805c1d5efdb1a296c25fc61e334ed15aeea020..4630b609e16af59ff897add911007fbbf55f8d12 100644
--- a/Source/platform/transforms/PerspectiveTransformOperation.cpp
+++ b/Source/platform/transforms/PerspectiveTransformOperation.cpp
@@ -27,6 +27,7 @@
#include "platform/transforms/PerspectiveTransformOperation.h"
#include "platform/animation/AnimationUtilities.h"
+#include "platform/transforms/IdentityTransformOperation.h"
#include "wtf/MathExtras.h"
using namespace std;
@@ -39,7 +40,10 @@ PassRefPtr<TransformOperation> PerspectiveTransformOperation::blend(const Transf
return this;
if (blendToIdentity) {
- double p = WebCore::blend(m_p, 1., progress); // FIXME: this seems wrong. https://bugs.webkit.org/show_bug.cgi?id=52700
+ if (progress == 1) {
Julien - ping for review 2014/01/10 13:41:41 We don't put curly braces around single line if's.
+ return IdentityTransformOperation::create();
+ }
+ double p = m_p / (1 - progress);
return PerspectiveTransformOperation::create(clampToPositiveInteger(p));
}
« no previous file with comments | « LayoutTests/animations/3d/transform-perspective-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698