| 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 2688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2699 | 2699 |
| 2700 // 4.8.8 - If a source element is inserted as a child of a media element tha
t has no src | 2700 // 4.8.8 - If a source element is inserted as a child of a media element tha
t has no src |
| 2701 // attribute and whose networkState has the value NETWORK_EMPTY, the user ag
ent must invoke | 2701 // attribute and whose networkState has the value NETWORK_EMPTY, the user ag
ent must invoke |
| 2702 // the media element's resource selection algorithm. | 2702 // the media element's resource selection algorithm. |
| 2703 if (networkState() == HTMLMediaElement::NETWORK_EMPTY) { | 2703 if (networkState() == HTMLMediaElement::NETWORK_EMPTY) { |
| 2704 scheduleDelayedAction(LoadMediaResource); | 2704 scheduleDelayedAction(LoadMediaResource); |
| 2705 m_nextChildNodeToConsider = source; | 2705 m_nextChildNodeToConsider = source; |
| 2706 return; | 2706 return; |
| 2707 } | 2707 } |
| 2708 | 2708 |
| 2709 if (m_currentSourceNode && source == m_currentSourceNode->nextSibling()) { | 2709 if (!m_currentSourceNode || source == m_currentSourceNode->nextSibling()) { |
| 2710 WTF_LOG(Media, "HTMLMediaElement::sourceWasAdded - <source> inserted imm
ediately after current source"); | 2710 WTF_LOG(Media, "HTMLMediaElement::sourceWasAdded - no current source or
<source> inserted immediately after current source"); |
| 2711 m_nextChildNodeToConsider = source; | 2711 m_nextChildNodeToConsider = source; |
| 2712 return; | 2712 return; |
| 2713 } | 2713 } |
| 2714 | 2714 |
| 2715 if (m_nextChildNodeToConsider) | 2715 if (m_nextChildNodeToConsider) |
| 2716 return; | 2716 return; |
| 2717 | 2717 |
| 2718 // 4.8.9.5, resource selection algorithm, source elements section: | 2718 // 4.8.9.5, resource selection algorithm, source elements section: |
| 2719 // 21. Wait until the node after pointer is a node other than the end of the
list. (This step might wait forever.) | 2719 // 21. Wait until the node after pointer is a node other than the end of the
list. (This step might wait forever.) |
| 2720 // 22. Asynchronously await a stable state... | 2720 // 22. Asynchronously await a stable state... |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3654 visitor->trace(m_error); | 3654 visitor->trace(m_error); |
| 3655 visitor->trace(m_currentSourceNode); | 3655 visitor->trace(m_currentSourceNode); |
| 3656 visitor->trace(m_nextChildNodeToConsider); | 3656 visitor->trace(m_nextChildNodeToConsider); |
| 3657 visitor->trace(m_textTracks); | 3657 visitor->trace(m_textTracks); |
| 3658 visitor->trace(m_textTracksWhenResourceSelectionBegan); | 3658 visitor->trace(m_textTracksWhenResourceSelectionBegan); |
| 3659 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); | 3659 WillBeHeapSupplementable<HTMLMediaElement>::trace(visitor); |
| 3660 HTMLElement::trace(visitor); | 3660 HTMLElement::trace(visitor); |
| 3661 } | 3661 } |
| 3662 | 3662 |
| 3663 } | 3663 } |
| OLD | NEW |