| 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 7a3c5bb811ac9c53744959f8ea10062c0685cee2..f3ffb2508e0225f35aec99522faa4dd8bc4ae95c 100644
|
| --- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
|
| @@ -323,6 +323,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
|
| , m_closedCaptionsVisible(false)
|
| , m_completelyLoaded(false)
|
| , m_havePreparedToPlay(false)
|
| + , m_didPerformAutomaticTrackSelection(false)
|
| , m_tracksAreReady(true)
|
| , m_haveVisibleTextTrack(false)
|
| , m_processingPreferenceChange(false)
|
| @@ -1168,6 +1169,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()) {
|
| @@ -2494,6 +2500,9 @@ void HTMLMediaElement::honorUserPreferencesForAutomaticTextTrackSelection()
|
| if (!m_textTracks || !m_textTracks->length())
|
| return;
|
|
|
| + if (m_didPerformAutomaticTrackSelection)
|
| + return;
|
| +
|
| AutomaticTrackSelection::Configuration configuration;
|
| if (m_processingPreferenceChange)
|
| configuration.disableCurrentlyEnabledTracks = true;
|
|
|