| 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/Interpolation.h" | 6 #include "core/animation/Interpolation.h" |
| 7 | 7 |
| 8 #include "core/css/resolver/AnimatedStyleBuilder.h" | 8 #include "core/css/resolver/AnimatedStyleBuilder.h" |
| 9 #include "core/css/resolver/StyleResolverState.h" | 9 #include "core/css/resolver/StyleResolverState.h" |
| 10 | 10 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 void Interpolation::interpolate(int iteration, double fraction) const | 48 void Interpolation::interpolate(int iteration, double fraction) const |
| 49 { | 49 { |
| 50 if (m_cachedFraction != fraction || m_cachedIteration != iteration) { | 50 if (m_cachedFraction != fraction || m_cachedIteration != iteration) { |
| 51 m_cachedValue = m_start->interpolate(*m_end, fraction); | 51 m_cachedValue = m_start->interpolate(*m_end, fraction); |
| 52 m_cachedIteration = iteration; | 52 m_cachedIteration = iteration; |
| 53 m_cachedFraction = fraction; | 53 m_cachedFraction = fraction; |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 void StyleInterpolation::trace(Visitor* visitor) |
| 58 { |
| 59 Interpolation::trace(visitor); |
| 60 } |
| 61 |
| 57 void LegacyStyleInterpolation::apply(StyleResolverState& state) const | 62 void LegacyStyleInterpolation::apply(StyleResolverState& state) const |
| 58 { | 63 { |
| 59 AnimatableValue* value = currentValue(); | 64 AnimatableValue* value = currentValue(); |
| 60 AnimatedStyleBuilder::applyProperty(m_id, state, value); | 65 AnimatedStyleBuilder::applyProperty(m_id, state, value); |
| 61 } | 66 } |
| 62 | 67 |
| 68 void LegacyStyleInterpolation::trace(Visitor* visitor) |
| 69 { |
| 70 StyleInterpolation::trace(visitor); |
| 63 } | 71 } |
| 72 |
| 73 } |
| OLD | NEW |