This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 17319 - <track> Sort cues by insertion order, not creation order
Summary: <track> Sort cues by insertion order, not creation order
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-05 09:33 UTC by contributor
Modified: 2012-09-12 07:20 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2012-06-05 09:33:11 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#text-track-model
Complete: http://www.whatwg.org/c#text-track-model

Comment:
<track> Sort cues by insertion order, not creation order

Posted from: 85.227.152.202 by simonp@opera.com
User agent: Opera/9.80 (Macintosh; Intel Mac OS X 10.7.3; U; en) Presto/2.10.229 Version/11.64
Comment 1 Simon Pieters 2012-06-05 09:34:38 UTC
"any cues with identical end times must be sorted in the order they were created (so e.g. for cues from a WebVTT file, that would be the order in which the cues were listed in the file)"

Order they were created seems wrong for DOM-created cues. It should be in the order they were added with addCue()

var c1 = new TextTrackCue(...); var c2 = new TextTrackCue(...); cues.addCue(c2); cues.addCue(c1); // order should be c2, c1
cues.removeCue(c2); cues.addCue(c2); // order should now be c1, c2
Comment 2 Simon Pieters 2012-06-05 11:24:09 UTC
Insertion order should be for parsed cues as well, of course; in case a parsed cue is removed and readded.
Comment 3 contributor 2012-07-18 17:43:10 UTC
This bug was cloned to create bug 18217 as part of operation convergence.
Comment 4 contributor 2012-09-12 07:20:06 UTC
Checked in as WHATWG revision r7339.
Check-in comment: Fix the order of cues to handle dynamic changes better.
http://html5.org/tools/web-apps-tracker?from=7338&to=7339