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

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

Issue 2759703002: Migrate WTF::HashMap::remove() to ::erase() (Closed)
Patch Set: rebase, fix one platform-specific reference 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) 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 Apple 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 ElementAttributePair key(target, attributeName); 103 ElementAttributePair key(target, attributeName);
104 GroupedAnimationsMap::iterator it = m_scheduledAnimations.find(key); 104 GroupedAnimationsMap::iterator it = m_scheduledAnimations.find(key);
105 DCHECK_NE(it, m_scheduledAnimations.end()); 105 DCHECK_NE(it, m_scheduledAnimations.end());
106 AnimationsLinkedHashSet* scheduled = it->value.get(); 106 AnimationsLinkedHashSet* scheduled = it->value.get();
107 DCHECK(scheduled); 107 DCHECK(scheduled);
108 AnimationsLinkedHashSet::iterator itAnimation = scheduled->find(animation); 108 AnimationsLinkedHashSet::iterator itAnimation = scheduled->find(animation);
109 DCHECK(itAnimation != scheduled->end()); 109 DCHECK(itAnimation != scheduled->end());
110 scheduled->erase(itAnimation); 110 scheduled->erase(itAnimation);
111 111
112 if (scheduled->isEmpty()) 112 if (scheduled->isEmpty())
113 m_scheduledAnimations.remove(it); 113 m_scheduledAnimations.erase(it);
114 } 114 }
115 115
116 bool SMILTimeContainer::hasAnimations() const { 116 bool SMILTimeContainer::hasAnimations() const {
117 return !m_scheduledAnimations.isEmpty(); 117 return !m_scheduledAnimations.isEmpty();
118 } 118 }
119 119
120 bool SMILTimeContainer::hasPendingSynchronization() const { 120 bool SMILTimeContainer::hasPendingSynchronization() const {
121 return m_frameSchedulingState == SynchronizeAnimations && 121 return m_frameSchedulingState == SynchronizeAnimations &&
122 m_wakeupTimer.isActive() && !m_wakeupTimer.nextFireInterval(); 122 m_wakeupTimer.isActive() && !m_wakeupTimer.nextFireInterval();
123 } 123 }
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 void SMILTimeContainer::advanceFrameForTesting() { 529 void SMILTimeContainer::advanceFrameForTesting() {
530 setElapsed(elapsed() + initialFrameDelay); 530 setElapsed(elapsed() + initialFrameDelay);
531 } 531 }
532 532
533 DEFINE_TRACE(SMILTimeContainer) { 533 DEFINE_TRACE(SMILTimeContainer) {
534 visitor->trace(m_scheduledAnimations); 534 visitor->trace(m_scheduledAnimations);
535 visitor->trace(m_ownerSVGElement); 535 visitor->trace(m_ownerSVGElement);
536 } 536 }
537 537
538 } // namespace blink 538 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698