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

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

Issue 691313002: MSE: Implement TrackDefault object (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Address sof@'s PS6 comments and add a couple tests for constructor TypeError Created 6 years, 1 month 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
Index: Source/core/html/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index b95a35dbef448af17805b09669f465e226735144..67c9d5a1b8c286125d0f7e2afe232ab21730a112 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -141,6 +141,22 @@ bool TextTrack::isValidKindKeyword(const AtomicString& value)
return false;
}
+bool TextTrack::isValidKindKeyword(const String& value)
philipj_slow 2014/11/14 12:03:37 AtomicString is free to convert to String (and has
wolenetz 2014/11/17 21:51:07 Done.
+{
+ if (value == subtitlesKeyword())
+ return true;
+ if (value == captionsKeyword())
+ return true;
+ if (value == descriptionsKeyword())
+ return true;
+ if (value == chaptersKeyword())
+ return true;
+ if (value == metadataKeyword())
+ return true;
+
+ return false;
+}
+
void TextTrack::setTrackList(TextTrackList* trackList)
{
if (!trackList && mediaElement() && m_cues)

Powered by Google App Engine
This is Rietveld 408576698