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

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

Issue 1809023003: Measure the impact of a proposed media element load algorithm change (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | 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 5a14ea40e1bed286a555021ffa380d58d79e775f..9cf088ea4a43868bb36da0181b2db08f23d4ea81 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -795,6 +795,13 @@ void HTMLMediaElement::invokeLoadAlgorithm()
// 4.10 - Update the duration attribute to Not-a-Number (NaN).
cueTimeline().updateActiveCues(0);
+ } else if (!m_paused) {
+ // TODO(philipj): There is a proposal to always reset the paused state
+ // in the media element load algorithm, to avoid a bogus play() promise
+ // rejection: https://github.com/whatwg/html/issues/869
+ // This is where that change would have an effect, and it is measured to
+ // verify the assumption that it's a very rare situation.
+ UseCounter::count(document(), UseCounter::HTMLMediaElementLoadNetworkEmptyNotPaused);
}
// 5 - Set the playbackRate attribute to the value of the defaultPlaybackRate attribute.
« no previous file with comments | « third_party/WebKit/Source/core/frame/UseCounter.h ('k') | tools/metrics/histograms/histograms.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698