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 20146 - WebVTT: Cue text rendering step adjustment
Summary: WebVTT: Cue text rendering step adjustment
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: Silvia Pfeiffer
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-29 03:08 UTC by Silvia Pfeiffer
Modified: 2013-07-08 03:09 UTC (History)
4 users (show)

See Also:


Attachments

Description Silvia Pfeiffer 2012-11-29 03:08:55 UTC
In Section 3.5 WebVTT cue text rendering rules, rendering step 10 we calculate all the styles for the cues.

Step 7 sets the 'width' from 'size':
If the text track cue writing direction is horizontal, then let width be 'size vw' and height be 'auto'. Otherwise, let width be 'auto' and height be 'size vh'. (These are CSS values used by the next section to set CSS properties for the rendering; 'vw' and 'vh' are CSS units.) [CSSVALUES]

Step 10 changes 'size' again in substep 2 and 4 to remove edge margin:
2. If x-position is less than edge margin and the sum of x-position and size is more than edge margin, then increase x-position by edge margin and decrease size by the same amount.

4. If x-position is less than right margin edge, and the sum of x-position and size is more than right margin edge, then decrease size by edge margin.

However, the 'width' calculation from Step 7 is not repeated. Thus, the cues potentially end up being too wide (e.g. 100% width, but offset by an edge margin).

==

I think Step 7 should be moved after Step 10.
Comment 1 Lawrence Forooghian 2013-01-23 10:25:17 UTC
Yes, I noticed this, too.
Comment 2 Silvia Pfeiffer 2013-07-08 03:09:36 UTC
Fixed in https://dvcs.w3.org/hg/text-tracks/rev/c818121c6dfb .