Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: Source/core/animation/InterpolationEffect.cpp

Issue 1033943002: Rename LayoutStyle to papayawhip (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ensureComputedStyle Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/Keyframe.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/core/animation/InterpolationEffect.h ('k') | Source/core/animation/Keyframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698