| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 { | 64 { |
| 65 m_currentTime = monotonicAnimationStartTime; | 65 m_currentTime = monotonicAnimationStartTime; |
| 66 | 66 |
| 67 for (int i = m_players.size() - 1; i >= 0; --i) { | 67 for (int i = m_players.size() - 1; i >= 0; --i) { |
| 68 if (!m_players[i]->update()) | 68 if (!m_players[i]->update()) |
| 69 m_players.remove(i); | 69 m_players.remove(i); |
| 70 } | 70 } |
| 71 | 71 |
| 72 if (m_document->view() && !m_players.isEmpty()) | 72 if (m_document->view() && !m_players.isEmpty()) |
| 73 m_document->view()->scheduleAnimation(); | 73 m_document->view()->scheduleAnimation(); |
| 74 |
| 75 dispatchEvents(); |
| 74 } | 76 } |
| 75 | 77 |
| 76 void DocumentTimeline::pauseAnimationsForTesting(double pauseTime) | 78 void DocumentTimeline::pauseAnimationsForTesting(double pauseTime) |
| 77 { | 79 { |
| 78 for (size_t i = 0; i < m_players.size(); i++) { | 80 for (size_t i = 0; i < m_players.size(); i++) { |
| 79 m_players[i]->setPaused(true); | 81 m_players[i]->setPaused(true); |
| 80 m_players[i]->setCurrentTime(pauseTime); | 82 m_players[i]->setCurrentTime(pauseTime); |
| 81 } | 83 } |
| 82 } | 84 } |
| 83 | 85 |
| 86 void DocumentTimeline::dispatchEvents() |
| 87 { |
| 88 for (size_t i = 0; i < m_events.size(); i++) |
| 89 m_events[i].target->dispatchEvent(m_events[i].event.release()); |
| 90 m_events.clear(); |
| 91 } |
| 92 |
| 84 } // namespace | 93 } // namespace |
| OLD | NEW |