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/css/CSSAnimations.h" | 8 #include "core/animation/css/CSSAnimations.h" |
9 #include "core/animation/interpolation/DefaultStyleInterpolation.h" | 9 #include "core/animation/interpolation/DefaultStyleInterpolation.h" |
10 #include "core/animation/interpolation/LegacyStyleInterpolation.h" | 10 #include "core/animation/interpolation/LegacyStyleInterpolation.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 case CSSPropertyMarginTop: | 103 case CSSPropertyMarginTop: |
104 case CSSPropertyOutlineOffset: | 104 case CSSPropertyOutlineOffset: |
105 case CSSPropertyRight: | 105 case CSSPropertyRight: |
106 case CSSPropertyTop: | 106 case CSSPropertyTop: |
107 case CSSPropertyVerticalAlign: | 107 case CSSPropertyVerticalAlign: |
108 case CSSPropertyWordSpacing: | 108 case CSSPropertyWordSpacing: |
109 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl
eInterpolation::canCreateFrom(*toCSSValue)) | 109 if (LengthStyleInterpolation::canCreateFrom(*fromCSSValue) && LengthStyl
eInterpolation::canCreateFrom(*toCSSValue)) |
110 return LengthStyleInterpolation::create(fromCSSValue, toCSSValue, pr
operty, range); | 110 return LengthStyleInterpolation::create(fromCSSValue, toCSSValue, pr
operty, range); |
111 break; | 111 break; |
112 default: | 112 default: |
| 113 element->document().updateRenderTreeIfNeeded(); |
113 break; | 114 break; |
114 } | 115 } |
115 | 116 |
116 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here
. | 117 // FIXME: Remove the use of AnimatableValues, RenderStyles and Elements here
. |
117 // FIXME: Remove this cache | 118 // FIXME: Remove this cache |
118 if (!m_animatableValueCache) | 119 if (!m_animatableValueCache) |
119 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(*e
lement, property, fromCSSValue); | 120 m_animatableValueCache = StyleResolver::createAnimatableValueSnapshot(*e
lement, property, fromCSSValue); |
120 | 121 |
121 RefPtrWillBeRawPtr<AnimatableValue> to = StyleResolver::createAnimatableValu
eSnapshot(*element, property, toCSSValue); | 122 RefPtrWillBeRawPtr<AnimatableValue> to = StyleResolver::createAnimatableValu
eSnapshot(*element, property, toCSSValue); |
122 toStringPropertySpecificKeyframe(end)->m_animatableValueCache = to; | 123 toStringPropertySpecificKeyframe(end)->m_animatableValueCache = to; |
(...skipping 14 matching lines...) Expand all Loading... |
137 } | 138 } |
138 | 139 |
139 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) | 140 void StringKeyframe::PropertySpecificKeyframe::trace(Visitor* visitor) |
140 { | 141 { |
141 visitor->trace(m_value); | 142 visitor->trace(m_value); |
142 visitor->trace(m_animatableValueCache); | 143 visitor->trace(m_animatableValueCache); |
143 Keyframe::PropertySpecificKeyframe::trace(visitor); | 144 Keyframe::PropertySpecificKeyframe::trace(visitor); |
144 } | 145 } |
145 | 146 |
146 } | 147 } |
OLD | NEW |