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

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: Fixed review comments Created 6 years, 5 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
« no previous file with comments | « LayoutTests/media/media-source-append-multiple-expected.txt ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 2703 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 - <source> inserted imm ediately 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 if (m_loadState != WaitingForSource)
2725 return;
2726
2724 // 4.8.9.5, resource selection algorithm, source elements section: 2727 // 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.) 2728 // 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... 2729 // 22. Asynchronously await a stable state...
2727 // 23. Set the element's delaying-the-load-event flag back to true (this del ays the load event again, in case 2730 // 23. Set the element's delaying-the-load-event flag back to true (this del ays the load event again, in case
2728 // it hasn't been fired yet). 2731 // it hasn't been fired yet).
2729 setShouldDelayLoadEvent(true); 2732 setShouldDelayLoadEvent(true);
2730 2733
2731 // 24. Set the networkState back to NETWORK_LOADING. 2734 // 24. Set the networkState back to NETWORK_LOADING.
2732 m_networkState = NETWORK_LOADING; 2735 m_networkState = NETWORK_LOADING;
2733 2736
(...skipping 939 matching lines...) Expand 10 before | Expand all | Expand 10 after
3673 3676
3674 #if ENABLE(WEB_AUDIO) 3677 #if ENABLE(WEB_AUDIO)
3675 void HTMLMediaElement::clearWeakMembers(Visitor* visitor) 3678 void HTMLMediaElement::clearWeakMembers(Visitor* visitor)
3676 { 3679 {
3677 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider()) 3680 if (!visitor->isAlive(m_audioSourceNode) && audioSourceProvider())
3678 audioSourceProvider()->setClient(0); 3681 audioSourceProvider()->setClient(0);
3679 } 3682 }
3680 #endif 3683 #endif
3681 3684
3682 } 3685 }
OLDNEW
« no previous file with comments | « LayoutTests/media/media-source-append-multiple-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698