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

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

Issue 2617433002: Use the standard downcasting macros for downcasting TextTrack objects. (Closed)
Patch Set: . Created 3 years, 11 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/LoadableTextTrack.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/TextTrackList.cpp
diff --git a/third_party/WebKit/Source/core/html/track/TextTrackList.cpp b/third_party/WebKit/Source/core/html/track/TextTrackList.cpp
index 5defe1dede3e202f61bb418205c131557fb1eeb9..760641d377cf51ee549ffbcd776d359508854914 100644
--- a/third_party/WebKit/Source/core/html/track/TextTrackList.cpp
+++ b/third_party/WebKit/Source/core/html/track/TextTrackList.cpp
@@ -47,7 +47,7 @@ unsigned TextTrackList::length() const {
int TextTrackList::getTrackIndex(TextTrack* textTrack) {
if (textTrack->trackType() == TextTrack::TrackElement)
- return static_cast<LoadableTextTrack*>(textTrack)->trackElementIndex();
+ return toLoadableTextTrack(textTrack)->trackElementIndex();
if (textTrack->trackType() == TextTrack::AddTrack)
return m_elementTracks.size() + m_addTrackTracks.find(textTrack);
@@ -171,7 +171,7 @@ void TextTrackList::append(TextTrack* track) {
m_addTrackTracks.push_back(TraceWrapperMember<TextTrack>(this, track));
} else if (track->trackType() == TextTrack::TrackElement) {
// Insert tracks added for <track> element in tree order.
- size_t index = static_cast<LoadableTextTrack*>(track)->trackElementIndex();
+ size_t index = toLoadableTextTrack(track)->trackElementIndex();
m_elementTracks.insert(index, TraceWrapperMember<TextTrack>(this, track));
} else if (track->trackType() == TextTrack::InBand) {
m_inbandTracks.push_back(TraceWrapperMember<TextTrack>(this, track));
« no previous file with comments | « third_party/WebKit/Source/core/html/track/LoadableTextTrack.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698