| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 | 62 |
| 63 bool isClipPathOperation() const { return type() == TypeClipPathOperation; } | 63 bool isClipPathOperation() const { return type() == TypeClipPathOperation; } |
| 64 bool isColor() const { return type() == TypeColor; } | 64 bool isColor() const { return type() == TypeColor; } |
| 65 bool isDouble() const { return type() == TypeDouble; } | 65 bool isDouble() const { return type() == TypeDouble; } |
| 66 bool isFilterOperations() const { return type() == TypeFilterOperations; } | 66 bool isFilterOperations() const { return type() == TypeFilterOperations; } |
| 67 bool isImage() const { return type() == TypeImage; } | 67 bool isImage() const { return type() == TypeImage; } |
| 68 bool isLength() const { return type() == TypeLength; } | 68 bool isLength() const { return type() == TypeLength; } |
| 69 bool isLengthBox() const { return type() == TypeLengthBox; } | 69 bool isLengthBox() const { return type() == TypeLengthBox; } |
| 70 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; } | 70 bool isLengthBoxAndBool() const { return type() == TypeLengthBoxAndBool; } |
| 71 bool isLengthPoint() const { return type() == TypeLengthPoint; } | 71 bool isLengthPoint() const { return type() == TypeLengthPoint; } |
| 72 bool isLengthPoint3D() const { return type() == TypeLengthPoint3D; } |
| 72 bool isLengthSize() const { return type() == TypeLengthSize; } | 73 bool isLengthSize() const { return type() == TypeLengthSize; } |
| 73 bool isNeutral() const { return type() == TypeNeutral; } | 74 bool isNeutral() const { return type() == TypeNeutral; } |
| 74 bool isRepeatable() const { return type() == TypeRepeatable; } | 75 bool isRepeatable() const { return type() == TypeRepeatable; } |
| 75 bool isSVGLength() const { return type() == TypeSVGLength; } | 76 bool isSVGLength() const { return type() == TypeSVGLength; } |
| 76 bool isSVGPaint() const { return type() == TypeSVGPaint; } | 77 bool isSVGPaint() const { return type() == TypeSVGPaint; } |
| 77 bool isShadow() const { return type() == TypeShadow; } | 78 bool isShadow() const { return type() == TypeShadow; } |
| 78 bool isShapeValue() const { return type() == TypeShapeValue; } | 79 bool isShapeValue() const { return type() == TypeShapeValue; } |
| 79 bool isStrokeDasharrayList() const { return type() == TypeStrokeDasharrayLis
t; } | 80 bool isStrokeDasharrayList() const { return type() == TypeStrokeDasharrayLis
t; } |
| 80 bool isTransform() const { return type() == TypeTransform; } | 81 bool isTransform() const { return type() == TypeTransform; } |
| 81 bool isUnknown() const { return type() == TypeUnknown; } | 82 bool isUnknown() const { return type() == TypeUnknown; } |
| 82 bool isVisibility() const { return type() == TypeVisibility; } | 83 bool isVisibility() const { return type() == TypeVisibility; } |
| 83 | 84 |
| 84 bool isSameType(const AnimatableValue* value) const | 85 bool isSameType(const AnimatableValue* value) const |
| 85 { | 86 { |
| 86 ASSERT(value); | 87 ASSERT(value); |
| 87 return value->type() == type(); | 88 return value->type() == type(); |
| 88 } | 89 } |
| 89 | 90 |
| 90 protected: | 91 protected: |
| 91 enum AnimatableType { | 92 enum AnimatableType { |
| 92 TypeClipPathOperation, | 93 TypeClipPathOperation, |
| 93 TypeColor, | 94 TypeColor, |
| 94 TypeDouble, | 95 TypeDouble, |
| 95 TypeFilterOperations, | 96 TypeFilterOperations, |
| 96 TypeImage, | 97 TypeImage, |
| 97 TypeLength, | 98 TypeLength, |
| 98 TypeLengthBox, | 99 TypeLengthBox, |
| 99 TypeLengthBoxAndBool, | 100 TypeLengthBoxAndBool, |
| 100 TypeLengthPoint, | 101 TypeLengthPoint, |
| 102 TypeLengthPoint3D, |
| 101 TypeLengthSize, | 103 TypeLengthSize, |
| 102 TypeNeutral, | 104 TypeNeutral, |
| 103 TypeRepeatable, | 105 TypeRepeatable, |
| 104 TypeSVGLength, | 106 TypeSVGLength, |
| 105 TypeSVGPaint, | 107 TypeSVGPaint, |
| 106 TypeShadow, | 108 TypeShadow, |
| 107 TypeShapeValue, | 109 TypeShapeValue, |
| 108 TypeStrokeDasharrayList, | 110 TypeStrokeDasharrayList, |
| 109 TypeTransform, | 111 TypeTransform, |
| 110 TypeUnknown, | 112 TypeUnknown, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 133 | 135 |
| 134 friend class KeyframeEffectModel; | 136 friend class KeyframeEffectModel; |
| 135 }; | 137 }; |
| 136 | 138 |
| 137 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ | 139 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 138 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value.
predicate) | 140 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, value.
predicate) |
| 139 | 141 |
| 140 } // namespace WebCore | 142 } // namespace WebCore |
| 141 | 143 |
| 142 #endif // AnimatableValue_h | 144 #endif // AnimatableValue_h |
| OLD | NEW |