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

Unified Diff: third_party/WebKit/Source/core/html/track/AudioTrack.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
Index: third_party/WebKit/Source/core/html/track/AudioTrack.cpp
diff --git a/third_party/WebKit/Source/core/html/track/AudioTrack.cpp b/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
index b7d32c5ff64f87da31aaf79da0c201f5788764e5..e24173b4cec788a91589246d8f25e90d4a8c28e9 100644
--- a/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
+++ b/third_party/WebKit/Source/core/html/track/AudioTrack.cpp
@@ -9,10 +9,9 @@
namespace blink {
AudioTrack::AudioTrack(const String& id, const AtomicString& kind, const AtomicString& label, const AtomicString& language, bool enabled)
- : TrackBase(WebMediaPlayer::AudioTrack, label, language, id)
+ : TrackBase(WebMediaPlayer::AudioTrack, kind, label, language, id)
, m_enabled(enabled)
{
- setKind(kind);
}
AudioTrack::~AudioTrack()
@@ -73,18 +72,13 @@ const AtomicString& AudioTrack::commentaryKeyword()
bool AudioTrack::isValidKindKeyword(const String& kind)
{
- return (kind == alternativeKeyword())
- || (kind == descriptionsKeyword())
- || (kind == mainKeyword())
- || (kind == mainDescriptionsKeyword())
- || (kind == translationKeyword())
- || (kind == commentaryKeyword())
- || (kind == emptyAtom);
-}
-
-AtomicString AudioTrack::invalidValueDefaultKind() const
-{
- return emptyAtom;
+ return kind == alternativeKeyword()
+ || kind == descriptionsKeyword()
+ || kind == mainKeyword()
+ || kind == mainDescriptionsKeyword()
+ || kind == translationKeyword()
+ || kind == commentaryKeyword()
+ || kind == emptyAtom;
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/html/track/AudioTrack.h ('k') | third_party/WebKit/Source/core/html/track/InbandTextTrack.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698