OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 3512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3523 | 3523 |
3524 stopPeriodicTimers(); | 3524 stopPeriodicTimers(); |
3525 cancelPendingEventsAndCallbacks(); | 3525 cancelPendingEventsAndCallbacks(); |
3526 | 3526 |
3527 m_asyncEventQueue->close(); | 3527 m_asyncEventQueue->close(); |
3528 } | 3528 } |
3529 | 3529 |
3530 bool HTMLMediaElement::hasPendingActivity() const | 3530 bool HTMLMediaElement::hasPendingActivity() const |
3531 { | 3531 { |
3532 // After the document becomes inactive, no events can ever be fired. | 3532 // After the document becomes inactive, no events can ever be fired. |
3533 if (!document().isActive()) { | 3533 if (!document().isActive()) |
3534 ASSERT(!m_asyncEventQueue->hasPendingEvents()); | |
3535 return false; | 3534 return false; |
3536 } | |
3537 | 3535 |
3538 // The delaying-the-load-event flag is set by resource selection algorithm w
hen looking for a | 3536 // The delaying-the-load-event flag is set by resource selection algorithm w
hen looking for a |
3539 // resource to load, before networkState has reached to NETWORK_LOADING. | 3537 // resource to load, before networkState has reached to NETWORK_LOADING. |
3540 if (m_shouldDelayLoadEvent) | 3538 if (m_shouldDelayLoadEvent) |
3541 return true; | 3539 return true; |
3542 | 3540 |
3543 // When networkState is NETWORK_LOADING, progress and stalled events may be
fired. | 3541 // When networkState is NETWORK_LOADING, progress and stalled events may be
fired. |
3544 if (m_networkState == NETWORK_LOADING) | 3542 if (m_networkState == NETWORK_LOADING) |
3545 return true; | 3543 return true; |
3546 | 3544 |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4047 | 4045 |
4048 #if ENABLE(WEB_AUDIO) | 4046 #if ENABLE(WEB_AUDIO) |
4049 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 4047 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
4050 { | 4048 { |
4051 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 4049 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
4052 audioSourceProvider()->setClient(0); | 4050 audioSourceProvider()->setClient(0); |
4053 } | 4051 } |
4054 #endif | 4052 #endif |
4055 | 4053 |
4056 } | 4054 } |
OLD | NEW |