Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(709)

Unified Diff: Source/core/html/track/TextTrack.cpp

Issue 924273004: Remove HTMLMediaElement::textTrackKindChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Drop redundant TextTrack::. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698