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

Side by Side Diff: third_party/WebKit/Source/core/animation/InvalidatableInterpolation.cpp

Issue 1701813002: Make Keyframe::PropertySpecificKeyframes RefCounted (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: InvalidatableInterpolation RefPtrs Created 4 years, 10 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "core/animation/InvalidatableInterpolation.h" 5 #include "core/animation/InvalidatableInterpolation.h"
6 6
7 #include "core/animation/InterpolationEnvironment.h" 7 #include "core/animation/InterpolationEnvironment.h"
8 #include "core/animation/StringKeyframe.h" 8 #include "core/animation/StringKeyframe.h"
9 #include "core/css/resolver/StyleResolverState.h" 9 #include "core/css/resolver/StyleResolverState.h"
10 10
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 m_isCached = true; 139 m_isCached = true;
140 return m_cachedValue.get(); 140 return m_cachedValue.get();
141 } 141 }
142 142
143 void InvalidatableInterpolation::setFlagIfInheritUsed(InterpolationEnvironment& environment) const 143 void InvalidatableInterpolation::setFlagIfInheritUsed(InterpolationEnvironment& environment) const
144 { 144 {
145 if (!m_property.isCSSProperty() && !m_property.isPresentationAttribute()) 145 if (!m_property.isCSSProperty() && !m_property.isPresentationAttribute())
146 return; 146 return;
147 if (!environment.state().parentStyle()) 147 if (!environment.state().parentStyle())
148 return; 148 return;
149 const CSSValue* startValue = toCSSPropertySpecificKeyframe(m_startKeyframe)- >value(); 149 const CSSValue* startValue = toCSSPropertySpecificKeyframe(*m_startKeyframe) .value();
150 const CSSValue* endValue = toCSSPropertySpecificKeyframe(m_endKeyframe)->val ue(); 150 const CSSValue* endValue = toCSSPropertySpecificKeyframe(*m_endKeyframe).val ue();
151 if ((startValue && startValue->isInheritedValue()) 151 if ((startValue && startValue->isInheritedValue())
152 || (endValue && endValue->isInheritedValue())) { 152 || (endValue && endValue->isInheritedValue())) {
153 environment.state().parentStyle()->setHasExplicitlyInheritedProperties() ; 153 environment.state().parentStyle()->setHasExplicitlyInheritedProperties() ;
154 } 154 }
155 } 155 }
156 156
157 double InvalidatableInterpolation::underlyingFraction() const 157 double InvalidatableInterpolation::underlyingFraction() const
158 { 158 {
159 if (m_currentFraction == 0) 159 if (m_currentFraction == 0)
160 return m_startKeyframe->underlyingFraction(); 160 return m_startKeyframe->underlyingFraction();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 underlyingValueOwner.set(currentValue); 202 underlyingValueOwner.set(currentValue);
203 else 203 else
204 currentValue->type().composite(underlyingValueOwner, underlyingFract ion, currentValue->value()); 204 currentValue->type().composite(underlyingValueOwner, underlyingFract ion, currentValue->value());
205 } 205 }
206 206
207 if (shouldApply && underlyingValueOwner) 207 if (shouldApply && underlyingValueOwner)
208 underlyingValueOwner.type().apply(*underlyingValueOwner.value().interpol ableValue, underlyingValueOwner.value().nonInterpolableValue.get(), environment) ; 208 underlyingValueOwner.type().apply(*underlyingValueOwner.value().interpol ableValue, underlyingValueOwner.value().nonInterpolableValue.get(), environment) ;
209 } 209 }
210 210
211 } // namespace blink 211 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698