| Index: Source/core/html/HTMLMediaElement.cpp
|
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
|
| index 299905f7c3714f256eb3b03a50adc27a9ba2b08b..8e3867c081e406ea2f6cffeafb397082243ac060 100644
|
| --- a/Source/core/html/HTMLMediaElement.cpp
|
| +++ b/Source/core/html/HTMLMediaElement.cpp
|
| @@ -363,6 +363,7 @@ HTMLMediaElement::HTMLMediaElement(const QualifiedName& tagName, Document& docum
|
| , m_audioTracks(AudioTrackList::create(*this))
|
| , m_videoTracks(VideoTrackList::create(*this))
|
| , m_textTracks(nullptr)
|
| + , m_performAutomaticTextTrackSelection(true)
|
| #if ENABLE(WEB_AUDIO)
|
| , m_audioSourceNode(nullptr)
|
| #endif
|
| @@ -1167,6 +1168,11 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack* track)
|
| textTracks()->scheduleChangeEvent();
|
| }
|
|
|
| +void HTMLMediaElement::setAutomaticTextTrackSelection(bool enabled)
|
| +{
|
| + m_performAutomaticTextTrackSelection = enabled;
|
| +}
|
| +
|
| bool HTMLMediaElement::isSafeToLoadURL(const KURL& url, InvalidURLAction actionIfInvalid)
|
| {
|
| if (!url.isValid()) {
|
| @@ -2481,6 +2487,9 @@ void HTMLMediaElement::honorUserPreferencesForAutomaticTextTrackSelection()
|
| if (!m_textTracks || !m_textTracks->length())
|
| return;
|
|
|
| + if (!m_performAutomaticTextTrackSelection)
|
| + return;
|
| +
|
| AutomaticTrackSelection::Configuration configuration;
|
| if (m_processingPreferenceChange)
|
| configuration.disableCurrentlyEnabledTracks = true;
|
|
|