RESOLVED FIXED 124785
Add TextTrackList::getTrackById().
https://bugs.webkit.org/show_bug.cgi?id=124785
Summary Add TextTrackList::getTrackById().
Brendan Long
Reported 2013-11-22 11:36:53 PST
> The getTrackById(id) method must return the first TextTrack in the TextTrackList object whose id IDL attribute would return a value equal to the value of the id argument. When no tracks match the given argument, the method must return null. http://www.w3.org/TR/html5/embedded-content-0.html#dom-texttracklist-gettrackbyid > The AudioTrackList.getTrackById(id) and VideoTrackList.getTrackById(id) methods must return the first AudioTrack or VideoTrack object (respectively) in the AudioTrackList or VideoTrackList object (respectively) whose identifier is equal to the value of the id argument (in the natural order of the list, as defined above). When no tracks match the given argument, the methods must return null. The getTrackById(id) method must return the first TextTrack in the TextTrackList object whose id IDL attribute would return a value equal to the value of the id argument. When no tracks match the given argument, the method must return null.
Attachments
Patch (6.69 KB, patch)
2013-11-22 12:37 PST, Brendan Long
no flags
Fix nits (6.69 KB, patch)
2013-11-22 13:04 PST, Brendan Long
no flags
Brendan Long
Comment 1 2013-11-22 11:38:52 PST
It looks like AudioTrackList and VideoTrackList already have it. I think this was added to the spec after those interfaces were created.
Brendan Long
Comment 2 2013-11-22 12:37:38 PST
Eric Carlson
Comment 3 2013-11-22 12:50:56 PST
Comment on attachment 217708 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=217708&action=review > Source/WebCore/html/track/TextTrackList.cpp:143 > + return 0; Nit: nullptr > Source/WebCore/html/track/TextTrackList.h:51 > + TextTrack* getTrackById(const AtomicString& id); Nit: "id" is unnecessary.
Brendan Long
Comment 4 2013-11-22 13:04:26 PST
Created attachment 217711 [details] Fix nits
WebKit Commit Bot
Comment 5 2013-11-22 13:41:55 PST
Comment on attachment 217711 [details] Fix nits Clearing flags on attachment: 217711 Committed r159711: <http://trac.webkit.org/changeset/159711>
WebKit Commit Bot
Comment 6 2013-11-22 13:41:57 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.