Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Side by Side Diff: Source/core/animation/StringKeyframe.cpp

Issue 299073003: Web Animations API: Avoid style resolution when calling element.animate() (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename test to api-balls-keyframe-animations.html Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« Source/core/animation/EffectInput.cpp ('K') | « Source/core/animation/EffectInput.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698