| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 } | 55 } |
| 56 bool Equals(const AnimatableValue& value) const { return Equals(&value); } | 56 bool Equals(const AnimatableValue& value) const { return Equals(&value); } |
| 57 | 57 |
| 58 bool IsClipPathOperation() const { | 58 bool IsClipPathOperation() const { |
| 59 return GetType() == kTypeClipPathOperation; | 59 return GetType() == kTypeClipPathOperation; |
| 60 } | 60 } |
| 61 bool IsColor() const { return GetType() == kTypeColor; } | 61 bool IsColor() const { return GetType() == kTypeColor; } |
| 62 bool IsDouble() const { return GetType() == kTypeDouble; } | 62 bool IsDouble() const { return GetType() == kTypeDouble; } |
| 63 bool IsDoubleAndBool() const { return GetType() == kTypeDoubleAndBool; } | 63 bool IsDoubleAndBool() const { return GetType() == kTypeDoubleAndBool; } |
| 64 bool IsFilterOperations() const { return GetType() == kTypeFilterOperations; } | 64 bool IsFilterOperations() const { return GetType() == kTypeFilterOperations; } |
| 65 bool IsFontVariationSettings() const { |
| 66 return GetType() == kTypeFontVariationSettings; |
| 67 } |
| 65 bool IsImage() const { return GetType() == kTypeImage; } | 68 bool IsImage() const { return GetType() == kTypeImage; } |
| 66 bool IsLength() const { return GetType() == kTypeLength; } | 69 bool IsLength() const { return GetType() == kTypeLength; } |
| 67 bool IsLengthBox() const { return GetType() == kTypeLengthBox; } | 70 bool IsLengthBox() const { return GetType() == kTypeLengthBox; } |
| 68 bool IsLengthBoxAndBool() const { return GetType() == kTypeLengthBoxAndBool; } | 71 bool IsLengthBoxAndBool() const { return GetType() == kTypeLengthBoxAndBool; } |
| 69 bool IsLengthPoint() const { return GetType() == kTypeLengthPoint; } | 72 bool IsLengthPoint() const { return GetType() == kTypeLengthPoint; } |
| 70 bool IsLengthPoint3D() const { return GetType() == kTypeLengthPoint3D; } | 73 bool IsLengthPoint3D() const { return GetType() == kTypeLengthPoint3D; } |
| 71 bool IsLengthSize() const { return GetType() == kTypeLengthSize; } | 74 bool IsLengthSize() const { return GetType() == kTypeLengthSize; } |
| 72 bool IsPath() const { return GetType() == kTypePath; } | 75 bool IsPath() const { return GetType() == kTypePath; } |
| 73 bool IsRepeatable() const { return GetType() == kTypeRepeatable; } | 76 bool IsRepeatable() const { return GetType() == kTypeRepeatable; } |
| 74 bool IsSVGLength() const { return GetType() == kTypeSVGLength; } | 77 bool IsSVGLength() const { return GetType() == kTypeSVGLength; } |
| (...skipping 12 matching lines...) Expand all Loading... |
| 87 return value->GetType() == GetType(); | 90 return value->GetType() == GetType(); |
| 88 } | 91 } |
| 89 | 92 |
| 90 protected: | 93 protected: |
| 91 enum AnimatableType { | 94 enum AnimatableType { |
| 92 kTypeClipPathOperation, | 95 kTypeClipPathOperation, |
| 93 kTypeColor, | 96 kTypeColor, |
| 94 kTypeDouble, | 97 kTypeDouble, |
| 95 kTypeDoubleAndBool, | 98 kTypeDoubleAndBool, |
| 96 kTypeFilterOperations, | 99 kTypeFilterOperations, |
| 100 kTypeFontVariationSettings, |
| 97 kTypeImage, | 101 kTypeImage, |
| 98 kTypeLength, | 102 kTypeLength, |
| 99 kTypeLengthBox, | 103 kTypeLengthBox, |
| 100 kTypeLengthBoxAndBool, | 104 kTypeLengthBoxAndBool, |
| 101 kTypeLengthPoint, | 105 kTypeLengthPoint, |
| 102 kTypeLengthPoint3D, | 106 kTypeLengthPoint3D, |
| 103 kTypeLengthSize, | 107 kTypeLengthSize, |
| 104 kTypePath, | 108 kTypePath, |
| 105 kTypeRepeatable, | 109 kTypeRepeatable, |
| 106 kTypeSVGLength, | 110 kTypeSVGLength, |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 friend class KeyframeEffectModel; | 149 friend class KeyframeEffectModel; |
| 146 }; | 150 }; |
| 147 | 151 |
| 148 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ | 152 #define DEFINE_ANIMATABLE_VALUE_TYPE_CASTS(thisType, predicate) \ |
| 149 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, \ | 153 DEFINE_TYPE_CASTS(thisType, AnimatableValue, value, value->predicate, \ |
| 150 value.predicate) | 154 value.predicate) |
| 151 | 155 |
| 152 } // namespace blink | 156 } // namespace blink |
| 153 | 157 |
| 154 #endif // AnimatableValue_h | 158 #endif // AnimatableValue_h |
| OLD | NEW |