| 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/StringKeyframe.h" | 6 #include "core/animation/StringKeyframe.h" |
| 7 | 7 |
| 8 #include "core/animation/AngleSVGInterpolation.h" | 8 #include "core/animation/AngleSVGInterpolation.h" |
| 9 #include "core/animation/ColorStyleInterpolation.h" | 9 #include "core/animation/ColorStyleInterpolation.h" |
| 10 #include "core/animation/CompositorAnimations.h" | 10 #include "core/animation/CompositorAnimations.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 | 110 |
| 111 StringKeyframe::CSSPropertySpecificKeyframe::CSSPropertySpecificKeyframe(double
offset, PassRefPtr<TimingFunction> easing, CSSValue* value) | 111 StringKeyframe::CSSPropertySpecificKeyframe::CSSPropertySpecificKeyframe(double
offset, PassRefPtr<TimingFunction> easing, CSSValue* value) |
| 112 : Keyframe::PropertySpecificKeyframe(offset, easing, EffectModel::CompositeR
eplace) | 112 : Keyframe::PropertySpecificKeyframe(offset, easing, EffectModel::CompositeR
eplace) |
| 113 , m_value(value) | 113 , m_value(value) |
| 114 { | 114 { |
| 115 ASSERT(!isNull(m_offset)); | 115 ASSERT(!isNull(m_offset)); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void StringKeyframe::CSSPropertySpecificKeyframe::populateAnimatableValue(CSSPro
pertyID property, Element& element, const ComputedStyle* baseStyle) const | 118 void StringKeyframe::CSSPropertySpecificKeyframe::populateAnimatableValue(CSSPro
pertyID property, Element& element, const ComputedStyle* baseStyle) const |
| 119 { | 119 { |
| 120 if (!m_animatableValueCache && (baseStyle || !m_value->isInheritedValue())) | 120 if (!m_animatableValueCache && (baseStyle || !DeferredLegacyStyleInterpolati
on::interpolationRequiresStyleResolve(*m_value))) |
| 121 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(el
ement, baseStyle, property, m_value.get()); | 121 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(el
ement, baseStyle, property, m_value.get()); |
| 122 } | 122 } |
| 123 | 123 |
| 124 namespace { | 124 namespace { |
| 125 InterpolationRange setRange(CSSPropertyID id) | 125 InterpolationRange setRange(CSSPropertyID id) |
| 126 { | 126 { |
| 127 switch (id) { | 127 switch (id) { |
| 128 case CSSPropertyOrphans: | 128 case CSSPropertyOrphans: |
| 129 case CSSPropertyWebkitColumnCount: | 129 case CSSPropertyWebkitColumnCount: |
| 130 case CSSPropertyWidows: | 130 case CSSPropertyWidows: |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); | 549 RefPtrWillBeRawPtr<SVGPropertyBase> fromValue = attribute->currentValueBase(
)->cloneForAnimation(m_value); |
| 550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); | 550 RefPtrWillBeRawPtr<SVGPropertyBase> toValue = attribute->currentValueBase()-
>cloneForAnimation(toSVGPropertySpecificKeyframe(end).value()); |
| 551 | 551 |
| 552 if (!fromValue || !toValue) | 552 if (!fromValue || !toValue) |
| 553 return nullptr; | 553 return nullptr; |
| 554 | 554 |
| 555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); | 555 return createSVGInterpolation(fromValue.get(), toValue.get(), attribute.get(
)); |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace blink | 558 } // namespace blink |
| OLD | NEW |