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 #include "config.h" | 5 #include "config.h" |
6 #include "core/animation/InterpolationEffect.h" | 6 #include "core/animation/InterpolationEffect.h" |
7 | 7 |
8 namespace blink { | 8 namespace blink { |
9 | 9 |
10 void InterpolationEffect::getActiveInterpolations(double fraction, double iterat
ionDuration, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolatio
n>>>& result) const | 10 void InterpolationEffect::getActiveInterpolations(double fraction, double iterat
ionDuration, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolatio
n>>>& result) const |
(...skipping 14 matching lines...) Expand all Loading... |
25 if (resultIndex < existingSize) | 25 if (resultIndex < existingSize) |
26 (*result)[resultIndex++] = interpolation; | 26 (*result)[resultIndex++] = interpolation; |
27 else | 27 else |
28 result->append(interpolation); | 28 result->append(interpolation); |
29 } | 29 } |
30 } | 30 } |
31 if (resultIndex < existingSize) | 31 if (resultIndex < existingSize) |
32 result->shrink(resultIndex); | 32 result->shrink(resultIndex); |
33 } | 33 } |
34 | 34 |
35 void InterpolationEffect::addInterpolationsFromKeyframes(CSSPropertyID property,
Element* element, const LayoutStyle* baseStyle, Keyframe::PropertySpecificKeyfr
ame& keyframeA, Keyframe::PropertySpecificKeyframe& keyframeB, double applyFrom,
double applyTo) | 35 void InterpolationEffect::addInterpolationsFromKeyframes(CSSPropertyID property,
Element* element, const ComputedStyle* baseStyle, Keyframe::PropertySpecificKey
frame& keyframeA, Keyframe::PropertySpecificKeyframe& keyframeB, double applyFro
m, double applyTo) |
36 { | 36 { |
37 RefPtrWillBeRawPtr<Interpolation> interpolation = keyframeA.maybeCreateInter
polation(property, keyframeB, element, baseStyle); | 37 RefPtrWillBeRawPtr<Interpolation> interpolation = keyframeA.maybeCreateInter
polation(property, keyframeB, element, baseStyle); |
38 | 38 |
39 if (interpolation) { | 39 if (interpolation) { |
40 addInterpolation(interpolation, &keyframeA.easing(), keyframeA.offset(),
keyframeB.offset(), applyFrom, applyTo); | 40 addInterpolation(interpolation, &keyframeA.easing(), keyframeA.offset(),
keyframeB.offset(), applyFrom, applyTo); |
41 } else { | 41 } else { |
42 RefPtrWillBeRawPtr<Interpolation> interpolationA = keyframeA.maybeCreate
Interpolation(property, keyframeA, element, baseStyle); | 42 RefPtrWillBeRawPtr<Interpolation> interpolationA = keyframeA.maybeCreate
Interpolation(property, keyframeA, element, baseStyle); |
43 RefPtrWillBeRawPtr<Interpolation> interpolationB = keyframeB.maybeCreate
Interpolation(property, keyframeB, element, baseStyle); | 43 RefPtrWillBeRawPtr<Interpolation> interpolationB = keyframeB.maybeCreate
Interpolation(property, keyframeB, element, baseStyle); |
44 | 44 |
45 ASSERT(interpolationA); | 45 ASSERT(interpolationA); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 { | 77 { |
78 visitor->trace(m_interpolation); | 78 visitor->trace(m_interpolation); |
79 } | 79 } |
80 | 80 |
81 DEFINE_TRACE(InterpolationEffect) | 81 DEFINE_TRACE(InterpolationEffect) |
82 { | 82 { |
83 visitor->trace(m_interpolations); | 83 visitor->trace(m_interpolations); |
84 } | 84 } |
85 | 85 |
86 } // namespace blink | 86 } // namespace blink |
OLD | NEW |