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 18212 - <track> Need to await a stable state before assigning /URL/ in the first run
Summary: <track> Need to await a stable state before assigning /URL/ in the first run
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: HTML5 spec (show other bugs)
Version: unspecified
Hardware: Other other
: P3 normal
Target Milestone: ---
Assignee: Silvia Pfeiffer
QA Contact: HTML WG Bugzilla archive list
URL: http://www.whatwg.org/specs/web-apps/...
Whiteboard:
Keywords: CR
Depends on:
Blocks:
 
Reported: 2012-07-18 17:42 UTC by contributor
Modified: 2013-06-06 07:32 UTC (History)
5 users (show)

See Also:


Attachments

Description contributor 2012-07-18 17:42:00 UTC
This was was cloned from bug 17157 as part of operation convergence.
Originally filed: 2012-05-23 12:20:00 +0000

================================================================================
 #0   contributor@whatwg.org                          2012-05-23 12:20:15 +0000 
--------------------------------------------------------------------------------
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#sourcing-out-of-band-text-tracks
Complete: http://www.whatwg.org/c#sourcing-out-of-band-text-tracks

Comment:
<track> Need to await a stable state before assigning /URL/ in the first run

Posted from: 85.227.154.145 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
================================================================================
 #1   Simon Pieters                                   2012-05-23 12:26:18 +0000 
--------------------------------------------------------------------------------
Consider

var track = document.createElement('track');
track.src = 'foo';

When the track is created, the loading algorithm starts, which immediately stores the track URL (which is the empty string) and runs the /download/ step async. That step says to fire an 'error' event if track URL is empty and then move on to the /monitoring/ step. Since it's async, it's racy as to whether the script will have set .src yet or not.

This is clearly bogus. We should await a stable state before storing /URL/ and starting the download.

Editorial comment: Since the same behavior should happen after the /monitoring/ step, these steps could be at the top of the /download/ so you don't need to have the exact same steps repeated in two places in the algorithm.
================================================================================
 #2   Simon Pieters                                   2012-05-23 17:38:48 +0000 
--------------------------------------------------------------------------------
(In reply to comment #1)
> Consider
> 
> var track = document.createElement('track');
> track.src = 'foo';

Make that:

var track = document.createElement('track');
track.mode = 'showing';
track.src = 'foo';
================================================================================
 #3   Simon Pieters                                   2012-06-04 05:21:34 +0000 
--------------------------------------------------------------------------------
*** Bug 17156 has been marked as a duplicate of this bug. ***
================================================================================
Comment 1 Silvia Pfeiffer 2013-06-06 07:32:33 UTC
EDITOR'S RESPONSE: This is an Editor's Response to your comment. If you are
satisfied with this response, please change the state of this bug to CLOSED. If
you have additional information and would like the Editor to reconsider, please
reopen this bug. If you would like to escalate the issue to the full HTML
Working Group, please add the TrackerRequest keyword to this bug, and suggest
title and text for the Tracker Issue; or you may create a Tracker Issue
yourself, if you are able to do so. For more details, see this document:

  http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Accepted

Change Description: already applied
http://www.w3.org/html/wg/drafts/html/master/single-page.html#sourcing-out-of-band-text-tracks

Rationale:
Step 5 of the algorithm to "start the track processing model for a text track and its track element" awaits a stable state.

I think this was included in a patch since you registered the bug.