Chromium Code Reviews| Index: Source/core/html/track/TextTrack.cpp |
| diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp |
| index 54f2cbdec176b2a2c6a4aefe59f6fb5adc5abd34..ceebcb4cd483321433f0bb44359b21587593c497 100644 |
| --- a/Source/core/html/track/TextTrack.cpp |
| +++ b/Source/core/html/track/TextTrack.cpp |
| @@ -156,8 +156,11 @@ void TextTrack::setKind(const AtomicString& newKind) |
| AtomicString oldKind = kind(); |
| TrackBase::setKind(newKind); |
| - if (mediaElement() && oldKind != kind()) |
| - mediaElement()->textTrackKindChanged(this); |
| + // If kind changes from visual to non-visual and mode is 'showing', then force mode to 'hidden'. |
|
philipj_slow
2015/02/23 13:41:46
Does this correspond to anything in the HTML spec?
fs
2015/02/23 14:00:02
AFAIK, no. The spec says "The kind of track can ch
|
| + if (oldKind != kind() && mode() == showingKeyword()) { |
| + if (kind() != captionsKeyword() && kind() != subtitlesKeyword()) |
| + setMode(hiddenKeyword()); |
| + } |
| } |
| void TextTrack::setMode(const AtomicString& mode) |