[html5] r5152 - [giow] (0) Captions - Stage 21.5: rendering: default positioning, make the backg [...]

whatwg at whatwg.org whatwg at whatwg.org
Mon Jul 12 18:30:16 PDT 2010


Author: ianh
Date: 2010-07-12 18:30:15 -0700 (Mon, 12 Jul 2010)
New Revision: 5152

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Captions - Stage 21.5: rendering: default positioning, make the background not fill the containing block, just the text

Modified: complete.html
===================================================================
--- complete.html	2010-07-13 00:44:31 UTC (rev 5151)
+++ complete.html	2010-07-13 01:30:15 UTC (rev 5152)
@@ -86543,38 +86543,125 @@
      <var title="">height</var> be '<var title="">size</var>vh'. (These are CSS values used by the next
      section to set CSS properties for the rendering.)</li>
 
-     <li><p></p>
+     <li>
 
-<pre class=XXX>
- calculate 'top' and 'left':
- * If D=horizontal:
-     Let H = the height of the first line box of /lines/
-     If A=start and 'direction' is 'ltr':
-     If A=end and 'direction' is 'rtl':
-       Let X = min(T * VW, VW - width of /container/)
-     If A=end and 'direction' is 'ltr':
-     If A=start and 'direction' is 'rtl':
-       Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
-       Let X = max(T * VW - (width of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
-   If D=vertical:
-     Let H = the width of the first line box of /lines/
-     If A=start:
-       Let Y = min(T * VH, VH - height of /container/)
-     If A=end:
-       Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
-       Let Y = max(T * VH - (height of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
-</pre>
+      <p>Determine the value of <var title="">x-position</var> or <var title="">y-position</var> for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
 
-     </li>
+      <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
 
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position-reverse</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+        <p>Let <var title="">x-position</var> be <var title="">x-position-reverse</var> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+       </dd>
+
+      </dl></li>
+
      <li>
 
+      <p>Determine the value of whichever of <var title="">x-position</var> or <var title="">y-position</var> is
+      not yet calculated for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
+
+      <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-line-position>timed track cue line position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-line-position>timed track cue line position</a>.</p>
+       </dd>
+
+      </dl></li>
+
+     <li><p>Let <var title="">left</var> be '<var title="">x-position</var>vw' and <var title="">top</var> be '<var title="">y-position</var>vh'. (These again are CSS values used by
+     the next section to set CSS properties for the
+     rendering.)</li>
+
+     <li>
+
       <p>Apply the terms of the CSS specifications to <var title="">nodes</var> within the following constraints, thus
       obtaining a set of CSS boxes positioned relative to an initial
       containing block: <a href=#refsCSS>[CSS]</a></p>
@@ -86594,6 +86681,11 @@
 
        <li>No style sheets are associated with <var title="">nodes</var>.</li>
 
+       <li>The children of the <var title="">nodes</var> must be
+       wrapped in an anonymous box whose 'display' property has the
+       value 'inline'. This is the <dfn id=websrt-cue-background-box>WebSRT cue background
+       box</dfn>.</li>
+
        <li>Runs of children of <a href=#websrt-ruby-object title="WebSRT Ruby Object">WebSRT
        Ruby Objects</a> that are not <a href=#websrt-ruby-text-object title="WebSRT Ruby Text
        Object">WebSRT Ruby Text Objects</a> must be wrapped in
@@ -86603,7 +86695,8 @@
        <li>All properties on <a href=#websrt-node-object title="WebSRT Node Object">WebSRT
        Node Objects</a> have their initial values, except as
        explicitly overridden for specific nodes in the next
-       section.</li>
+       section. (That section uses some of the variables whose values
+       were calculated earlier in this algorithm.)</li>
 
        <li>Text runs must be wrapped at the edge of their containing
        blocks, regardless of the value of the 'white-space' property,
@@ -86687,8 +86780,8 @@
   <p>The 'color' property on the (root) <a href=#list-of-websrt-node-objects>List of WebSRT Node
   Objects</a> must be set to 'rgba(255,255,255,0)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
 
-  <p>The 'background' shorthand property on the (root) <a href=#list-of-websrt-node-objects>List of
-  WebSRT Node Objects</a> must be set to 'rgba(0,0,0,0.8)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
+  <p>The 'background' shorthand property on the <a href=#websrt-cue-background-box>WebSRT cue
+  background box</a> must be set to 'rgba(0,0,0,0.8)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
 
   <p>A text outline or stroke may also be set on the (root) <a href=#list-of-websrt-node-objects>List
   of WebSRT Node Objects</a>, if supported.</p> <!-- 'text-outline'

Modified: index
===================================================================
--- index	2010-07-13 00:44:31 UTC (rev 5151)
+++ index	2010-07-13 01:30:15 UTC (rev 5152)
@@ -79784,38 +79784,125 @@
      <var title="">height</var> be '<var title="">size</var>vh'. (These are CSS values used by the next
      section to set CSS properties for the rendering.)</li>
 
-     <li><p></p>
+     <li>
 
-<pre class=XXX>
- calculate 'top' and 'left':
- * If D=horizontal:
-     Let H = the height of the first line box of /lines/
-     If A=start and 'direction' is 'ltr':
-     If A=end and 'direction' is 'rtl':
-       Let X = min(T * VW, VW - width of /container/)
-     If A=end and 'direction' is 'ltr':
-     If A=start and 'direction' is 'rtl':
-       Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
-       Let X = max(T * VW - (width of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
-   If D=vertical:
-     Let H = the width of the first line box of /lines/
-     If A=start:
-       Let Y = min(T * VH, VH - height of /container/)
-     If A=end:
-       Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
-       Let Y = max(T * VH - (height of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
-</pre>
+      <p>Determine the value of <var title="">x-position</var> or <var title="">y-position</var> for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
 
-     </li>
+      <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
 
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-start-alignment title="timed track cue start alignment">start</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-end-alignment title="timed track cue end alignment">end</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a>,
+              and <var title="">direction</var> is 'ltr'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position-reverse</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+        <p>Let <var title="">x-position</var> be <var title="">x-position-reverse</var> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a></dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-alignment>timed track cue alignment</a> is <a href=#timed-track-cue-middle-alignment title="timed track cue middle alignment">middle</a></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-text-position>timed track cue text position</a> minus half of <var title="">size</var>.</p>
+       </dd>
+
+      </dl></li>
+
      <li>
 
+      <p>Determine the value of whichever of <var title="">x-position</var> or <var title="">y-position</var> is
+      not yet calculated for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
+
+      <dl class=switch><dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-horizontal-writing-direction title="timed track cue horizontal writing direction">horizontal</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <a href=#timed-track-cue-line-position>timed track cue line position</a>.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-left-writing-direction title="timed track cue vertical growing left writing direction">vertical growing left</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+       <dt>If the <a href=#timed-track-cue-writing-direction>timed track cue writing direction</a> is <a href=#timed-track-cue-vertical-growing-right-writing-direction title="timed track cue vertical growing right writing direction">vertical growing right</a>,
+              and the <a href=#timed-track-cue-snap-to-lines-flag>timed track cue snap-to-lines flag</a> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <a href=#timed-track-cue-line-position>timed track cue line position</a>.</p>
+       </dd>
+
+      </dl></li>
+
+     <li><p>Let <var title="">left</var> be '<var title="">x-position</var>vw' and <var title="">top</var> be '<var title="">y-position</var>vh'. (These again are CSS values used by
+     the next section to set CSS properties for the
+     rendering.)</li>
+
+     <li>
+
       <p>Apply the terms of the CSS specifications to <var title="">nodes</var> within the following constraints, thus
       obtaining a set of CSS boxes positioned relative to an initial
       containing block: <a href=#refsCSS>[CSS]</a></p>
@@ -79835,6 +79922,11 @@
 
        <li>No style sheets are associated with <var title="">nodes</var>.</li>
 
+       <li>The children of the <var title="">nodes</var> must be
+       wrapped in an anonymous box whose 'display' property has the
+       value 'inline'. This is the <dfn id=websrt-cue-background-box>WebSRT cue background
+       box</dfn>.</li>
+
        <li>Runs of children of <a href=#websrt-ruby-object title="WebSRT Ruby Object">WebSRT
        Ruby Objects</a> that are not <a href=#websrt-ruby-text-object title="WebSRT Ruby Text
        Object">WebSRT Ruby Text Objects</a> must be wrapped in
@@ -79844,7 +79936,8 @@
        <li>All properties on <a href=#websrt-node-object title="WebSRT Node Object">WebSRT
        Node Objects</a> have their initial values, except as
        explicitly overridden for specific nodes in the next
-       section.</li>
+       section. (That section uses some of the variables whose values
+       were calculated earlier in this algorithm.)</li>
 
        <li>Text runs must be wrapped at the edge of their containing
        blocks, regardless of the value of the 'white-space' property,
@@ -79928,8 +80021,8 @@
   <p>The 'color' property on the (root) <a href=#list-of-websrt-node-objects>List of WebSRT Node
   Objects</a> must be set to 'rgba(255,255,255,0)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
 
-  <p>The 'background' shorthand property on the (root) <a href=#list-of-websrt-node-objects>List of
-  WebSRT Node Objects</a> must be set to 'rgba(0,0,0,0.8)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
+  <p>The 'background' shorthand property on the <a href=#websrt-cue-background-box>WebSRT cue
+  background box</a> must be set to 'rgba(0,0,0,0.8)'. <a href=#refsCSSCOLOR>[CSSCOLOR]</a></p>
 
   <p>A text outline or stroke may also be set on the (root) <a href=#list-of-websrt-node-objects>List
   of WebSRT Node Objects</a>, if supported.</p> <!-- 'text-outline'

Modified: source
===================================================================
--- source	2010-07-13 00:44:31 UTC (rev 5151)
+++ source	2010-07-13 01:30:15 UTC (rev 5152)
@@ -98725,38 +98725,137 @@
      title="">size</var>vh'. (These are CSS values used by the next
      section to set CSS properties for the rendering.)</p></li>
 
-     <li><p></p>
+     <li>
 
-<pre class="XXX">
- calculate 'top' and 'left':
- * If D=horizontal:
-     Let H = the height of the first line box of /lines/
-     If A=start and 'direction' is 'ltr':
-     If A=end and 'direction' is 'rtl':
-       Let X = min(T * VW, VW - width of /container/)
-     If A=end and 'direction' is 'ltr':
-     If A=start and 'direction' is 'rtl':
-       Let X = min(T * VW - width of /container/, 0)
-     If A=middle and T <= 50%:
-       Let X = max(T * VW - (width of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let X = min(T * VW + (width of /container/)/2, VW) - (width of /container/)
-   If D=vertical:
-     Let H = the width of the first line box of /lines/
-     If A=start:
-       Let Y = min(T * VH, VH - height of /container/)
-     If A=end:
-       Let Y = min(T * VH - height of /container/, 0)
-     If A=middle and T <= 50%:
-       Let Y = max(T * VH - (height of /container/)/2, 0)
-     If A=middle and T > 50%:
-       Let Y = min(T * VH + (height of /container/)/2, VH) - (height of /container/)
-</pre>
+      <p>Determine the value of <var title="">x-position</var> or <var
+      title="">y-position</var> for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
 
+      <dl class="switch">
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue start alignment">start</span>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue end alignment">end</span>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <span>timed track cue text position</span>.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue end alignment">end</span>,
+              and <var title="">direction</var> is 'ltr'</dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue start alignment">start</span>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <span>timed track cue text position</span> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing left writing direction">vertical growing left</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue start alignment">start</span></dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing right writing direction">vertical growing right</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue start alignment">start</span></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <span>timed track cue text position</span>.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing left writing direction">vertical growing left</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue end alignment">end</span></dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing right writing direction">vertical growing right</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue end alignment">end</span></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <span>timed track cue text position</span> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue middle alignment">middle</span>,
+              and <var title="">direction</var> is 'ltr'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <span>timed track cue text position</span> minus half of <var title="">size</var>.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              the <span>timed track cue alignment</span> is <span title="timed track cue middle alignment">middle</span>,
+              and <var title="">direction</var> is 'rtl'</dt>
+
+       <dd>
+        <p>Let <var title="">x-position-reverse</var> be the <span>timed track cue text position</span> minus half of <var title="">size</var>.</p>
+        <p>Let <var title="">x-position</var> be <var title="">x-position-reverse</var> subtracted from 100.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing left writing direction">vertical growing left</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue middle alignment">middle</span></dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing right writing direction">vertical growing right</span>,
+              and the <span>timed track cue alignment</span> is <span title="timed track cue middle alignment">middle</span></dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <span>timed track cue text position</span> minus half of <var title="">size</var>.</p>
+       </dd>
+
+      </dl>
+
      </li>
 
      <li>
 
+      <p>Determine the value of whichever of <var
+      title="">x-position</var> or <var title="">y-position</var> is
+      not yet calculated for <var title="">cue</var> as per the
+      appropriate rules from the following list:</p>
+
+      <dl class="switch">
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue horizontal writing direction">horizontal</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">y-position</var> be the <span>timed track cue line position</span>.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing left writing direction">vertical growing left</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is set</dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing right writing direction">vertical growing right</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be zero.</p>
+       </dd>
+
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing left writing direction">vertical growing left</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is not set</dt>
+       <dt>If the <span>timed track cue writing direction</span> is <span title="timed track cue vertical growing right writing direction">vertical growing right</span>,
+              and the <span>timed track cue snap-to-lines flag</span> is not set</dt>
+
+       <dd>
+        <p>Let <var title="">x-position</var> be the <span>timed track cue line position</span>.</p>
+       </dd>
+
+      </dl>
+
+     </li>
+
+     <li><p>Let <var title="">left</var> be '<var
+     title="">x-position</var>vw' and <var title="">top</var> be '<var
+     title="">y-position</var>vh'. (These again are CSS values used by
+     the next section to set CSS properties for the
+     rendering.)</p></li>
+
+     <li>
+
       <p>Apply the terms of the CSS specifications to <var
       title="">nodes</var> within the following constraints, thus
       obtaining a set of CSS boxes positioned relative to an initial
@@ -98781,6 +98880,11 @@
        <li>No style sheets are associated with <var
        title="">nodes</var>.</li>
 
+       <li>The children of the <var title="">nodes</var> must be
+       wrapped in an anonymous box whose 'display' property has the
+       value 'inline'. This is the <dfn>WebSRT cue background
+       box</dfn>.</li>
+
        <li>Runs of children of <span title="WebSRT Ruby Object">WebSRT
        Ruby Objects</span> that are not <span title="WebSRT Ruby Text
        Object">WebSRT Ruby Text Objects</span> must be wrapped in
@@ -98790,7 +98894,8 @@
        <li>All properties on <span title="WebSRT Node Object">WebSRT
        Node Objects</span> have their initial values, except as
        explicitly overridden for specific nodes in the next
-       section.</li>
+       section. (That section uses some of the variables whose values
+       were calculated earlier in this algorithm.)</li>
 
        <li>Text runs must be wrapped at the edge of their containing
        blocks, regardless of the value of the 'white-space' property,
@@ -98895,8 +99000,8 @@
   Objects</span> must be set to 'rgba(255,255,255,0)'. <a
   href="#refsCSSCOLOR">[CSSCOLOR]</a></p>
 
-  <p>The 'background' shorthand property on the (root) <span>List of
-  WebSRT Node Objects</span> must be set to 'rgba(0,0,0,0.8)'. <a
+  <p>The 'background' shorthand property on the <span>WebSRT cue
+  background box</span> must be set to 'rgba(0,0,0,0.8)'. <a
   href="#refsCSSCOLOR">[CSSCOLOR]</a></p>
 
   <p>A text outline or stroke may also be set on the (root) <span>List




More information about the Commit-Watchers mailing list