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

Unified Diff: Source/platform/transforms/TranslateTransformOperation.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
« no previous file with comments | « Source/platform/transforms/TransformOperation.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/transforms/TranslateTransformOperation.h
diff --git a/Source/platform/transforms/TranslateTransformOperation.h b/Source/platform/transforms/TranslateTransformOperation.h
index 6ceac11668eb03a4235145d6e221359d410b0bac..63687e9054b50604a61e5edb0ef011987a7f8b39 100644
--- a/Source/platform/transforms/TranslateTransformOperation.h
+++ b/Source/platform/transforms/TranslateTransformOperation.h
@@ -57,6 +57,8 @@ public:
transform.translate3d(x(borderBoxSize), y(borderBoxSize), z());
}
+ static bool isMatchingOperationType(OperationType type) { return type == Translate || type == TranslateX || type == TranslateY || type == TranslateZ || type == Translate3D; }
+
private:
virtual OperationType type() const override { return m_type; }
@@ -81,7 +83,7 @@ private:
, m_z(tz)
, m_type(type)
{
- ASSERT(type == TranslateX || type == TranslateY || type == TranslateZ || type == Translate || type == Translate3D);
+ ASSERT(isMatchingOperationType(type));
}
Length m_x;
@@ -90,6 +92,8 @@ private:
OperationType m_type;
};
+DEFINE_TRANSFORM_TYPE_CASTS(TranslateTransformOperation);
+
} // namespace blink
#endif // TranslateTransformOperation_h
« no previous file with comments | « Source/platform/transforms/TransformOperation.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698