[Webkit-unassigned] [Bug 114330] Refactor TextTrack and TextTrackList to make it easier to add audio and video tracks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Apr 12 10:35:46 PDT 2013
https://bugs.webkit.org/show_bug.cgi?id=114330
--- Comment #19 from Jer Noble <jer.noble at apple.com> 2013-04-12 10:34:00 PST ---
I really don't like all the static_cast<TextTrack*> going on in TextTrackList. Perhaps add the following to TextTrack.h?:
TextTrack* toTextTrack(TrackBase* track)
{
ASSERT(track->type() == TrackBase::TextTrack);
return static_cast<TextTrack*>(track);
}
Similar functions could go into AudioTrack.h and VideoTrack.h.
Then replace all the explicit casts with calls to toTextTrack(), and if ever another type sneaks into a TextTrackList, it'll be caught by this assert.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list