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

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

Issue 1196913005: Implement animations for Independent CSS Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix rotate-interpolation test 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/RotateTransformOperation.h
diff --git a/Source/platform/transforms/RotateTransformOperation.h b/Source/platform/transforms/RotateTransformOperation.h
index f681ce3d6c5b6b2f39be42fbea2738fa005ba0b3..00f85a5fb05942766cb7e7c0f7ef807ecb2febf7 100644
--- a/Source/platform/transforms/RotateTransformOperation.h
+++ b/Source/platform/transforms/RotateTransformOperation.h
@@ -57,6 +57,8 @@ public:
transform.rotate3d(m_x, m_y, m_z, m_angle);
}
+ static bool isMatchingOperationType(OperationType type) { return type == Rotate || type == RotateX || type == RotateY || type == RotateZ || type == Rotate3D; }
+
private:
virtual bool operator==(const TransformOperation& o) const override
{
@@ -75,7 +77,7 @@ private:
, m_angle(angle)
, m_type(type)
{
- ASSERT(type == RotateX || type == RotateY || type == RotateZ || type == Rotate3D);
+ ASSERT(isMatchingOperationType(type));
}
double m_x;
@@ -85,6 +87,8 @@ private:
OperationType m_type;
};
+DEFINE_TRANSFORM_TYPE_CASTS(RotateTransformOperation);
+
} // namespace blink
#endif // RotateTransformOperation_h
« no previous file with comments | « Source/core/css/resolver/AnimatedStyleBuilder.cpp ('k') | Source/platform/transforms/ScaleTransformOperation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698