Deal with text position alignment separately from text position.
authorSilvia Pfeiffer
Sun, 10 Nov 2013 18:04:44 +0800
changeset 158 9a9fd96c01d9
parent 157 604075ce0c57
child 159 b83068242cae
Deal with text position alignment separately from text position.
Also fixed an example.
webvtt/webvtt.html
--- a/webvtt/webvtt.html	Sun Nov 10 06:59:03 2013 +0800
+++ b/webvtt/webvtt.html	Sun Nov 10 18:04:44 2013 +0800
@@ -463,7 +463,7 @@
 00:00:03.000 --> 00:00:06.500 position:90% align:end size:35%
 I think he went down this lane.
 
-00:00:04.000 --> 00:00:06.500 position:10%,end align:middle size:35%
+00:00:04.000 --> 00:00:06.500 position:45%,end align:middle size:35%
 What are you waiting for?</pre>
 
   <p>The cues cover only 35% of the video viewport's width. The first cue has its <a title="text track cue box">cue box</a> left aligned at the 10% mark of the video viewport width and the text is left aligned within that box - probably underneath a speaker on the left of the video image. "start" alignment of the cue box is the default for start aligned text, so does not need to be specified in "position". The second cue has its <a title="text track cue box">cue box</a> right aligned at the 90% mark of the video viewport width. The same effect can be achieved with "position:55%,start", which explicitly positions the cue box. The third cue has middle aligned text within the same type of cue box as the first cue.</p>
@@ -2497,8 +2497,8 @@
      immediately after the first U+003A COLON character (:) in that
      string.</p></li>
 
-     <li><p>Let <var title="">positionSet</var> be false. (This is
-     required to determine if the position settings need to be adjusted
+     <li><p>Let <var title="">positionSet</var> and <var title="">positionAlignSet</var>
+     be false. (These are required to determine if the position settings need to be adjusted
      for non-middle aligned cue text.)</p></li>
 
      <li>
@@ -2690,22 +2690,25 @@
          step labeled <i>next setting</i>.</p></li>
 
          <li><p>Let <var title="">cue</var>'s <a>text track cue text position</a> be
-         <var title="">number</var> and lte <var title="">positionSet</var> be true.</p></li>
+         <var title="">number</var> and let <var title="">positionSet</var> be true.</p></li>
 
          <li><p>If <var title="">colalign</var> is a <a>case-sensitive</a> match for the string
          "<code title="">start</code>", then let <var title="">cue</var>'s
          <a>text track cue text position alignment</a> be
-         <a title="text track cue text position start alignment">start alignment</a>.</p></li>
+         <a title="text track cue text position start alignment">start alignment</a>
+         and let <var title="">positionAlignSet</var> be true.</p></li>
 
          <li><p>If <var title="">colalign</var> is a <a>case-sensitive</a> match for the string
          "<code title="">middle</code>", then let <var title="">cue</var>'s
          <a>text track cue text position alignment</a> be
-         <a title="text track cue text position middle alignment">middle alignment</a>.</p></li>
+         <a title="text track cue text position middle alignment">middle alignment</a>
+         and let <var title="">positionAlignSet</var> be true.</p></li>
 
          <li><p>If <var title="">colalign</var> is a <a>case-sensitive</a> match for the string
          "<code title="">end</code>", then let <var title="">cue</var>'s
          <a>text track cue text position alignment</a> be
-         <a title="text track cue text position end alignment">end alignment</a>.</p></li>
+         <a title="text track cue text position end alignment">end alignment</a>
+         and let <var title="">positionAlignSet</var> be true.</p></li>
 
         </ol>
 
@@ -2767,28 +2770,46 @@
    <li><p>If <var title="">positionSet</var> is false (i.e. the cue box has not been explicitly
    positioned with a position setting), and <a>text track cue text alignment</a>
    is not <a title="text track cue middle alignment">middle alignment</a>, then adjust the
-   <a>text track cue text position</a> and its <a title="text track cue text position alignment">alignment</a>
-   as follows:
+   <a>text track cue text position</a> as follows:
 
    <dl>
      <dt>If <a>text track cue text alignment</a> is <a title="text track cue left alignment">left</a> or
      <a title="text track cue start alignment">start</a></dt>
-     <dd>Let <a>text track cue text position</a> be 0% and let <a>text track cue text position alignment</a> be
-     <a title="text track cue text position start alignment">start alignment</a>.
-     </dd>
+     <dd>Let <a>text track cue text position</a> be 0%.</a></dd>
      </dt>
 
      <dt>If <a>text track cue text alignment</a> is <a title="text track cue right alignment">right</a> or
      <a title="text track cue end alignment">end</a></dt>
-     <dd>Let <a>text track cue text position</a> be 100% and let <a>text track cue text position alignment</a> be
-     <a title="text track cue text position end alignment">end alignment</a>.
-     </dd>
+     <dd>Let <a>text track cue text position</a> be 100%.</a></dd>
      </dt>
    </dl>
-
    </li>
 
-   <li><p>If <var>cue</var>'s <a>text track cue line position</a> is not <a>text track cue automatic line position</a> or <var>cue</var>'s <a>text track cue size</a> is not 100 or <var>cue</var>'s <a>text track cue writing direction</a> is not <a title="text track cue horizontal writing direction">horizontal</a>, but <var>cue</var>'s <a>text track cue region identifier</a> is not the empty string, let <var>cue</var>'s <a>text track cue region identifier</a> be the empty string.</p></li>
+   <li><p>If <var title="">positionAlignSet</var> is false (i.e. the cue box has not been explicitly
+   position aligned with a position alignment setting), and <a>text track cue text alignment</a>
+   is not <a title="text track cue middle alignment">middle alignment</a>, then adjust the
+   <a>text track cue text position alignment</a> as follows:
+
+   <dl>
+     <dt>If <a>text track cue text alignment</a> is <a title="text track cue left alignment">left</a> or
+     <a title="text track cue start alignment">start</a></dt>
+     <dd>Let <a>text track cue text position alignment</a> be
+     <a title="text track cue text position start alignment">start alignment</a>.</dd>
+     </dt>
+
+     <dt>If <a>text track cue text alignment</a> is <a title="text track cue right alignment">right</a> or
+     <a title="text track cue end alignment">end</a></dt>
+     <dd>Let <a>text track cue text position alignment</a> be
+     <a title="text track cue text position end alignment">end alignment</a>.</dd>
+     </dt>
+   </dl>
+   </li>
+
+   <li><p>If <var>cue</var>'s <a>text track cue line position</a> is not <a>text track cue automatic line position</a>
+   or <var>cue</var>'s <a>text track cue size</a> is not 100 or <var>cue</var>'s <a>text track cue writing direction</a>
+   is not <a title="text track cue horizontal writing direction">horizontal</a>, but <var>cue</var>'s <a>text track cue
+   region identifier</a> is not the empty string, let <var>cue</var>'s <a>text track cue region identifier</a> be the
+   empty string.</p></li>
 
 
   </ol>