Index: Source/platform/transforms/TransformOperation.h |
diff --git a/Source/platform/transforms/TransformOperation.h b/Source/platform/transforms/TransformOperation.h |
index b131f3ae5811df844eeaa1fc1c3b6cc3a2b3a2cd..7d1af06745af5c0cc4a65badd8bc6a8a8db71b57 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 isRotate() const |
+ { |
+ return type() == Rotate |
+ || type() == RotateX |
+ || type() == RotateY |
+ || type() == RotateZ |
+ || type() == Rotate3D; |
+ } |
+ |
+ bool isScale() const |
+ { |
+ return type() == Scale |
+ || type() == ScaleX |
+ || type() == ScaleY |
+ || type() == ScaleZ |
+ || type() == Scale3D; |
+ } |
+ |
+ bool isTranslate() const |
+ { |
+ return type() == Translate |
+ || type() == TranslateX |
+ || type() == TranslateY |
+ || type() == TranslateZ |
+ || type() == Translate3D; |
+ } |
alancutter (OOO until 2018)
2015/06/24 01:17:09
Make these virtual and define them in the subclass
soonm
2015/06/24 02:53:19
Done.
|
+ |
}; |
+#define DEFINE_TRANSFORM_TYPE_CASTS(thisType, predicate) \ |
+ DEFINE_TYPE_CASTS(thisType, TransformOperation, transform, transform->predicate, transform.predicate) |
+ |
} // namespace blink |
#endif // TransformOperation_h |