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

Side by Side Diff: Source/core/inspector/InspectorAnimationAgent.cpp

Issue 814083003: Update animation when changes in animation keyframes are detected. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase again Created 5 years, 11 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 6
7 #include "core/inspector/InspectorAnimationAgent.h" 7 #include "core/inspector/InspectorAnimationAgent.h"
8 8
9 #include "core/animation/Animation.h" 9 #include "core/animation/Animation.h"
10 #include "core/animation/AnimationEffect.h" 10 #include "core/animation/AnimationEffect.h"
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 static PassRefPtr<TypeBuilder::Animation::KeyframesRule> buildObjectForKeyframes Rule(const AnimationPlayer& player) 177 static PassRefPtr<TypeBuilder::Animation::KeyframesRule> buildObjectForKeyframes Rule(const AnimationPlayer& player)
178 { 178 {
179 const Element* element = toAnimation(player.source())->target(); 179 const Element* element = toAnimation(player.source())->target();
180 StyleResolver& styleResolver = element->ownerDocument()->ensureStyleResolver (); 180 StyleResolver& styleResolver = element->ownerDocument()->ensureStyleResolver ();
181 CSSAnimations& cssAnimations = element->activeAnimations()->cssAnimations(); 181 CSSAnimations& cssAnimations = element->activeAnimations()->cssAnimations();
182 const AtomicString animationName = cssAnimations.getAnimationNameForInspecto r(player); 182 const AtomicString animationName = cssAnimations.getAnimationNameForInspecto r(player);
183 RefPtr<TypeBuilder::Animation::KeyframesRule> keyframeRule; 183 RefPtr<TypeBuilder::Animation::KeyframesRule> keyframeRule;
184 184
185 if (!animationName.isNull()) { 185 if (!animationName.isNull()) {
186 // CSS Animations 186 // CSS Animations
187 const StyleRuleKeyframes* keyframes = styleResolver.findKeyframesRule(el ement, animationName); 187 const StyleRuleKeyframes* keyframes = styleResolver.findKeyframesRule(el ement, animationName).get();
188 keyframeRule = buildObjectForStyleRuleKeyframes(player, keyframes); 188 keyframeRule = buildObjectForStyleRuleKeyframes(player, keyframes);
189 } else { 189 } else {
190 // Web Animations 190 // Web Animations
191 keyframeRule = buildObjectForAnimationKeyframes(toAnimation(player.sourc e())); 191 keyframeRule = buildObjectForAnimationKeyframes(toAnimation(player.sourc e()));
192 } 192 }
193 193
194 return keyframeRule; 194 return keyframeRule;
195 } 195 }
196 196
197 PassRefPtr<TypeBuilder::Array<TypeBuilder::Animation::AnimationPlayer> > Inspect orAnimationAgent::buildArrayForAnimationPlayers(Element& element, const WillBeHe apVector<RefPtrWillBeMember<AnimationPlayer> > players) 197 PassRefPtr<TypeBuilder::Array<TypeBuilder::Animation::AnimationPlayer> > Inspect orAnimationAgent::buildArrayForAnimationPlayers(Element& element, const WillBeHe apVector<RefPtrWillBeMember<AnimationPlayer> > players)
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 { 304 {
305 #if ENABLE(OILPAN) 305 #if ENABLE(OILPAN)
306 visitor->trace(m_idToAnimationPlayer); 306 visitor->trace(m_idToAnimationPlayer);
307 visitor->trace(m_domAgent); 307 visitor->trace(m_domAgent);
308 visitor->trace(m_element); 308 visitor->trace(m_element);
309 #endif 309 #endif
310 InspectorBaseAgent::trace(visitor); 310 InspectorBaseAgent::trace(visitor);
311 } 311 }
312 312
313 } 313 }
OLDNEW
« Source/core/css/resolver/StyleResolver.h ('K') | « Source/core/css/resolver/StyleResolver.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698