Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 8166f64bb4cca55ec6ce34ea7310da7de9c3f548..dac8ad66b26559c5871df1ccaac7bad1137869d1 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -312,7 +312,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 +347,6 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum |
| WTF_LOG(Media, "HTMLMediaElement::HTMLMediaElement"); |
| ScriptWrappable::init(this); |
| - if (document.settings() && document.settings()->mediaPlaybackRequiresUserGesture()) |
|
philipj_slow
2014/07/22 22:57:16
This was the last user of Settings, so the Setting
|
| - m_userGestureRequiredForPlay = true; |
| - |
| setHasCustomStyleCallbacks(); |
| addElementToDocumentMap(this, &document); |
| } |
| @@ -697,9 +693,6 @@ void HTMLMediaElement::load() |
| { |
| WTF_LOG(Media, "HTMLMediaElement::load()"); |
| - if (UserGestureIndicator::processingUserGesture()) |
| - m_userGestureRequiredForPlay = false; |
| - |
| prepareForLoad(); |
| loadInternal(); |
| prepareToPlay(); |
| @@ -947,9 +940,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 +1818,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 +2189,6 @@ void HTMLMediaElement::play() |
| { |
| WTF_LOG(Media, "HTMLMediaElement::play()"); |
| - if (m_userGestureRequiredForPlay && !UserGestureIndicator::processingUserGesture()) |
| - return; |
| - if (UserGestureIndicator::processingUserGesture()) |
| - m_userGestureRequiredForPlay = false; |
| - |
| playInternal(); |
| } |