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 if (!animation->hasConditionsConnected()) |
| 280 animation->connectConditions(); |
| 281 } |
| 282 } |
| 283 |
| 284 for (GroupedAnimationsMap::iterator it = m_scheduledAnimations.begin(); it !
= end; ++it) { |
| 285 AnimationsVector* scheduled = it->value.get(); |
276 | 286 |
277 // Sort according to priority. Elements with later begin time have highe
r priority. | 287 // Sort according to priority. Elements with later begin time have highe
r priority. |
278 // In case of a tie, document order decides. | 288 // In case of a tie, document order decides. |
279 // FIXME: This should also consider timing relationships between the ele
ments. Dependents | 289 // FIXME: This should also consider timing relationships between the ele
ments. Dependents |
280 // have higher priority. | 290 // have higher priority. |
281 sortByPriority(*scheduled, elapsed); | 291 sortByPriority(*scheduled, elapsed); |
282 | 292 |
283 SVGSMILElement* resultElement = 0; | 293 SVGSMILElement* resultElement = 0; |
284 unsigned size = scheduled->size(); | 294 unsigned size = scheduled->size(); |
285 for (unsigned n = 0; n < size; n++) { | 295 for (unsigned n = 0; n < size; n++) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
322 animationsToApply[i]->applyResultsToTarget(); | 332 animationsToApply[i]->applyResultsToTarget(); |
323 | 333 |
324 #ifndef NDEBUG | 334 #ifndef NDEBUG |
325 m_preventScheduledAnimationsChanges = false; | 335 m_preventScheduledAnimationsChanges = false; |
326 #endif | 336 #endif |
327 | 337 |
328 startTimer(earliestFireTime, animationFrameDelay); | 338 startTimer(earliestFireTime, animationFrameDelay); |
329 } | 339 } |
330 | 340 |
331 } | 341 } |
OLD | NEW |