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

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: 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/TranslateTransformOperation.h
diff --git a/Source/platform/transforms/TranslateTransformOperation.h b/Source/platform/transforms/TranslateTransformOperation.h
index 6ceac11668eb03a4235145d6e221359d410b0bac..eca8be65b38921515c03d573ea426dc2d111ccaa 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());
}
+ virtual bool isMatchingOperationType() const override { 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());
}
Length m_x;
@@ -90,6 +92,8 @@ private:
OperationType m_type;
};
+DEFINE_TRANSFORM_TYPE_CASTS(TranslateTransformOperation, isMatchingOperationType());
+
} // namespace blink
#endif // TranslateTransformOperation_h

Powered by Google App Engine
This is Rietveld 408576698