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

Side by Side Diff: third_party/WebKit/Source/core/svg/animation/SMILTimeContainer.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) 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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 DCHECK_EQ(animation->timeContainer(), this); 70 DCHECK_EQ(animation->timeContainer(), this);
71 DCHECK(target); 71 DCHECK(target);
72 DCHECK(animation->hasValidTarget()); 72 DCHECK(animation->hasValidTarget());
73 73
74 #if DCHECK_IS_ON() 74 #if DCHECK_IS_ON()
75 ASSERT(!m_preventScheduledAnimationsChanges); 75 ASSERT(!m_preventScheduledAnimationsChanges);
76 #endif 76 #endif
77 77
78 ElementAttributePair key(target, attributeName); 78 ElementAttributePair key(target, attributeName);
79 Member<AnimationsLinkedHashSet>& scheduled = 79 Member<AnimationsLinkedHashSet>& scheduled =
80 m_scheduledAnimations.add(key, nullptr).storedValue->value; 80 m_scheduledAnimations.insert(key, nullptr).storedValue->value;
81 if (!scheduled) 81 if (!scheduled)
82 scheduled = new AnimationsLinkedHashSet; 82 scheduled = new AnimationsLinkedHashSet;
83 ASSERT(!scheduled->contains(animation)); 83 ASSERT(!scheduled->contains(animation));
84 scheduled->add(animation); 84 scheduled->add(animation);
85 85
86 SMILTime nextFireTime = animation->nextProgressTime(); 86 SMILTime nextFireTime = animation->nextProgressTime();
87 if (nextFireTime.isFinite()) 87 if (nextFireTime.isFinite())
88 notifyIntervalsChanged(); 88 notifyIntervalsChanged();
89 } 89 }
90 90
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
526 void SMILTimeContainer::advanceFrameForTesting() { 526 void SMILTimeContainer::advanceFrameForTesting() {
527 setElapsed(elapsed() + initialFrameDelay); 527 setElapsed(elapsed() + initialFrameDelay);
528 } 528 }
529 529
530 DEFINE_TRACE(SMILTimeContainer) { 530 DEFINE_TRACE(SMILTimeContainer) {
531 visitor->trace(m_scheduledAnimations); 531 visitor->trace(m_scheduledAnimations);
532 visitor->trace(m_ownerSVGElement); 532 visitor->trace(m_ownerSVGElement);
533 } 533 }
534 534
535 } // namespace blink 535 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698