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

Unified Diff: Source/platform/transforms/ScaleTransformOperation.h

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
Index: Source/platform/transforms/ScaleTransformOperation.h
diff --git a/Source/platform/transforms/ScaleTransformOperation.h b/Source/platform/transforms/ScaleTransformOperation.h
index 4b481c46a3d5e84357cfef7bb1ee6f490fc09c79..e1dce9778946f90aeb0e991d9e9519c2e98fe0a4 100644
--- a/Source/platform/transforms/ScaleTransformOperation.h
+++ b/Source/platform/transforms/ScaleTransformOperation.h
@@ -51,6 +51,9 @@ public:
{
transform.scale3d(m_x, m_y, m_z);
}
+ virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
+
+ virtual bool isMatchingOperationType() const override { return type() == Scale || type() == ScaleX || type() == ScaleY || type() == ScaleZ || type() == Scale3D; }
private:
virtual OperationType type() const override { return m_type; }
@@ -63,15 +66,13 @@ private:
return m_x == s->m_x && m_y == s->m_y && m_z == s->m_z;
}
- virtual PassRefPtr<TransformOperation> blend(const TransformOperation* from, double progress, bool blendToIdentity = false) override;
-
ScaleTransformOperation(double sx, double sy, double sz, OperationType type)
: m_x(sx)
, m_y(sy)
, m_z(sz)
, m_type(type)
{
- ASSERT(type == ScaleX || type == ScaleY || type == ScaleZ || type == Scale || type == Scale3D);
+ ASSERT(isMatchingOperationType());
}
double m_x;
@@ -80,6 +81,8 @@ private:
OperationType m_type;
};
+DEFINE_TRANSFORM_TYPE_CASTS(ScaleTransformOperation, isMatchingOperationType());
+
} // namespace blink
#endif // ScaleTransformOperation_h

Powered by Google App Engine
This is Rietveld 408576698