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

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

Issue 2671933002: Migrate WTF::HashMap::add() to ::insert() (Closed)
Patch Set: rebase, add TODOs Created 3 years, 10 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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 for (CSSPropertyID id : m_pendingUpdate.cancelledTransitions()) { 495 for (CSSPropertyID id : m_pendingUpdate.cancelledTransitions()) {
496 DCHECK(m_transitions.contains(id)); 496 DCHECK(m_transitions.contains(id));
497 497
498 Animation* animation = m_transitions.take(id).animation; 498 Animation* animation = m_transitions.take(id).animation;
499 KeyframeEffectReadOnly* effect = 499 KeyframeEffectReadOnly* effect =
500 toKeyframeEffectReadOnly(animation->effect()); 500 toKeyframeEffectReadOnly(animation->effect());
501 if (effect->hasActiveAnimationsOnCompositor(id) && 501 if (effect->hasActiveAnimationsOnCompositor(id) &&
502 m_pendingUpdate.newTransitions().find(id) != 502 m_pendingUpdate.newTransitions().find(id) !=
503 m_pendingUpdate.newTransitions().end() && 503 m_pendingUpdate.newTransitions().end() &&
504 !animation->limited()) 504 !animation->limited())
505 retargetedCompositorTransitions.add( 505 retargetedCompositorTransitions.insert(
506 id, std::pair<KeyframeEffectReadOnly*, double>( 506 id, std::pair<KeyframeEffectReadOnly*, double>(
507 effect, animation->startTimeInternal())); 507 effect, animation->startTimeInternal()));
508 animation->cancel(); 508 animation->cancel();
509 // after cancelation, transitions must be downgraded or they'll fail 509 // after cancelation, transitions must be downgraded or they'll fail
510 // to be considered when retriggering themselves. This can happen if 510 // to be considered when retriggering themselves. This can happen if
511 // the transition is captured through getAnimations then played. 511 // the transition is captured through getAnimations then played.
512 if (animation->effect() && animation->effect()->isKeyframeEffectReadOnly()) 512 if (animation->effect() && animation->effect()->isKeyframeEffectReadOnly())
513 toKeyframeEffectReadOnly(animation->effect())->downgradeToNormal(); 513 toKeyframeEffectReadOnly(animation->effect())->downgradeToNormal();
514 animation->update(TimingUpdateOnDemand); 514 animation->update(TimingUpdateOnDemand);
515 } 515 }
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 isCustomPropertyHandle); 1068 isCustomPropertyHandle);
1069 } 1069 }
1070 1070
1071 DEFINE_TRACE(CSSAnimations) { 1071 DEFINE_TRACE(CSSAnimations) {
1072 visitor->trace(m_transitions); 1072 visitor->trace(m_transitions);
1073 visitor->trace(m_pendingUpdate); 1073 visitor->trace(m_pendingUpdate);
1074 visitor->trace(m_runningAnimations); 1074 visitor->trace(m_runningAnimations);
1075 } 1075 }
1076 1076
1077 } // namespace blink 1077 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698