Chromium Code Reviews| 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 1442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1453 // the element won't attempt to load another resource. | 1453 // the element won't attempt to load another resource. |
| 1454 | 1454 |
| 1455 updateDisplayState(); | 1455 updateDisplayState(); |
| 1456 | 1456 |
| 1457 if (renderer()) | 1457 if (renderer()) |
| 1458 renderer()->updateFromElement(); | 1458 renderer()->updateFromElement(); |
| 1459 } | 1459 } |
| 1460 | 1460 |
| 1461 void HTMLMediaElement::mediaEngineError(PassRefPtrWillBeRawPtr<MediaError> err) | 1461 void HTMLMediaElement::mediaEngineError(PassRefPtrWillBeRawPtr<MediaError> err) |
| 1462 { | 1462 { |
| 1463 ASSERT(m_readyState >= HAVE_METADATA); | |
| 1463 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(er r->code())); | 1464 WTF_LOG(Media, "HTMLMediaElement::mediaEngineError(%d)", static_cast<int>(er r->code())); |
| 1464 | 1465 |
| 1465 // 1 - The user agent should cancel the fetching process. | 1466 // 1 - The user agent should cancel the fetching process. |
| 1466 stopPeriodicTimers(); | 1467 stopPeriodicTimers(); |
| 1467 m_loadState = WaitingForSource; | 1468 m_loadState = WaitingForSource; |
| 1468 | 1469 |
| 1469 // 2 - Set the error attribute to a new MediaError object whose code attribu te is | 1470 // 2 - Set the error attribute to a new MediaError object whose code attribu te is |
| 1470 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. | 1471 // set to MEDIA_ERR_NETWORK/MEDIA_ERR_DECODE. |
| 1471 m_error = err; | 1472 m_error = err; |
| 1472 | 1473 |
| 1473 // 3 - Queue a task to fire a simple event named error at the media element. | 1474 // 3 - Queue a task to fire a simple event named error at the media element. |
| 1474 scheduleEvent(EventTypeNames::error); | 1475 scheduleEvent(EventTypeNames::error); |
| 1475 | 1476 |
| 1476 closeMediaSource(); | 1477 closeMediaSource(); |
|
acolwell GONE FROM CHROMIUM
2014/06/18 23:46:27
This line should be removed if we aren't actually
Srirama
2014/06/19 03:35:16
will do it.
On 2014/06/18 23:46:27, acolwell wrote
| |
| 1477 | 1478 |
| 1478 // 4 - Set the element's networkState attribute to the NETWORK_EMPTY value a nd queue a | 1479 // 4 - Set the element's networkState attribute to the NETWORK_IDLE value. |
| 1479 // task to fire a simple event called emptied at the element. | 1480 m_networkState = NETWORK_IDLE; |
| 1480 m_networkState = NETWORK_EMPTY; | |
| 1481 scheduleEvent(EventTypeNames::emptied); | |
| 1482 | 1481 |
| 1483 // 5 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event. | 1482 // 5 - Set the element's delaying-the-load-event flag to false. This stops d elaying the load event. |
| 1484 setShouldDelayLoadEvent(false); | 1483 setShouldDelayLoadEvent(false); |
| 1485 | 1484 |
| 1486 // 6 - Abort the overall resource selection algorithm. | 1485 // 6 - Abort the overall resource selection algorithm. |
| 1487 m_currentSourceNode = nullptr; | 1486 m_currentSourceNode = nullptr; |
| 1488 } | 1487 } |
| 1489 | 1488 |
| 1490 void HTMLMediaElement::cancelPendingEventsAndCallbacks() | 1489 void HTMLMediaElement::cancelPendingEventsAndCallbacks() |
| 1491 { | 1490 { |
| (...skipping 2181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3673 | 3672 |
| 3674 #if ENABLE(WEB_AUDIO) | 3673 #if ENABLE(WEB_AUDIO) |
| 3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) | 3674 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) |
| 3676 { | 3675 { |
| 3677 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) | 3676 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) |
| 3678 audioSourceProvider()->setClient(0); | 3677 audioSourceProvider()->setClient(0); |
| 3679 } | 3678 } |
| 3680 #endif | 3679 #endif |
| 3681 | 3680 |
| 3682 } | 3681 } |
| OLD | NEW |