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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp

Issue 2616803002: Clear m_readyStateMaximum when there is no source.
Patch Set: Remove duplicate assignment. Created 3 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index ececc0032f57cb4c49c5cadaef855936f65caa32..e7f93c269f6ad39df5ce7782aa3cd6227c93eb3f 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -950,6 +950,9 @@ void HTMLMediaElement::selectMediaResource() {
m_loadState = WaitingForSource;
setShouldDelayLoadEvent(false);
setNetworkState(kNetworkEmpty);
+ // Also reset the maximum ready state, since load() will not do that when
+ // the network state is kNetworkEmpty.
+ m_readyStateMaximum = kHaveNothing;
foolip 2017/01/26 05:06:56 At this point, why has m_readyState and m_readySta
sandersd (OOO until July 31) 2017/01/26 19:17:16 What we're seeing here is basically a race conditi
foolip 2017/01/27 06:23:07 Right, adding and removing a source element is how
sandersd (OOO until July 31) 2017/01/27 19:19:47 I don't think it makes sense to clear these values
foolip 2017/02/21 06:59:14 I'm still not clear on how exactly we end up in th
sandersd (OOO until July 31) 2017/04/01 00:17:28 Here is a complete reproduction sequence that I ha
foolip 2017/04/04 04:09:50 After this point, is it possible to play anything?
sandersd (OOO until July 31) 2017/04/04 19:03:52 No, playback is not possible at this point. The c
foolip 2017/04/05 04:46:40 Good points. One could reset just the readyState a
mlamouri (slow - plz ping) 2017/04/18 14:00:13 I would be happy with this "not most robust fix" i
foolip 2017/04/21 16:03:47 sandersd@, do you want to try the fix outlined abo
updateDisplayState();
BLINK_MEDIA_LOG << "selectMediaResource(" << (void*)this
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698