Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: Source/core/html/HTMLMediaElement.cpp

Issue 349973006: HTMLMediaElement::webMediaPlayer() should never be null if m_readyState >= HAVE_METADATA (multiple … (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2694 matching lines...) Expand 10 before | Expand all | Expand 10 after
2705 2705
2706 // 4.8.8 - If a source element is inserted as a child of a media element tha t has no src 2706 // 4.8.8 - If a source element is inserted as a child of a media element tha t has no src
2707 // attribute and whose networkState has the value NETWORK_EMPTY, the user ag ent must invoke 2707 // attribute and whose networkState has the value NETWORK_EMPTY, the user ag ent must invoke
2708 // the media element's resource selection algorithm. 2708 // the media element's resource selection algorithm.
2709 if (networkState() == HTMLMediaElement::NETWORK_EMPTY) { 2709 if (networkState() == HTMLMediaElement::NETWORK_EMPTY) {
2710 scheduleDelayedAction(LoadMediaResource); 2710 scheduleDelayedAction(LoadMediaResource);
2711 m_nextChildNodeToConsider = source; 2711 m_nextChildNodeToConsider = source;
2712 return; 2712 return;
2713 } 2713 }
2714 2714
2715 if (m_currentSourceNode && source == m_currentSourceNode->nextSibling()) { 2715 if (!m_currentSourceNode || source == m_currentSourceNode->nextSibling()) {
2716 WTF_LOG(Media, "HTMLMediaElement::sourceWasAdded - <source> inserted imm ediately after current source"); 2716 WTF_LOG(Media, "HTMLMediaElement::sourceWasAdded - no current source or <source> inserted immediately after current source");
2717 m_nextChildNodeToConsider = source; 2717 m_nextChildNodeToConsider = source;
2718 return; 2718 return;
2719 } 2719 }
2720 2720
2721 if (m_nextChildNodeToConsider) 2721 if (m_nextChildNodeToConsider)
2722 return; 2722 return;
2723 2723
2724 // 4.8.9.5, resource selection algorithm, source elements section: 2724 // 4.8.9.5, resource selection algorithm, source elements section:
2725 // 21. Wait until the node after pointer is a node other than the end of the list. (This step might wait forever.) 2725 // 21. Wait until the node after pointer is a node other than the end of the list. (This step might wait forever.)
2726 // 22. Asynchronously await a stable state... 2726 // 22. Asynchronously await a stable state...
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 3673
3674 #if ENABLE(WEB_AUDIO) 3674 #if ENABLE(WEB_AUDIO)
3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3676 { 3676 {
3677 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3677 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3678 audioSourceProvider()->setClient(0); 3678 audioSourceProvider()->setClient(0);
3679 } 3679 }
3680 #endif 3680 #endif
3681 3681
3682 } 3682 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698