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

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

Issue 138643003: Simpler return value of HashTable::add/HashMap:add and others (Closed)
Patch Set: Daily master update (now with base url?) Created 6 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 { 65 {
66 ASSERT(animation->timeContainer() == this); 66 ASSERT(animation->timeContainer() == this);
67 ASSERT(target); 67 ASSERT(target);
68 ASSERT(animation->hasValidAttributeName()); 68 ASSERT(animation->hasValidAttributeName());
69 69
70 #ifndef NDEBUG 70 #ifndef NDEBUG
71 ASSERT(!m_preventScheduledAnimationsChanges); 71 ASSERT(!m_preventScheduledAnimationsChanges);
72 #endif 72 #endif
73 73
74 ElementAttributePair key(target, attributeName); 74 ElementAttributePair key(target, attributeName);
75 OwnPtr<AnimationsVector>& scheduled = m_scheduledAnimations.add(key, nullptr ).iterator->value; 75 OwnPtr<AnimationsVector>& scheduled = m_scheduledAnimations.add(key, nullptr ).storedValue->value;
76 if (!scheduled) 76 if (!scheduled)
77 scheduled = adoptPtr(new AnimationsVector); 77 scheduled = adoptPtr(new AnimationsVector);
78 ASSERT(!scheduled->contains(animation)); 78 ASSERT(!scheduled->contains(animation));
79 scheduled->append(animation); 79 scheduled->append(animation);
80 80
81 SMILTime nextFireTime = animation->nextProgressTime(); 81 SMILTime nextFireTime = animation->nextProgressTime();
82 if (nextFireTime.isFinite()) 82 if (nextFireTime.isFinite())
83 notifyIntervalsChanged(); 83 notifyIntervalsChanged();
84 } 84 }
85 85
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 351
352 if (animDiscard->inDocument()) { 352 if (animDiscard->inDocument()) {
353 animDiscard->remove(IGNORE_EXCEPTION); 353 animDiscard->remove(IGNORE_EXCEPTION);
354 ASSERT(!animDiscard->inDocument()); 354 ASSERT(!animDiscard->inDocument());
355 } 355 }
356 } 356 }
357 } 357 }
358 } 358 }
359 359
360 } 360 }
OLDNEW
« no previous file with comments | « Source/core/svg/SVGDocumentExtensions.cpp ('k') | Source/core/svg/properties/SVGAttributeToPropertyMap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698