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 22016 - WebVTT: Check calculation of width and size
Summary: WebVTT: Check calculation of width and size
Status: RESOLVED FIXED
Alias: None
Product: TextTracks CG
Classification: Unclassified
Component: WebVTT (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Philip Jägenstedt
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard: v1
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-13 08:09 UTC by Silvia Pfeiffer
Modified: 2014-05-12 09:24 UTC (History)
3 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2013-05-13 08:09:38 UTC
If the writing direction is right-to-left, it appears that the a cue can go out of bounds.

"If the text track cue writing direction is horizontal, the text track cue alignment is end, and direction is 'rtl'
Let maximum size be the text track cue text position subtracted from 100."
http://dev.w3.org/html5/webvtt/#cues-with-video

"If the text track cue writing direction is horizontal, the text track cue alignment is end, and direction is 'rtl'
Let x-position be the text track cue text position subtracted from 100."
http://dev.w3.org/html5/webvtt/#cues-with-video

For example, at position 44%, width should become 56%, and left 56%.
For a video with width of 100px, this would result in a box from 56px to 112px.

Now if the width is expanding left instead of right this would make sense (0px to 56px) but I cannot find anything that states RTL width expands left. It appears that width is always to the right of the left position.

(Reported by kyle@barnhart.ca)
Comment 1 Silvia Pfeiffer 2013-07-13 07:17:08 UTC
will be resolved as part of bug 20037

*** This bug has been marked as a duplicate of bug 20037 ***
Comment 2 Philip Jägenstedt 2014-05-11 13:10:13 UTC
Reopening since the new spec has the same problem, by removing the maximum width calculation altogether.
Comment 3 Silvia Pfeiffer 2014-05-12 01:13:17 UTC
The arithmetic problem of this bug is fixed, since cue position doesn't influence the width calculation of the text any longer.

When the author specifies "size", we now have a different approach and honour that specification, even if it overflows the video viewport.

However, I believe there is indeed a question about the case where "size" is not specified at all, thus a default width of 100% is assumed. Is this what the author would expect? Likely not.

It's a different bug though, so let's not taint bugs.
Comment 4 Philip Jägenstedt 2014-05-12 09:24:48 UTC
OK, I've filed bug 25660 instead.