OLD | NEW |
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/CSSImageInterpolationType.h" | 5 #include "core/animation/CSSImageInterpolationType.h" |
6 | 6 |
7 #include "core/animation/ImagePropertyFunctions.h" | 7 #include "core/animation/ImagePropertyFunctions.h" |
8 #include "core/css/CSSCrossfadeValue.h" | 8 #include "core/css/CSSCrossfadeValue.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/resolver/StyleResolverState.h" | 10 #include "core/css/resolver/StyleResolverState.h" |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
189 return maybeConvertStyleImage(inheritedImage, true); | 189 return maybeConvertStyleImage(inheritedImage, true); |
190 } | 190 } |
191 | 191 |
192 InterpolationValue CSSImageInterpolationType::maybeConvertValue(const CSSValue&
value, const StyleResolverState&, ConversionCheckers&) const | 192 InterpolationValue CSSImageInterpolationType::maybeConvertValue(const CSSValue&
value, const StyleResolverState&, ConversionCheckers&) const |
193 { | 193 { |
194 return maybeConvertCSSValue(value, true); | 194 return maybeConvertCSSValue(value, true); |
195 } | 195 } |
196 | 196 |
197 InterpolationValue CSSImageInterpolationType::maybeConvertUnderlyingValue(const
InterpolationEnvironment& environment) const | 197 InterpolationValue CSSImageInterpolationType::maybeConvertUnderlyingValue(const
InterpolationEnvironment& environment) const |
198 { | 198 { |
199 return maybeConvertStyleImage(ImagePropertyFunctions::getStyleImage(cssPrope
rty(), *environment.state().style()), true); | 199 return maybeConvertStyleImage(ImagePropertyFunctions::getStyleImage(cssPrope
rty(), environment.style()), true); |
200 } | 200 } |
201 | 201 |
202 void CSSImageInterpolationType::composite(UnderlyingValueOwner& underlyingValueO
wner, double underlyingFraction, const InterpolationValue& value, double interpo
lationFraction) const | 202 void CSSImageInterpolationType::composite(UnderlyingValueOwner& underlyingValueO
wner, double underlyingFraction, const InterpolationValue& value, double interpo
lationFraction) const |
203 { | 203 { |
204 underlyingValueOwner.set(*this, value); | 204 underlyingValueOwner.set(*this, value); |
205 } | 205 } |
206 | 206 |
207 void CSSImageInterpolationType::apply(const InterpolableValue& interpolableValue
, const NonInterpolableValue* nonInterpolableValue, InterpolationEnvironment& en
vironment) const | 207 void CSSImageInterpolationType::apply(const InterpolableValue& interpolableValue
, const NonInterpolableValue* nonInterpolableValue, InterpolationEnvironment& en
vironment) const |
208 { | 208 { |
209 ImagePropertyFunctions::setStyleImage(cssProperty(), *environment.state().st
yle(), resolveStyleImage(cssProperty(), interpolableValue, nonInterpolableValue,
environment.state())); | 209 ImagePropertyFunctions::setStyleImage(cssProperty(), environment.style(), re
solveStyleImage(cssProperty(), interpolableValue, nonInterpolableValue, environm
ent.state())); |
210 } | 210 } |
211 | 211 |
212 } // namespace blink | 212 } // namespace blink |
OLD | NEW |