Index: Source/core/html/HTMLMediaElement.cpp |
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
index 8166f64bb4cca55ec6ce34ea7310da7de9c3f548..2e7f9801e54e65cc38afbcd0fde33499f681174c 100644 |
--- a/Source/core/html/HTMLMediaElement.cpp |
+++ b/Source/core/html/HTMLMediaElement.cpp |
@@ -39,7 +39,6 @@ |
#include "core/dom/shadow/ShadowRoot.h" |
#include "core/events/Event.h" |
#include "core/frame/LocalFrame.h" |
-#include "core/frame/Settings.h" |
#include "core/frame/UseCounter.h" |
#include "core/frame/csp/ContentSecurityPolicy.h" |
#include "core/html/HTMLMediaSource.h" |
@@ -312,7 +311,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
, m_fragmentStartTime(MediaPlayer::invalidTime()) |
, m_fragmentEndTime(MediaPlayer::invalidTime()) |
, m_pendingActionFlags(0) |
- , m_userGestureRequiredForPlay(false) |
, m_playing(false) |
, m_shouldDelayLoadEvent(false) |
, m_haveFiredLoadedData(false) |
@@ -348,9 +346,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement"); |
ScriptWrappable::init(this); |
- if (document.settings() && document.settings()->mediaPlaybackRequiresUserGesture()) |
- m_userGestureRequiredForPlay = true; |
- |
setHasCustomStyleCallbacks(); |
addElementToDocumentMap(this, &document); |
} |
@@ -697,9 +692,6 @@ void HTMLMediaElement::load() |
{ |
WTF_LOG(Media, "HTMLMediaElement::load()"); |
- if (UserGestureIndicator::processingUserGesture()) |
- m_userGestureRequiredForPlay = false; |
- |
prepareForLoad(); |
loadInternal(); |
prepareToPlay(); |
@@ -947,9 +939,7 @@ void HTMLMediaElement::loadResource(const KURL& url, ContentType& contentType, c |
bool attemptLoad = true; |
if (url.protocolIs(mediaSourceBlobProtocol)) { |
- if (isMediaStreamURL(url.string())) { |
- m_userGestureRequiredForPlay = false; |
- } else { |
+ if (!isMediaStreamURL(url.string())) { |
m_mediaSource = HTMLMediaSource::lookup(url.string()); |
if (m_mediaSource) { |
@@ -1827,7 +1817,7 @@ void HTMLMediaElement::setReadyState(ReadyState state) |
scheduleEvent(EventTypeNames::playing); |
} |
- if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(SandboxAutomaticFeatures) && !m_userGestureRequiredForPlay) { |
+ if (m_autoplaying && m_paused && autoplay() && !document().isSandboxed(SandboxAutomaticFeatures)) { |
m_paused = false; |
invalidateCachedTime(); |
scheduleEvent(EventTypeNames::play); |
@@ -2198,11 +2188,6 @@ void HTMLMediaElement::play() |
{ |
WTF_LOG(Media, "HTMLMediaElement::play()"); |
- if (m_userGestureRequiredForPlay && !UserGestureIndicator::processingUserGesture()) |
- return; |
- if (UserGestureIndicator::processingUserGesture()) |
- m_userGestureRequiredForPlay = false; |
- |
playInternal(); |
} |