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

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

Issue 1158603003: CSS Independent Transform Properties (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Remove animation from CL 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/TransformOperation.h
diff --git a/Source/platform/transforms/TransformOperation.h b/Source/platform/transforms/TransformOperation.h
index b131f3ae5811df844eeaa1fc1c3b6cc3a2b3a2cd..0be0578d115fd7195fe798a02df98285875209d7 100644
--- a/Source/platform/transforms/TransformOperation.h
+++ b/Source/platform/transforms/TransformOperation.h
@@ -81,8 +81,39 @@ public:
}
virtual bool dependsOnBoxSize() const { return false; }
+
+ bool isRotateTransformOperation() const
dstockwell 2015/06/12 00:17:58 just isRotate, etc.
soonm 2015/06/12 01:54:13 Done - for all 3 predicates
Timothy Loh 2015/06/12 04:48:35 Are these even used in this patch though?
soonm 2015/06/12 06:18:49 Should not be in this patch. Reverted.
+ {
+ return type() == Rotate
+ || type() == RotateX
+ || type() == RotateY
+ || type() == RotateZ
+ || type() == Rotate3D;
+ }
+
+ bool isScaleTransformOperation() const
+ {
+ return type() == Scale
+ || type() == ScaleX
+ || type() == ScaleY
+ || type() == ScaleZ
+ || type() == Scale3D;
+ }
+
+ bool isTranslateTransformOperation() const
+ {
+ return type() == Translate
+ || type() == TranslateX
+ || type() == TranslateY
+ || type() == TranslateZ
+ || type() == Translate3D;
+ }
+
};
+#define DEFINE_TRANSFORM_TYPE_CASTS(thisType, predicate) \
+ DEFINE_TYPE_CASTS(thisType, TransformOperation, transform, transform->predicate, transform.predicate)
+
} // namespace blink
#endif // TransformOperation_h

Powered by Google App Engine
This is Rietveld 408576698