We're failing the fourth test of the Opera-submitted test at http://w3c-test.org/html/tests/submission/Opera/media/interfaces/TextTrack/cues.html. Here, we're failing when changing the startTime of cue id2 to be in range 0-2, while the "id" cue is in range 0-1. The test expects the .cues property be ordered as ["id2", "id"]. The spec shows that our implementation is incorrect per this paragraph right at the end of section 4.8.10.12.1: "any cues with the same start time must be sorted by their end time, latest first" (http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#timed-text-tracks).
<rdar://problem/12756212>
It seems we're ordering cues correctly per TextTrackCueList::add(PassRefPtr<TextTrackCue> prpCue, size_t start, size_t end). However, this code is not being called as a result of a cue in a TextTrackList having its startTime or endTime changed. We may want to simply add/remove the cue from the list of cues in TextTrack::cueDidChange() to simply refresh the order. I will try that approach.
Created attachment 178002 [details] Patch
Comment on attachment 178002 [details] Patch Clearing flags on attachment: 178002 Committed r136843: <http://trac.webkit.org/changeset/136843>
All reviewed patches have been landed. Closing bug.