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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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 2 * Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after
943 m_nextChildNodeToConsider = element; 943 m_nextChildNodeToConsider = element;
944 m_currentSourceNode = nullptr; 944 m_currentSourceNode = nullptr;
945 } else { 945 } else {
946 // Otherwise the media element has no assigned media provider object and 946 // Otherwise the media element has no assigned media provider object and
947 // has neither a src attribute nor a source element child: set the 947 // has neither a src attribute nor a source element child: set the
948 // networkState to kNetworkEmpty, and abort these steps; the synchronous 948 // networkState to kNetworkEmpty, and abort these steps; the synchronous
949 // section ends. 949 // section ends.
950 m_loadState = WaitingForSource; 950 m_loadState = WaitingForSource;
951 setShouldDelayLoadEvent(false); 951 setShouldDelayLoadEvent(false);
952 setNetworkState(kNetworkEmpty); 952 setNetworkState(kNetworkEmpty);
953 // Also reset the maximum ready state, since load() will not do that when
954 // the network state is kNetworkEmpty.
955 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
953 updateDisplayState(); 956 updateDisplayState();
954 957
955 BLINK_MEDIA_LOG << "selectMediaResource(" << (void*)this 958 BLINK_MEDIA_LOG << "selectMediaResource(" << (void*)this
956 << "), nothing to load"; 959 << "), nothing to load";
957 return; 960 return;
958 } 961 }
959 962
960 // 7 - Set the media element's networkState to NETWORK_LOADING. 963 // 7 - Set the media element's networkState to NETWORK_LOADING.
961 setNetworkState(kNetworkLoading); 964 setNetworkState(kNetworkLoading);
962 965
(...skipping 3168 matching lines...) Expand 10 before | Expand all | Expand 10 after
4131 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE); 4134 kMostlyFillViewportBecomeStableSeconds, BLINK_FROM_HERE);
4132 } 4135 }
4133 4136
4134 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) { 4137 void HTMLMediaElement::viewportFillDebouncerTimerFired(TimerBase*) {
4135 m_mostlyFillingViewport = true; 4138 m_mostlyFillingViewport = true;
4136 if (m_webMediaPlayer) 4139 if (m_webMediaPlayer)
4137 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport); 4140 m_webMediaPlayer->becameDominantVisibleContent(m_mostlyFillingViewport);
4138 } 4141 }
4139 4142
4140 } // namespace blink 4143 } // namespace blink
OLDNEW
« 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