Skip to content

Commit

Permalink
[giow] (1) Step one: Make snap-to-line cues not overlap the overscan …
Browse files Browse the repository at this point in the history
…area in the direction of the line stacking (i.e. vertically for english captions).

Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16864
Affected topics: Video Text Tracks

git-svn-id: http://svn.whatwg.org/webapps@7446 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 9, 2012
1 parent 61853aa commit 19eadad
Showing 1 changed file with 72 additions and 34 deletions.
106 changes: 72 additions & 34 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -114438,6 +114438,45 @@ iframe[seamless] { display: block; }

<ol>

<li>

<p><strong>Horizontal</strong>: Let <var title="">margin</var> be a user-agent-defined
vertical length which will be used to define a margin at the top and bottom edges of the
video into which cues will not be placed. In situations with overscan, this margin should
be sufficient to place all cues within the title-safe area. In the absence of overscan,
this value should be picked for aesthetics (to avoid text being aligned precisely on the
bottom edge of the video, which can be ugly).</p>

<p><strong>Vertical</strong>: Let <var title="">margin</var> be a user-agent-defined
horizontal length which will be used to define a margin at the left and right edges of the
video into which cues will not be placed. In situations with overscan, this margin should
be sufficient to place all cues within the title-safe area. In the absence of overscan,
this value should be picked for aesthetics (to avoid text being aligned precisely on the
left or right edges of the video, which can be ugly).</p>

</li>

<li>

<p><strong>Horizontal</strong>: Let <var title="">full dimension</var> be the height of
<var title="">video</var>'s rendering area.</p>

<p><strong>Vertical</strong>: Let <var title="">full dimension</var> be the width of <var
title="">video</var>'s rendering area.</p>

<p>These dimensions must not be adjusted for overscan. (The algorithm does that
separately.)</p>

</li>

<li>

<p>Let <var title="">max dimension</var> be <span title=""><var
title="">full&nbsp;dimension</var>&nbsp;-&nbsp;(2&nbsp;&times;&nbsp;<var
title="">margin</var>)</span>.</p>

</li>

<li>

<p><strong>Horizontal</strong>: Let <var title="">step</var>
Expand Down Expand Up @@ -114470,19 +114509,12 @@ iframe[seamless] { display: block; }

<li>

<p><strong>Horizontal</strong>: If <var title="">line
position</var> is less than zero then increase <var
title="">position</var> by the height of the <var
title="">video</var>'s rendering area, and negate <var
title="">step</var> (so its value is now minus the height of
the first line box in <var title="">boxes</var>).</p>

<p><strong>Vertical</strong>: If <var title="">line
position</var> is less than zero then increase <var
title="">position</var> by the width of the <var
title="">video</var>'s rendering area, and negate <var
<p>If <var title="">line position</var> is less than zero then increase <var
title="">position</var> by <var title="">max dimension</var>, and negate <var
title="">step</var>.</p>

<p>Otherwise, increase <var title="">position</var> by <var title="">margin</var>.</p>

</li>

<li>
Expand All @@ -114503,32 +114535,38 @@ iframe[seamless] { display: block; }

<li><p>Let <var title="">switched</var> be false.</p></li>

<li><p><i>Step loop</i>: If none of the boxes in <var
title="">boxes</var> would overlap any of the boxes in <var
title="">output</var>, and all the boxes in <var
title="">output</var> are within the <var
title="">video</var>'s rendering area, then jump to the step
labeled <i>done positioning</i> below.</p></li>
<li>

<p><strong>Horizontal</strong>: Let <var title="">title area</var> be a box that covers
all of the <var title="">video</var>'s rendering area except for a height of <var
title="">margin</var> at the top of the rendering area and a height of <var
title="">margin</var> at the bottom of the rendering area.</p>

<p><strong>Vertical</strong>: Let <var title="">title area</var> be a box that covers all
of the <var title="">video</var>'s rendering area except for a width of <var
title="">margin</var> at the left of the rendering area and a width of <var
title="">margin</var> at the right of the rendering area.</p>

</li>

<li><p><i>Step loop</i>: If none of the boxes in <var title="">boxes</var> would overlap
any of the boxes in <var title="">output</var>, and all of the boxes in <var
title="">output</var> are entirely within the <var title="">title area</var> box, then jump
to the step labeled <i>done positioning</i> below.</p></li>

<li>

<p><strong>Horizontal</strong>: If <var title="">step</var>
is negative and the top of the first line box in <var
title="">boxes</var> is now above the top of the <var
title="">video</var>'s rendering area, or if <var
title="">step</var> is positive and the bottom of the first
line box in <var title="">boxes</var> is now below the
bottom of the <var title="">video</var>'s rendering area,
jump to the step labeled <i>switch direction</i>.</p>

<p><strong>Vertical</strong>: If <var title="">step</var> is
negative and the left edge of the first line box in <var
title="">boxes</var> is now to the left of the left edge of
the <var title="">video</var>'s rendering area, or if <var
title="">step</var> is positive and the right edge of the
first line box in <var title="">boxes</var> is now to the
right of the right edge of the <var title="">video</var>'s
rendering area, jump to the step labeled <i>switch
<p><strong>Horizontal</strong>: If <var title="">step</var> is negative and the top of the
first line box in <var title="">boxes</var> is now above the top of the <var
title="">title area</var>, or if <var title="">step</var> is positive and the bottom of
the first line box in <var title="">boxes</var> is now below the bottom of the <var
title="">title area</var>, jump to the step labeled <i>switch direction</i>.</p>

<p><strong>Vertical</strong>: If <var title="">step</var> is negative and the left edge of
the first line box in <var title="">boxes</var> is now to the left of the left edge of the
<var title="">title area</var>, or if <var title="">step</var> is positive and the right
edge of the first line box in <var title="">boxes</var> is now to the right of the right
edge of the <var title="">title area</var>, jump to the step labeled <i>switch
direction</i>.</p>

</li>
Expand Down

0 comments on commit 19eadad

Please sign in to comment.