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

Unified Diff: third_party/WebKit/Source/core/html/track/VideoTrack.cpp

Issue 1973343002: Clean up HTMLTrackElement.kind invalid/missing value default handling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « third_party/WebKit/Source/core/html/track/VideoTrack.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/track/VideoTrack.cpp
diff --git a/third_party/WebKit/Source/core/html/track/VideoTrack.cpp b/third_party/WebKit/Source/core/html/track/VideoTrack.cpp
index c2a08890c97243be06cf61fb2880c646ccf64bbe..9903e3a20d06cbdd29c58f52c59dc524ce59c112 100644
--- a/third_party/WebKit/Source/core/html/track/VideoTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/VideoTrack.cpp
@@ -9,10 +9,9 @@
namespace blink {
VideoTrack::VideoTrack(const String& id, const AtomicString& kind, const AtomicString& label, const AtomicString& language, bool selected)
- : TrackBase(WebMediaPlayer::VideoTrack, label, language, id)
+ : TrackBase(WebMediaPlayer::VideoTrack, kind, label, language, id)
, m_selected(selected)
{
- setKind(kind);
}
VideoTrack::~VideoTrack()
@@ -75,18 +74,13 @@ const AtomicString& VideoTrack::commentaryKeyword()
bool VideoTrack::isValidKindKeyword(const String& kind)
{
- return (kind == alternativeKeyword())
- || (kind == captionsKeyword())
- || (kind == mainKeyword())
- || (kind == signKeyword())
- || (kind == subtitlesKeyword())
- || (kind == commentaryKeyword())
- || (kind == emptyAtom);
-}
-
-AtomicString VideoTrack::invalidValueDefaultKind() const
-{
- return emptyAtom;
+ return kind == alternativeKeyword()
+ || kind == captionsKeyword()
+ || kind == mainKeyword()
+ || kind == signKeyword()
+ || kind == subtitlesKeyword()
+ || kind == commentaryKeyword()
+ || kind == emptyAtom;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/track/VideoTrack.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698