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

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

Issue 2696183002: Migrate WTF::HashSet::remove() to ::erase() [part 1] (Closed)
Patch Set: one more platform-specific reference 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 127
128 HeapVector<Member<Animation>> animations; 128 HeapVector<Member<Animation>> animations;
129 animations.reserveInitialCapacity(m_animationsNeedingUpdate.size()); 129 animations.reserveInitialCapacity(m_animationsNeedingUpdate.size());
130 for (Animation* animation : m_animationsNeedingUpdate) 130 for (Animation* animation : m_animationsNeedingUpdate)
131 animations.push_back(animation); 131 animations.push_back(animation);
132 132
133 std::sort(animations.begin(), animations.end(), Animation::hasLowerPriority); 133 std::sort(animations.begin(), animations.end(), Animation::hasLowerPriority);
134 134
135 for (Animation* animation : animations) { 135 for (Animation* animation : animations) {
136 if (!animation->update(reason)) 136 if (!animation->update(reason))
137 m_animationsNeedingUpdate.remove(animation); 137 m_animationsNeedingUpdate.erase(animation);
138 } 138 }
139 139
140 DCHECK_EQ(m_outdatedAnimationCount, 0U); 140 DCHECK_EQ(m_outdatedAnimationCount, 0U);
141 DCHECK(m_lastCurrentTimeInternal == currentTimeInternal() || 141 DCHECK(m_lastCurrentTimeInternal == currentTimeInternal() ||
142 (std::isnan(currentTimeInternal()) && 142 (std::isnan(currentTimeInternal()) &&
143 std::isnan(m_lastCurrentTimeInternal))); 143 std::isnan(m_lastCurrentTimeInternal)));
144 144
145 #if DCHECK_IS_ON() 145 #if DCHECK_IS_ON()
146 for (const auto& animation : m_animationsNeedingUpdate) 146 for (const auto& animation : m_animationsNeedingUpdate)
147 DCHECK(!animation->outdated()); 147 DCHECK(!animation->outdated());
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
317 } 317 }
318 318
319 DEFINE_TRACE(AnimationTimeline) { 319 DEFINE_TRACE(AnimationTimeline) {
320 visitor->trace(m_document); 320 visitor->trace(m_document);
321 visitor->trace(m_timing); 321 visitor->trace(m_timing);
322 visitor->trace(m_animationsNeedingUpdate); 322 visitor->trace(m_animationsNeedingUpdate);
323 visitor->trace(m_animations); 323 visitor->trace(m_animations);
324 } 324 }
325 325
326 } // namespace blink 326 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/core/v8/DOMWrapperWorld.cpp ('k') | third_party/WebKit/Source/core/css/CSSFontSelector.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698