OLD | NEW |
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 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
266 #ifndef NDEBUG | 266 #ifndef NDEBUG |
267 // This boolean will catch any attempts to schedule/unschedule scheduledAnim
ations during this critical section. | 267 // This boolean will catch any attempts to schedule/unschedule scheduledAnim
ations during this critical section. |
268 // Similarly, any elements removed will unschedule themselves, so this will
catch modification of animationsToApply. | 268 // Similarly, any elements removed will unschedule themselves, so this will
catch modification of animationsToApply. |
269 m_preventScheduledAnimationsChanges = true; | 269 m_preventScheduledAnimationsChanges = true; |
270 #endif | 270 #endif |
271 | 271 |
272 AnimationsVector animationsToApply; | 272 AnimationsVector animationsToApply; |
273 GroupedAnimationsMap::iterator end = m_scheduledAnimations.end(); | 273 GroupedAnimationsMap::iterator end = m_scheduledAnimations.end(); |
274 for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it !
= end; ++it) { | 274 for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it !
= end; ++it) { |
275 AnimationsVector* scheduled = it->value.get(); | 275 AnimationsVector* scheduled = it->value.get(); |
276 unsigned size = scheduled->size(); | |
277 for (unsigned n = 0; n < size; n++) { | |
278 SVGSMILElement* animation = scheduled->at(n); | |
279 animation->connectConditions(); | |
280 } | |
281 } | |
282 | |
283 for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it !
= end; ++it) { | |
284 AnimationsVector* scheduled = it->value.get(); | |
285 | 276 |
286 // Sort according to priority. Elements with later begin time have highe
r priority. | 277 // Sort according to priority. Elements with later begin time have highe
r priority. |
287 // In case of a tie, document order decides. | 278 // In case of a tie, document order decides. |
288 // FIXME: This should also consider timing relationships between the ele
ments. Dependents | 279 // FIXME: This should also consider timing relationships between the ele
ments. Dependents |
289 // have higher priority. | 280 // have higher priority. |
290 sortByPriority(*scheduled, elapsed); | 281 sortByPriority(*scheduled, elapsed); |
291 | 282 |
292 SVGSMILElement* resultElement = 0; | 283 SVGSMILElement* resultElement = 0; |
293 unsigned size = scheduled->size(); | 284 unsigned size = scheduled->size(); |
294 for (unsigned n = 0; n < size; n++) { | 285 for (unsigned n = 0; n < size; n++) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 animationsToApply[i]->applyResultsToTarget(); | 322 animationsToApply[i]->applyResultsToTarget(); |
332 | 323 |
333 #ifndef NDEBUG | 324 #ifndef NDEBUG |
334 m_preventScheduledAnimationsChanges = false; | 325 m_preventScheduledAnimationsChanges = false; |
335 #endif | 326 #endif |
336 | 327 |
337 startTimer(earliestFireTime, animationFrameDelay); | 328 startTimer(earliestFireTime, animationFrameDelay); |
338 } | 329 } |
339 | 330 |
340 } | 331 } |
OLD | NEW |