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

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: 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..6f303ee7085b7c0b8390094d0bbc45d2712e525b 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);
}
+ virtual bool isMatchingOperationType() const override { 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());
}
double m_x;
@@ -85,6 +87,8 @@ private:
OperationType m_type;
};
+DEFINE_TRANSFORM_TYPE_CASTS(RotateTransformOperation, isMatchingOperationType());
+
} // namespace blink
#endif // RotateTransformOperation_h

Powered by Google App Engine
This is Rietveld 408576698