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

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

Issue 1687793002: Use effectivePreloadType() where possible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rm m_completelyLoaded Created 4 years, 10 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/html/HTMLMediaElement.h ('k') | 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 ac9168d2f444499ae3a72956d1e57c6db109d421..8409cc89ede628240818008b946f57ac45ed53af 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -323,7 +323,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
, m_sentStalledEvent(false)
, m_sentEndEvent(false)
, m_closedCaptionsVisible(false)
- , m_completelyLoaded(false)
, m_havePreparedToPlay(false)
, m_tracksAreReady(true)
, m_haveVisibleTextTrack(false)
@@ -716,7 +715,6 @@ void HTMLMediaElement::prepareForLoad()
m_sentEndEvent = false;
m_sentStalledEvent = false;
m_haveFiredLoadedData = false;
- m_completelyLoaded = false;
m_havePreparedToPlay = false;
m_displayMode = Unknown;
@@ -964,7 +962,7 @@ void HTMLMediaElement::loadResource(const KURL& url, ContentType& contentType, c
if (attemptLoad && canLoadURL(url, contentType, keySystem)) {
ASSERT(!webMediaPlayer());
- if (!m_havePreparedToPlay && !autoplay() && preloadType() == WebMediaPlayer::PreloadNone) {
+ if (!m_havePreparedToPlay && effectivePreloadType() == WebMediaPlayer::PreloadNone) {
WTF_LOG(Media, "HTMLMediaElement::loadResource(%p) : Delaying load because preload == 'none'", this);
deferLoad();
} else {
@@ -1388,13 +1386,11 @@ void HTMLMediaElement::setNetworkState(WebMediaPlayer::NetworkState state)
if (m_networkState < NETWORK_LOADING || m_networkState == NETWORK_NO_SOURCE)
startProgressEventTimer();
setNetworkState(NETWORK_LOADING);
- m_completelyLoaded = false;
}
if (state == WebMediaPlayer::NetworkStateLoaded) {
if (m_networkState != NETWORK_IDLE)
changeNetworkStateFromLoadingToIdle();
- m_completelyLoaded = true;
}
}
« no previous file with comments | « third_party/WebKit/Source/core/html/HTMLMediaElement.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698