Bug 103266 - TextTrack's .cues not ordered correctly when two cues have the same .startTime
Summary: TextTrack's .cues not ordered correctly when two cues have the same .startTime
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Antoine Quint
URL: http://w3c-test.org/html/tests/submis...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-11-26 08:50 PST by Antoine Quint
Modified: 2012-12-06 07:24 PST (History)
7 users (show)

See Also:


Attachments
Patch (13.34 KB, patch)
2012-12-06 06:00 PST, Antoine Quint
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Antoine Quint 2012-11-26 08:50:46 PST
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).
Comment 1 Antoine Quint 2012-11-27 01:54:54 PST
<rdar://problem/12756212>
Comment 2 Antoine Quint 2012-12-05 08:16:39 PST
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.
Comment 3 Antoine Quint 2012-12-06 06:00:36 PST
Created attachment 178002 [details]
Patch
Comment 4 WebKit Review Bot 2012-12-06 07:24:06 PST
Comment on attachment 178002 [details]
Patch

Clearing flags on attachment: 178002

Committed r136843: <http://trac.webkit.org/changeset/136843>
Comment 5 WebKit Review Bot 2012-12-06 07:24:11 PST
All reviewed patches have been landed.  Closing bug.