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

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

Issue 2709033003: Migrate WTF::HashMap::get() to ::at() (Closed)
Patch Set: rebase Created 3 years, 9 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 530 matching lines...) Expand 10 before | Expand all | Expand 10 after
541 541
542 CSSPropertyID id = newTransition.id; 542 CSSPropertyID id = newTransition.id;
543 const InertEffect* inertAnimation = newTransition.effect.get(); 543 const InertEffect* inertAnimation = newTransition.effect.get();
544 TransitionEventDelegate* eventDelegate = 544 TransitionEventDelegate* eventDelegate =
545 new TransitionEventDelegate(element, id); 545 new TransitionEventDelegate(element, id);
546 546
547 EffectModel* model = inertAnimation->model(); 547 EffectModel* model = inertAnimation->model();
548 548
549 if (retargetedCompositorTransitions.contains(id)) { 549 if (retargetedCompositorTransitions.contains(id)) {
550 const std::pair<Member<KeyframeEffectReadOnly>, double>& oldTransition = 550 const std::pair<Member<KeyframeEffectReadOnly>, double>& oldTransition =
551 retargetedCompositorTransitions.get(id); 551 retargetedCompositorTransitions.at(id);
552 KeyframeEffectReadOnly* oldAnimation = oldTransition.first; 552 KeyframeEffectReadOnly* oldAnimation = oldTransition.first;
553 double oldStartTime = oldTransition.second; 553 double oldStartTime = oldTransition.second;
554 double inheritedTime = 554 double inheritedTime =
555 isNull(oldStartTime) 555 isNull(oldStartTime)
556 ? 0 556 ? 0
557 : element->document().timeline().currentTimeInternal() - 557 : element->document().timeline().currentTimeInternal() -
558 oldStartTime; 558 oldStartTime;
559 559
560 TransitionKeyframeEffectModel* oldEffect = 560 TransitionKeyframeEffectModel* oldEffect =
561 toTransitionKeyframeEffectModel(inertAnimation->model()); 561 toTransitionKeyframeEffectModel(inertAnimation->model());
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 for (const auto& entry : update.newTransitions()) 915 for (const auto& entry : update.newTransitions())
916 newTransitions.push_back(entry.value.effect.get()); 916 newTransitions.push_back(entry.value.effect.get());
917 917
918 HeapHashSet<Member<const Animation>> cancelledAnimations; 918 HeapHashSet<Member<const Animation>> cancelledAnimations;
919 if (!update.cancelledTransitions().isEmpty()) { 919 if (!update.cancelledTransitions().isEmpty()) {
920 DCHECK(elementAnimations); 920 DCHECK(elementAnimations);
921 const TransitionMap& transitionMap = 921 const TransitionMap& transitionMap =
922 elementAnimations->cssAnimations().m_transitions; 922 elementAnimations->cssAnimations().m_transitions;
923 for (CSSPropertyID id : update.cancelledTransitions()) { 923 for (CSSPropertyID id : update.cancelledTransitions()) {
924 DCHECK(transitionMap.contains(id)); 924 DCHECK(transitionMap.contains(id));
925 cancelledAnimations.insert(transitionMap.get(id).animation.get()); 925 cancelledAnimations.insert(transitionMap.at(id).animation.get());
926 } 926 }
927 } 927 }
928 928
929 activeInterpolationsForTransitions = EffectStack::activeInterpolations( 929 activeInterpolationsForTransitions = EffectStack::activeInterpolations(
930 effectStack, &newTransitions, &cancelledAnimations, 930 effectStack, &newTransitions, &cancelledAnimations,
931 KeyframeEffectReadOnly::TransitionPriority, isStylePropertyHandle); 931 KeyframeEffectReadOnly::TransitionPriority, isStylePropertyHandle);
932 } 932 }
933 933
934 // Properties being animated by animations don't get values from transitions 934 // Properties being animated by animations don't get values from transitions
935 // applied. 935 // applied.
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
1111 isCustomPropertyHandle); 1111 isCustomPropertyHandle);
1112 } 1112 }
1113 1113
1114 DEFINE_TRACE(CSSAnimations) { 1114 DEFINE_TRACE(CSSAnimations) {
1115 visitor->trace(m_transitions); 1115 visitor->trace(m_transitions);
1116 visitor->trace(m_pendingUpdate); 1116 visitor->trace(m_pendingUpdate);
1117 visitor->trace(m_runningAnimations); 1117 visitor->trace(m_runningAnimations);
1118 } 1118 }
1119 1119
1120 } // namespace blink 1120 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698