| 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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 | 429 |
| 430 if (m_documentOrderIndexesDirty) | 430 if (m_documentOrderIndexesDirty) |
| 431 updateDocumentOrderIndexes(); | 431 updateDocumentOrderIndexes(); |
| 432 | 432 |
| 433 HeapHashSet<ElementAttributePair> invalidKeys; | 433 HeapHashSet<ElementAttributePair> invalidKeys; |
| 434 using AnimationsVector = HeapVector<Member<SVGSMILElement>>; | 434 using AnimationsVector = HeapVector<Member<SVGSMILElement>>; |
| 435 AnimationsVector animationsToApply; | 435 AnimationsVector animationsToApply; |
| 436 AnimationsVector scheduledAnimationsInSameGroup; | 436 AnimationsVector scheduledAnimationsInSameGroup; |
| 437 for (const auto& entry : m_scheduledAnimations) { | 437 for (const auto& entry : m_scheduledAnimations) { |
| 438 if (!entry.key.first || entry.value->isEmpty()) { | 438 if (!entry.key.first || entry.value->isEmpty()) { |
| 439 invalidKeys.add(entry.key); | 439 invalidKeys.insert(entry.key); |
| 440 continue; | 440 continue; |
| 441 } | 441 } |
| 442 | 442 |
| 443 // Sort according to priority. Elements with later begin time have higher | 443 // Sort according to priority. Elements with later begin time have higher |
| 444 // priority. In case of a tie, document order decides. | 444 // priority. In case of a tie, document order decides. |
| 445 // FIXME: This should also consider timing relationships between the | 445 // FIXME: This should also consider timing relationships between the |
| 446 // elements. Dependents have higher priority. | 446 // elements. Dependents have higher priority. |
| 447 copyToVector(*entry.value, scheduledAnimationsInSameGroup); | 447 copyToVector(*entry.value, scheduledAnimationsInSameGroup); |
| 448 std::sort(scheduledAnimationsInSameGroup.begin(), | 448 std::sort(scheduledAnimationsInSameGroup.begin(), |
| 449 scheduledAnimationsInSameGroup.end(), PriorityCompare(elapsed)); | 449 scheduledAnimationsInSameGroup.end(), PriorityCompare(elapsed)); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 526 void SMILTimeContainer::advanceFrameForTesting() { | 526 void SMILTimeContainer::advanceFrameForTesting() { |
| 527 setElapsed(elapsed() + initialFrameDelay); | 527 setElapsed(elapsed() + initialFrameDelay); |
| 528 } | 528 } |
| 529 | 529 |
| 530 DEFINE_TRACE(SMILTimeContainer) { | 530 DEFINE_TRACE(SMILTimeContainer) { |
| 531 visitor->trace(m_scheduledAnimations); | 531 visitor->trace(m_scheduledAnimations); |
| 532 visitor->trace(m_ownerSVGElement); | 532 visitor->trace(m_ownerSVGElement); |
| 533 } | 533 } |
| 534 | 534 |
| 535 } // namespace blink | 535 } // namespace blink |
| OLD | NEW |