> 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.
It looks like AudioTrackList and VideoTrackList already have it. I think this was added to the spec after those interfaces were created.
Created attachment 217708 [details] Patch
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.
Created attachment 217711 [details] Fix nits
Comment on attachment 217711 [details] Fix nits Clearing flags on attachment: 217711 Committed r159711: <http://trac.webkit.org/changeset/159711>
All reviewed patches have been landed. Closing bug.