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

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

Issue 1311683002: Clear m_previousActiveInterpolationsForAnimations in maybeApplyPendingUpdate() (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 290
291 ASSERT(inactive.isEmpty() || cssAnimations); 291 ASSERT(inactive.isEmpty() || cssAnimations);
292 for (const AtomicString& animationName : inactive) { 292 for (const AtomicString& animationName : inactive) {
293 ASSERT(!isAnimationStyleChange); 293 ASSERT(!isAnimationStyleChange);
294 update.cancelAnimation(animationName, *cssAnimations->m_animations.get(a nimationName)->animation); 294 update.cancelAnimation(animationName, *cssAnimations->m_animations.get(a nimationName)->animation);
295 } 295 }
296 } 296 }
297 297
298 void CSSAnimations::maybeApplyPendingUpdate(Element* element) 298 void CSSAnimations::maybeApplyPendingUpdate(Element* element)
299 { 299 {
300 if (m_pendingUpdate.isEmpty()) { 300 m_previousActiveInterpolationsForAnimations.clear();
301 m_previousActiveInterpolationsForAnimations.clear(); 301 if (m_pendingUpdate.isEmpty())
302 return; 302 return;
303 }
304 303
305 m_previousActiveInterpolationsForAnimations.swap(m_pendingUpdate.activeInter polationsForAnimations()); 304 m_previousActiveInterpolationsForAnimations.swap(m_pendingUpdate.activeInter polationsForAnimations());
306 305
307 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here 306 // FIXME: cancelling, pausing, unpausing animations all query compositingSta te, which is not necessarily up to date here
308 // since we call this from recalc style. 307 // since we call this from recalc style.
309 // https://code.google.com/p/chromium/issues/detail?id=339847 308 // https://code.google.com/p/chromium/issues/detail?id=339847
310 DisableCompositingQueryAsserts disabler; 309 DisableCompositingQueryAsserts disabler;
311 310
312 for (const AtomicString& animationName : m_pendingUpdate.cancelledAnimationN ames()) { 311 for (const AtomicString& animationName : m_pendingUpdate.cancelledAnimationN ames()) {
313 RefPtrWillBeRawPtr<Animation> animation = m_animations.take(animationNam e)->animation; 312 RefPtrWillBeRawPtr<Animation> animation = m_animations.take(animationNam e)->animation;
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
791 { 790 {
792 #if ENABLE(OILPAN) 791 #if ENABLE(OILPAN)
793 visitor->trace(m_transitions); 792 visitor->trace(m_transitions);
794 visitor->trace(m_pendingUpdate); 793 visitor->trace(m_pendingUpdate);
795 visitor->trace(m_animations); 794 visitor->trace(m_animations);
796 visitor->trace(m_previousActiveInterpolationsForAnimations); 795 visitor->trace(m_previousActiveInterpolationsForAnimations);
797 #endif 796 #endif
798 } 797 }
799 798
800 } // namespace blink 799 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698