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

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

Issue 2724363002: Migrate WTF::LinkedHashSet/ListHashSet::add() to ::insert() (Closed)
Patch Set: 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 #if DCHECK_IS_ON() 77 #if DCHECK_IS_ON()
78 ASSERT(!m_preventScheduledAnimationsChanges); 78 ASSERT(!m_preventScheduledAnimationsChanges);
79 #endif 79 #endif
80 80
81 ElementAttributePair key(target, attributeName); 81 ElementAttributePair key(target, attributeName);
82 Member<AnimationsLinkedHashSet>& scheduled = 82 Member<AnimationsLinkedHashSet>& scheduled =
83 m_scheduledAnimations.insert(key, nullptr).storedValue->value; 83 m_scheduledAnimations.insert(key, nullptr).storedValue->value;
84 if (!scheduled) 84 if (!scheduled)
85 scheduled = new AnimationsLinkedHashSet; 85 scheduled = new AnimationsLinkedHashSet;
86 ASSERT(!scheduled->contains(animation)); 86 ASSERT(!scheduled->contains(animation));
87 scheduled->add(animation); 87 scheduled->insert(animation);
88 88
89 SMILTime nextFireTime = animation->nextProgressTime(); 89 SMILTime nextFireTime = animation->nextProgressTime();
90 if (nextFireTime.isFinite()) 90 if (nextFireTime.isFinite())
91 notifyIntervalsChanged(); 91 notifyIntervalsChanged();
92 } 92 }
93 93
94 void SMILTimeContainer::unschedule(SVGSMILElement* animation, 94 void SMILTimeContainer::unschedule(SVGSMILElement* animation,
95 SVGElement* target, 95 SVGElement* target,
96 const QualifiedName& attributeName) { 96 const QualifiedName& attributeName) {
97 ASSERT(animation->timeContainer() == this); 97 ASSERT(animation->timeContainer() == this);
(...skipping 431 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