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 14570 - <track> In section 4.8.10.12.1/"A line position"/"text track cue computed line position" algorithm: It seems better to let the step 5 be "Increment n by one"
Summary: <track> In section 4.8.10.12.1/"A line position"/"text track cue computed lin...
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-27 09:09 UTC by contributor
Modified: 2012-07-18 18:40 UTC (History)
4 users (show)

See Also:


Attachments

Description contributor 2011-10-27 09:09:45 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:
In section 4.8.10.12.1/"A line position"/"text track cue computed line
position" algorithm: It seems better to let the step 5 be "Increment n by one"
instead to get a mapping as: 0, 1, 2, 3... -> -1, -2, -3, -4... ; instead of
0, 1, 2, 3... -> 1, 0, -1, -2...

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 Ian 'Hixie' Hickson 2011-11-01 06:11:06 UTC
Can you elaborate?
Comment 2 Fredrik S 2011-11-01 07:56:34 UTC
It is my understanding that (assuming horizontal writing direction) non-negative values in this context mean "N:th line from the top", while negative values mean "N:th line from the bottom" (possibly with "(N+1):th" for the non-negative case to handle 0). Given the mapping:

  0, 1, 2, 3... -> 1, 0, -1, -2... (i.e a line function lp = -(N - 1))

the first track would get primary placement on the second line from the top, while the second would get the first line and the third would be the first from the bottom.

With the suggested mapping:

  0, 1, 2, 3... -> -1, -2, -3, -4... (function lp = -(N + 1))

the first track would get the first line from the bottom, the second would get the second et.c.

Furthermore it seems that a good default placement in the trivial case of one track and one cue from said track with the default position (which would be 'auto') would be as the first line from the bottom.
Comment 3 Ian 'Hixie' Hickson 2011-11-01 16:58:11 UTC
Oh, I see what you're saying. Yeah, I got my steps backwards there (decrement then negate rather than negate then decrement). I'll fix it the way you suggest. Sorry, I was being a bit slow there trying to work out what you were talking about.
Comment 4 Ian 'Hixie' Hickson 2011-11-01 17:00:40 UTC
BTW, the reason I was confused is that the mapping the spec used to have is so obviously completely bogus yet your tone was so polite regarding it (e.g. "it seems better" as opposed to "the current text is just flat out wrong") that I was looking for a much more subtle problem! :-)
Comment 5 contributor 2011-11-01 17:00:51 UTC
Checked in as WHATWG revision r6809.
Check-in comment: I got the steps backwards here.
http://html5.org/tools/web-apps-tracker?from=6808&to=6809