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

Unified Diff: Source/core/html/HTMLTrackElement.cpp

Issue 60423008: Simplify LoadableTextTrack construction (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « Source/core/html/HTMLTrackElement.h ('k') | Source/core/html/HTMLTrackElement.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLTrackElement.cpp
diff --git a/Source/core/html/HTMLTrackElement.cpp b/Source/core/html/HTMLTrackElement.cpp
index 0880daf97af030bb7e3471ca4518c4fbd123c227..8f7eb8e3df403ecc4552a6f69283ce20e61aac70 100644
--- a/Source/core/html/HTMLTrackElement.cpp
+++ b/Source/core/html/HTMLTrackElement.cpp
@@ -124,34 +124,11 @@ void HTMLTrackElement::setKind(const String& kind)
setAttribute(kindAttr, kind);
}
-String HTMLTrackElement::srclang() const
-{
- return getAttribute(srclangAttr);
-}
-
-void HTMLTrackElement::setSrclang(const String& srclang)
-{
- setAttribute(srclangAttr, srclang);
-}
-
-String HTMLTrackElement::label() const
-{
- return getAttribute(labelAttr);
-}
-
-void HTMLTrackElement::setLabel(const String& label)
-{
- setAttribute(labelAttr, label);
-}
-
LoadableTextTrack* HTMLTrackElement::ensureTrack()
{
if (!m_track) {
- // The kind attribute is an enumerated attribute, limited only to know values. It defaults to 'subtitles' if missing or invalid.
- String kind = getAttribute(kindAttr).lower();
- if (!TextTrack::isValidKindKeyword(kind))
- kind = TextTrack::subtitlesKeyword();
- m_track = LoadableTextTrack::create(this, kind, label(), srclang());
+ // kind, label and language are updated by parseAttribute
+ m_track = LoadableTextTrack::create(this);
}
return m_track.get();
}
« no previous file with comments | « Source/core/html/HTMLTrackElement.h ('k') | Source/core/html/HTMLTrackElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698