| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef InterpolableValue_h | 5 #ifndef InterpolableValue_h |
| 6 #define InterpolableValue_h | 6 #define InterpolableValue_h |
| 7 | 7 |
| 8 #include "core/animation/animatable/AnimatableValue.h" | 8 #include "core/animation/animatable/AnimatableValue.h" |
| 9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
| 10 #include "wtf/OwnPtr.h" | 10 #include "wtf/OwnPtr.h" |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 | 130 |
| 131 InterpolableList(const InterpolableList& other) | 131 InterpolableList(const InterpolableList& other) |
| 132 : m_size(other.m_size) | 132 : m_size(other.m_size) |
| 133 , m_values(m_size) | 133 , m_values(m_size) |
| 134 { | 134 { |
| 135 for (size_t i = 0; i < m_size; i++) | 135 for (size_t i = 0; i < m_size; i++) |
| 136 set(i, other.m_values[i]->clone()); | 136 set(i, other.m_values[i]->clone()); |
| 137 } | 137 } |
| 138 | 138 |
| 139 size_t m_size; | 139 size_t m_size; |
| 140 WillBeHeapVector<OwnPtrWillBeMember<InterpolableValue> > m_values; | 140 WillBeHeapVector<OwnPtrWillBeMember<InterpolableValue>> m_values; |
| 141 }; | 141 }; |
| 142 | 142 |
| 143 // FIXME: Remove this when we can. | 143 // FIXME: Remove this when we can. |
| 144 class InterpolableAnimatableValue : public InterpolableValue { | 144 class InterpolableAnimatableValue : public InterpolableValue { |
| 145 public: | 145 public: |
| 146 static PassOwnPtrWillBeRawPtr<InterpolableAnimatableValue> create(PassRefPtr
WillBeRawPtr<AnimatableValue> value) | 146 static PassOwnPtrWillBeRawPtr<InterpolableAnimatableValue> create(PassRefPtr
WillBeRawPtr<AnimatableValue> value) |
| 147 { | 147 { |
| 148 return adoptPtrWillBeNoop(new InterpolableAnimatableValue(value)); | 148 return adoptPtrWillBeNoop(new InterpolableAnimatableValue(value)); |
| 149 } | 149 } |
| 150 | 150 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 167 }; | 167 }; |
| 168 | 168 |
| 169 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); | 169 DEFINE_TYPE_CASTS(InterpolableNumber, InterpolableValue, value, value->isNumber(
), value.isNumber()); |
| 170 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); | 170 DEFINE_TYPE_CASTS(InterpolableBool, InterpolableValue, value, value->isBool(), v
alue.isBool()); |
| 171 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); | 171 DEFINE_TYPE_CASTS(InterpolableList, InterpolableValue, value, value->isList(), v
alue.isList()); |
| 172 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); | 172 DEFINE_TYPE_CASTS(InterpolableAnimatableValue, InterpolableValue, value, value->
isAnimatableValue(), value.isAnimatableValue()); |
| 173 | 173 |
| 174 } | 174 } |
| 175 | 175 |
| 176 #endif | 176 #endif |
| OLD | NEW |