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 14628 - <track> In step 6-7, only consume the character if it is a ':'
Summary: <track> In step 6-7, only consume the character if it is a ':'
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: 2011-10-31 13:14 UTC by contributor
Modified: 2012-07-18 18:41 UTC (History)
3 users (show)

See Also:


Attachments

Description contributor 2011-10-31 13:14:44 UTC
Specification: http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html
Multipage: http://www.whatwg.org/C#parse-the-webvtt-settings
Complete: http://www.whatwg.org/c#parse-the-webvtt-settings

Comment:
In step 6-7, only consume the character if it is a ':'

Posted from: 2001:4c28:a030:30:72f3:95ff:fe00:4501
User agent: Opera/9.80 (X11; Linux x86_64; U; sv) Presto/2.9.168 Version/11.51
Comment 1 Fredrik S 2011-10-31 13:23:11 UTC
It seems it would be better from an error recovery PoV to not consume a character in step 7 unless it was a colon.

Consider the input "X A:middle".

Step 4 reads and consumes the "X".
Step 6 sets 'setting' to "" (since " " != ":").
Step 7 consumes " ".
Step 9 consumes the rest of the string (via "Otherwise...").

If steps 6-7 did not consume anything but a ':', it would instead be:

Step 4 reads and consumes the "X".
Step 6 sets 'setting' to "" (since " " != ":").
Step 9 consumes nothing
Step 4 reads and consumes the "A"
...
Comment 2 Simon Pieters 2011-10-31 22:16:15 UTC
I think maybe we should allow some whitespace here, so that you can write e.g.

   A : middle
Comment 3 Ian 'Hixie' Hickson 2011-11-01 02:10:53 UTC
Oops, yeah, the handling here is poor. I'll fix that.

I disagree with comment 2; the idea is that each setting is a separate space-separated token.
Comment 4 Ian 'Hixie' Hickson 2011-11-01 16:17:50 UTC
Fixed in r6806; sorry, I typoed the bug number in the checkin comment.