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

Side by Side Diff: Source/core/animation/css/CSSAnimations.cpp

Issue 664993002: Devtools Animations: Display keyframes for CSS Animations in inspector (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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 /* 1 /*
2 * Copyright (C) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName)) 215 if (const StyleRuleKeyframes* keyframesRule = stack.at(i)->keyframeStyle sForAnimation(animationName))
216 return keyframesRule; 216 return keyframesRule;
217 } 217 }
218 return 0; 218 return 0;
219 } 219 }
220 220
221 CSSAnimations::CSSAnimations() 221 CSSAnimations::CSSAnimations()
222 { 222 {
223 } 223 }
224 224
225 const AtomicString* CSSAnimations::getAnimationNameForInspector(const AnimationP layer& player)
226 {
227 for (const auto& it : m_animations) {
228 if (it.value->sequenceNumber() == player.sequenceNumber())
229 return &(it.key);
230 }
231 return 0;
232 }
233
225 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* animatingElement, Element& element, const RenderStyle& style, RenderSty le* parentStyle, StyleResolver* resolver) 234 PassOwnPtrWillBeRawPtr<CSSAnimationUpdate> CSSAnimations::calculateUpdate(const Element* animatingElement, Element& element, const RenderStyle& style, RenderSty le* parentStyle, StyleResolver* resolver)
226 { 235 {
227 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAn imationUpdate()); 236 OwnPtrWillBeRawPtr<CSSAnimationUpdate> update = adoptPtrWillBeNoop(new CSSAn imationUpdate());
228 calculateAnimationUpdate(update.get(), animatingElement, element, style, par entStyle, resolver); 237 calculateAnimationUpdate(update.get(), animatingElement, element, style, par entStyle, resolver);
229 calculateAnimationActiveInterpolations(update.get(), animatingElement, eleme nt.document().timeline().currentTimeInternal()); 238 calculateAnimationActiveInterpolations(update.get(), animatingElement, eleme nt.document().timeline().currentTimeInternal());
230 calculateTransitionUpdate(update.get(), animatingElement, style); 239 calculateTransitionUpdate(update.get(), animatingElement, style);
231 calculateTransitionActiveInterpolations(update.get(), animatingElement, elem ent.document().timeline().currentTimeInternal()); 240 calculateTransitionActiveInterpolations(update.get(), animatingElement, elem ent.document().timeline().currentTimeInternal());
232 return update->isEmpty() ? nullptr : update.release(); 241 return update->isEmpty() ? nullptr : update.release();
233 } 242 }
234 243
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
731 #if ENABLE(OILPAN) 740 #if ENABLE(OILPAN)
732 visitor->trace(m_newTransitions); 741 visitor->trace(m_newTransitions);
733 visitor->trace(m_activeInterpolationsForAnimations); 742 visitor->trace(m_activeInterpolationsForAnimations);
734 visitor->trace(m_activeInterpolationsForTransitions); 743 visitor->trace(m_activeInterpolationsForTransitions);
735 visitor->trace(m_newAnimations); 744 visitor->trace(m_newAnimations);
736 visitor->trace(m_cancelledAnimationPlayers); 745 visitor->trace(m_cancelledAnimationPlayers);
737 #endif 746 #endif
738 } 747 }
739 748
740 } // namespace blink 749 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698