| 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/DeferredLegacyStyleInterpolation.h" | 6 #include "core/animation/DeferredLegacyStyleInterpolation.h" |
| 7 | 7 |
| 8 #include "core/animation/ElementAnimations.h" | 8 #include "core/animation/ElementAnimations.h" |
| 9 #include "core/animation/css/CSSAnimatableValueFactory.h" | 9 #include "core/animation/css/CSSAnimatableValueFactory.h" |
| 10 #include "core/css/CSSImageValue.h" | 10 #include "core/css/CSSImageValue.h" |
| 11 #include "core/css/CSSPrimitiveValue.h" | 11 #include "core/css/CSSPrimitiveValue.h" |
| 12 #include "core/css/CSSSVGDocumentValue.h" | 12 #include "core/css/CSSSVGDocumentValue.h" |
| 13 #include "core/css/CSSShadowValue.h" | 13 #include "core/css/CSSShadowValue.h" |
| 14 #include "core/css/CSSValueList.h" | 14 #include "core/css/CSSValueList.h" |
| 15 #include "core/css/Pair.h" | 15 #include "core/css/Pair.h" |
| 16 #include "core/css/Rect.h" | 16 #include "core/css/Rect.h" |
| 17 #include "core/css/resolver/StyleResolver.h" | 17 #include "core/css/resolver/StyleResolver.h" |
| 18 #include "core/css/resolver/StyleResolverState.h" | 18 #include "core/css/resolver/StyleResolverState.h" |
| 19 | 19 |
| 20 namespace blink { | 20 namespace blink { |
| 21 | 21 |
| 22 void DeferredLegacyStyleInterpolation::apply(StyleResolverState& state) const | 22 void DeferredLegacyStyleInterpolation::apply(StyleResolverState& state) const |
| 23 { | 23 { |
| 24 if (m_outdated || !state.element()->elementAnimations() || !state.element()-
>elementAnimations()->isAnimationStyleChange()) { | 24 if (m_outdated || !state.element()->elementAnimations() || !state.element()-
>elementAnimations()->isAnimationStyleChange()) { |
| 25 RefPtrWillBeRawPtr<AnimatableValue> startAnimatableValue; | 25 AnimatableValue* startAnimatableValue; |
| 26 RefPtrWillBeRawPtr<AnimatableValue> endAnimatableValue; | 26 AnimatableValue* endAnimatableValue; |
| 27 | 27 |
| 28 // Snapshot underlying values for neutral keyframes first because non-ne
utral keyframes will mutate the StyleResolverState. | 28 // Snapshot underlying values for neutral keyframes first because non-ne
utral keyframes will mutate the StyleResolverState. |
| 29 if (!m_endCSSValue) { | 29 if (!m_endCSSValue) { |
| 30 endAnimatableValue = StyleResolver::createAnimatableValueSnapshot(st
ate, m_id, m_endCSSValue.get()); | 30 endAnimatableValue = StyleResolver::createAnimatableValueSnapshot(st
ate, m_id, m_endCSSValue.get()); |
| 31 startAnimatableValue = StyleResolver::createAnimatableValueSnapshot(
state, m_id, m_startCSSValue.get()); | 31 startAnimatableValue = StyleResolver::createAnimatableValueSnapshot(
state, m_id, m_startCSSValue.get()); |
| 32 } else { | 32 } else { |
| 33 startAnimatableValue = StyleResolver::createAnimatableValueSnapshot(
state, m_id, m_startCSSValue.get()); | 33 startAnimatableValue = StyleResolver::createAnimatableValueSnapshot(
state, m_id, m_startCSSValue.get()); |
| 34 endAnimatableValue = StyleResolver::createAnimatableValueSnapshot(st
ate, m_id, m_endCSSValue.get()); | 34 endAnimatableValue = StyleResolver::createAnimatableValueSnapshot(st
ate, m_id, m_endCSSValue.get()); |
| 35 } | 35 } |
| 36 | 36 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 | 150 |
| 151 DEFINE_TRACE(DeferredLegacyStyleInterpolation) | 151 DEFINE_TRACE(DeferredLegacyStyleInterpolation) |
| 152 { | 152 { |
| 153 visitor->trace(m_startCSSValue); | 153 visitor->trace(m_startCSSValue); |
| 154 visitor->trace(m_endCSSValue); | 154 visitor->trace(m_endCSSValue); |
| 155 visitor->trace(m_innerInterpolation); | 155 visitor->trace(m_innerInterpolation); |
| 156 StyleInterpolation::trace(visitor); | 156 StyleInterpolation::trace(visitor); |
| 157 } | 157 } |
| 158 | 158 |
| 159 } | 159 } |
| OLD | NEW |