| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 Vector<EventToDispatch> events = m_events; | 151 Vector<EventToDispatch> events = m_events; |
| 152 m_events.clear(); | 152 m_events.clear(); |
| 153 for (size_t i = 0; i < events.size(); i++) | 153 for (size_t i = 0; i < events.size(); i++) |
| 154 events[i].target->dispatchEvent(events[i].event.release()); | 154 events[i].target->dispatchEvent(events[i].event.release()); |
| 155 } | 155 } |
| 156 | 156 |
| 157 size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const | 157 size_t DocumentTimeline::numberOfActiveAnimationsForTesting() const |
| 158 { | 158 { |
| 159 // Includes all players whose directly associated timed items | 159 // Includes all players whose directly associated timed items |
| 160 // are current or in effect. | 160 // are current or in effect. |
| 161 return isNull(m_zeroTime) ? 0 : m_players.size(); | 161 if (isNull(m_zeroTime)) |
| 162 return 0; |
| 163 size_t count = 0; |
| 164 for (size_t i = 0; i < m_players.size(); ++i) { |
| 165 const TimedItem* timedItem = m_players[i]->source(); |
| 166 count += (timedItem && (timedItem->isCurrent() || timedItem->isInEffect(
))); |
| 167 } |
| 168 return count; |
| 162 } | 169 } |
| 163 | 170 |
| 164 } // namespace | 171 } // namespace |
| OLD | NEW |