[html5] r7447 - [giow] (1) Step two: Make snap-to-line cues not overlap the overscan area in the [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Oct 9 15:55:14 PDT 2012


Author: ianh
Date: 2012-10-09 15:55:13 -0700 (Tue, 09 Oct 2012)
New Revision: 7447

Modified:
   complete.html
   index
   source
Log:
[giow] (1) Step two: Make snap-to-line cues not overlap the overscan area in the direction of the text (i.e. horizontally for english captions).
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=16864
Affected topics: Video Text Tracks

Modified: complete.html
===================================================================
--- complete.html	2012-10-09 21:30:22 UTC (rev 7446)
+++ complete.html	2012-10-09 22:55:13 UTC (rev 7447)
@@ -33979,11 +33979,17 @@
 
    <dt><dfn id=text-track-cue-snap-to-lines-flag title="text track cue snap-to-lines flag">A snap-to-lines flag</dfn>
    <dd>
+
     <p>A boolean indicating whether the <a href=#text-track-cue-line-position title="text track cue
     line position">line's position</a> is a line position
     (positioned to a multiple of the line dimensions of the first line
     of the cue), or whether it is a percentage of the dimension of the
     video.</p>
+
+    <p>Cues whose <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> is set will be placed within the
+    title-safe area on user agents that use overscan. Cues with the flag unset will be positioned as
+    requested (modulo overlap avoidance if multiple cues are in the same place).</p>
+
    </dd>
 
    <dt><dfn id=text-track-cue-line-position title="text track cue line position">A line position</dfn>

Modified: index
===================================================================
--- index	2012-10-09 21:30:22 UTC (rev 7446)
+++ index	2012-10-09 22:55:13 UTC (rev 7447)
@@ -33979,11 +33979,17 @@
 
    <dt><dfn id=text-track-cue-snap-to-lines-flag title="text track cue snap-to-lines flag">A snap-to-lines flag</dfn>
    <dd>
+
     <p>A boolean indicating whether the <a href=#text-track-cue-line-position title="text track cue
     line position">line's position</a> is a line position
     (positioned to a multiple of the line dimensions of the first line
     of the cue), or whether it is a percentage of the dimension of the
     video.</p>
+
+    <p>Cues whose <a href=#text-track-cue-snap-to-lines-flag>text track cue snap-to-lines flag</a> is set will be placed within the
+    title-safe area on user agents that use overscan. Cues with the flag unset will be positioned as
+    requested (modulo overlap avoidance if multiple cues are in the same place).</p>
+
    </dd>
 
    <dt><dfn id=text-track-cue-line-position title="text track cue line position">A line position</dfn>

Modified: source
===================================================================
--- source	2012-10-09 21:30:22 UTC (rev 7446)
+++ source	2012-10-09 22:55:13 UTC (rev 7447)
@@ -37234,11 +37234,17 @@
 
    <dt><dfn title="text track cue snap-to-lines flag">A snap-to-lines flag</dfn>
    <dd>
+
     <p>A boolean indicating whether the <span title="text track cue
     line position">line's position</span> is a line position
     (positioned to a multiple of the line dimensions of the first line
     of the cue), or whether it is a percentage of the dimension of the
     video.</p>
+
+    <p>Cues whose <span>text track cue snap-to-lines flag</span> is set will be placed within the
+    title-safe area on user agents that use overscan. Cues with the flag unset will be positioned as
+    requested (modulo overlap avoidance if multiple cues are in the same place).</p>
+
    </dd>
 
    <dt><dfn title="text track cue line position">A line position</dfn>
@@ -114313,6 +114319,80 @@
 
      </li>
 
+     <li>
+
+      <p>If the <span>text track cue snap-to-lines flag</span> is set, then run the appropriate
+      steps from the following list:</p>
+
+      <dl class="switch">
+
+       <dt>If the <span>text track cue writing direction</span> is <span title="text track cue horizontal writing direction">horizontal</span></dt>
+       <dd>
+
+        <ol>
+
+         <li><p>Let <var title="">edge margin</var> be a user-agent-defined horizontal length,
+         expressed as a percentage of the width of the <var title="">video</var>'s rendering area,
+         which will be used to define a margin at the left and right edges of the video into which
+         this cue will not be placed. In situations with overscan, this margin should be sufficient
+         to place the cue 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 edge
+         of the video, which can be ugly).</p></li>
+
+         <li><p>If <var title="">x-position</var> is less than <var title="">edge margin</var> and
+         the sum of <var title="">x-position</var> and <var title="">size</var> is more than <var
+         title="">edge margin</var>, then increase <var title="">x-position</var> by <var
+         title="">edge margin</var> and decrease <var title="">size</var> by the same
+         amount.</p></li>
+
+         <li><p>Let <var title="">right margin edge</var> be 100 minus <var title="">edge
+         margin</var>.</p></li>
+
+         <li><p>If <var title="">x-position</var> is less than <var title="">right margin
+         edge</var>, and the sum of <var title="">x-position</var> and <var title="">size</var> is
+         more than <var title="">right margin edge</var>, then decrease <var title="">size</var> by
+         <var title="">edge margin</var>.</p></li>
+
+        </ol>
+
+       </dd>
+
+       <dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing left writing direction">vertical growing left</span></dt>
+       <dt>If the <span>text track cue writing direction</span> is <span title="text track cue vertical growing right writing direction">vertical growing right</span></dt>
+       <dd>
+
+        <ol>
+
+         <li><p>Let <var title="">edge margin</var> be a user-agent-defined vertical length,
+         expressed as a percentage of the height of the <var title="">video</var>'s rendering area,
+         which will be used to define a margin at the top and bottom edges of the video into which
+         this cue will not be placed. In situations with overscan, this margin should be sufficient
+         to place the cue 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 top or bottom edge
+         of the video, which can be ugly).</p></li>
+
+         <li><p>If <var title="">y-position</var> is less than <var title="">edge margin</var> and
+         the sum of <var title="">y-position</var> and <var title="">size</var> is more than <var
+         title="">edge margin</var>, then increase <var title="">y-position</var> by <var
+         title="">edge margin</var> and decrease <var title="">size</var> by the same
+         amount.</p></li>
+
+         <li><p>Let <var title="">bottom margin edge</var> be 100 minus <var title="">edge
+         margin</var>.</p></li>
+
+         <li><p>If <var title="">y-position</var> is less than <var title="">bottom margin
+         edge</var>, and the sum of <var title="">y-position</var> and <var title="">size</var> is
+         more than <var title="">right margin edge</var>, then decrease <var title="">size</var> by
+         <var title="">edge margin</var>.</p></li>
+
+        </ol>
+
+       </dd>
+
+      </dl>
+
+     </li>
+
      <li><p>Let <var title="">left</var> be '<var
      title="">x-position</var>&#x2009;vw' and <var title="">top</var>
      be '<var title="">y-position</var>&#x2009;vh'. (These again are




More information about the Commit-Watchers mailing list