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

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

Issue 99533004: [SVG] Implement 'discard' element (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 307 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 318 }
319 319
320 // Apply results to target elements. 320 // Apply results to target elements.
321 for (unsigned i = 0; i < animationsToApplySize; ++i) 321 for (unsigned i = 0; i < animationsToApplySize; ++i)
322 animationsToApply[i]->applyResultsToTarget(); 322 animationsToApply[i]->applyResultsToTarget();
323 323
324 #ifndef NDEBUG 324 #ifndef NDEBUG
325 m_preventScheduledAnimationsChanges = false; 325 m_preventScheduledAnimationsChanges = false;
326 #endif 326 #endif
327 327
328 for (unsigned n = 0; n < animationsToApply.size(); n++) {
rwlbuis 2013/12/16 21:31:34 Better use prefix ++ variant, it is not slower but
pavane 2013/12/16 22:03:50 Sure, i missed it. I am not changing the size of t
pdr. 2013/12/18 22:40:33 I don't think this is safe. Can't the remove() ca
pavane 2013/12/19 07:17:03 This is the exact problem i am facing currently wi
329 if (animationsToApply[n]->isDiscardable()) {
rwlbuis 2013/12/16 21:31:34 Do you need a flag for isDiscardable? I am not an
pavane 2013/12/16 22:03:50 you are right. only animations which are already s
330 SVGSMILElement* animDiscard = animationsToApply[n];
331 SVGElement* targetElement = animDiscard->targetElement();
332 animDiscard->remove(IGNORE_EXCEPTION);
333 if (targetElement)
334 targetElement->remove(IGNORE_EXCEPTION);
335 }
336 }
337
328 startTimer(earliestFireTime, animationFrameDelay); 338 startTimer(earliestFireTime, animationFrameDelay);
329 } 339 }
330 340
331 } 341 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698