| 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 a10491cfbac6f7463e57e54240a6abec84fb8f2e..5a548842dd65eed14c3647a6b1ccc2b816670e15 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -328,6 +328,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
|
| , m_sentEndEvent(false)
|
| , m_closedCaptionsVisible(false)
|
| , m_havePreparedToPlay(false)
|
| + , m_didPerformAutomaticTrackSelection(false)
|
| , m_tracksAreReady(true)
|
| , m_processingPreferenceChange(false)
|
| , m_remoteRoutesAvailable(false)
|
| @@ -1173,6 +1174,11 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack* track)
|
| textTracks()->scheduleChangeEvent();
|
| }
|
|
|
| +void HTMLMediaElement::disableAutomaticTextTrackSelection()
|
| +{
|
| + m_didPerformAutomaticTrackSelection = true;
|
| +}
|
| +
|
| bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionIfInvalid)
|
| {
|
| if (!url.isValid()) {
|
| @@ -2497,6 +2503,9 @@ void HTMLMediaElement::honorUserPreferencesForAutomaticTextTrackSelection()
|
| if (!m_textTracks || !m_textTracks->length())
|
| return;
|
|
|
| + if (m_didPerformAutomaticTrackSelection)
|
| + return;
|
| +
|
| AutomaticTrackSelection::Configuration configuration;
|
| if (m_processingPreferenceChange)
|
| configuration.disableCurrentlyEnabledTracks = true;
|
|
|