| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 127 | 127 |
| 128 HeapVector<Member<Animation>> animations; | 128 HeapVector<Member<Animation>> animations; |
| 129 animations.reserveInitialCapacity(m_animationsNeedingUpdate.size()); | 129 animations.reserveInitialCapacity(m_animationsNeedingUpdate.size()); |
| 130 for (Animation* animation : m_animationsNeedingUpdate) | 130 for (Animation* animation : m_animationsNeedingUpdate) |
| 131 animations.push_back(animation); | 131 animations.push_back(animation); |
| 132 | 132 |
| 133 std::sort(animations.begin(), animations.end(), Animation::hasLowerPriority); | 133 std::sort(animations.begin(), animations.end(), Animation::hasLowerPriority); |
| 134 | 134 |
| 135 for (Animation* animation : animations) { | 135 for (Animation* animation : animations) { |
| 136 if (!animation->update(reason)) | 136 if (!animation->update(reason)) |
| 137 m_animationsNeedingUpdate.remove(animation); | 137 m_animationsNeedingUpdate.erase(animation); |
| 138 } | 138 } |
| 139 | 139 |
| 140 DCHECK_EQ(m_outdatedAnimationCount, 0U); | 140 DCHECK_EQ(m_outdatedAnimationCount, 0U); |
| 141 DCHECK(m_lastCurrentTimeInternal == currentTimeInternal() || | 141 DCHECK(m_lastCurrentTimeInternal == currentTimeInternal() || |
| 142 (std::isnan(currentTimeInternal()) && | 142 (std::isnan(currentTimeInternal()) && |
| 143 std::isnan(m_lastCurrentTimeInternal))); | 143 std::isnan(m_lastCurrentTimeInternal))); |
| 144 | 144 |
| 145 #if DCHECK_IS_ON() | 145 #if DCHECK_IS_ON() |
| 146 for (const auto& animation : m_animationsNeedingUpdate) | 146 for (const auto& animation : m_animationsNeedingUpdate) |
| 147 DCHECK(!animation->outdated()); | 147 DCHECK(!animation->outdated()); |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 } | 317 } |
| 318 | 318 |
| 319 DEFINE_TRACE(AnimationTimeline) { | 319 DEFINE_TRACE(AnimationTimeline) { |
| 320 visitor->trace(m_document); | 320 visitor->trace(m_document); |
| 321 visitor->trace(m_timing); | 321 visitor->trace(m_timing); |
| 322 visitor->trace(m_animationsNeedingUpdate); | 322 visitor->trace(m_animationsNeedingUpdate); |
| 323 visitor->trace(m_animations); | 323 visitor->trace(m_animations); |
| 324 } | 324 } |
| 325 | 325 |
| 326 } // namespace blink | 326 } // namespace blink |
| OLD | NEW |