OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/CSSTransformInterpolationType.h" | 5 #include "core/animation/CSSTransformInterpolationType.h" |
6 | 6 |
7 #include "core/animation/LengthUnitsChecker.h" | 7 #include "core/animation/LengthUnitsChecker.h" |
8 #include "core/css/CSSFunctionValue.h" | 8 #include "core/css/CSSFunctionValue.h" |
9 #include "core/css/CSSPrimitiveValue.h" | 9 #include "core/css/CSSPrimitiveValue.h" |
10 #include "core/css/CSSValueList.h" | 10 #include "core/css/CSSValueList.h" |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 CSSTransformNonInterpolableValue& underlyingNonInterpolableValue = | 246 CSSTransformNonInterpolableValue& underlyingNonInterpolableValue = |
247 toCSSTransformNonInterpolableValue( | 247 toCSSTransformNonInterpolableValue( |
248 *underlyingValueOwner.value().nonInterpolableValue); | 248 *underlyingValueOwner.value().nonInterpolableValue); |
249 const CSSTransformNonInterpolableValue& nonInterpolableValue = | 249 const CSSTransformNonInterpolableValue& nonInterpolableValue = |
250 toCSSTransformNonInterpolableValue(*value.nonInterpolableValue); | 250 toCSSTransformNonInterpolableValue(*value.nonInterpolableValue); |
251 double progress = toInterpolableNumber(*value.interpolableValue).value(); | 251 double progress = toInterpolableNumber(*value.interpolableValue).value(); |
252 underlyingValueOwner.mutableValue().nonInterpolableValue = | 252 underlyingValueOwner.mutableValue().nonInterpolableValue = |
253 underlyingNonInterpolableValue.composite(nonInterpolableValue, progress); | 253 underlyingNonInterpolableValue.composite(nonInterpolableValue, progress); |
254 } | 254 } |
255 | 255 |
256 void CSSTransformInterpolationType::apply( | 256 void CSSTransformInterpolationType::applyStandardPropertyValue( |
257 const InterpolableValue& interpolableValue, | 257 const InterpolableValue& interpolableValue, |
258 const NonInterpolableValue* untypedNonInterpolableValue, | 258 const NonInterpolableValue* untypedNonInterpolableValue, |
259 InterpolationEnvironment& environment) const { | 259 StyleResolverState& state) const { |
260 double progress = toInterpolableNumber(interpolableValue).value(); | 260 double progress = toInterpolableNumber(interpolableValue).value(); |
261 const CSSTransformNonInterpolableValue& nonInterpolableValue = | 261 const CSSTransformNonInterpolableValue& nonInterpolableValue = |
262 toCSSTransformNonInterpolableValue(*untypedNonInterpolableValue); | 262 toCSSTransformNonInterpolableValue(*untypedNonInterpolableValue); |
263 environment.state().style()->setTransform( | 263 state.style()->setTransform( |
264 nonInterpolableValue.getInterpolatedTransform(progress)); | 264 nonInterpolableValue.getInterpolatedTransform(progress)); |
265 } | 265 } |
266 | 266 |
267 } // namespace blink | 267 } // namespace blink |
OLD | NEW |