Short URL: http://html5.org/r/6934
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 6934 | 14646 | 2012-01-30 20:48 |
Index: source
===================================================================
--- source (revision 6933)
+++ source (revision 6934)
@@ -36425,16 +36425,10 @@
alignment</span> be <span title="text track cue middle
alignment">middle alignment</span>.</p></li>
- <li><p>Let <var title="">input</var> be the string given by the
- <var title="">settings</var> argument.</p></li>
+ <li><p><span>Parse the WebVTT settings</span> given by the <var
+ title="">settings</var> argument for <var title="">cue</var>. <a
+ href="#refsWEBVTT">[WEBVTT]</a></p></li>
- <li><p>Let <var title="">position</var> be a pointer into <var
- title="">input</var>, initially pointing at the start of the
- string.</p></li>
-
- <li><p><span>Parse the WebVTT settings</span> for <var
- title="">cue</var>. <a href="#refsWEBVTT">[WEBVTT]</a></p></li>
-
<li><p>Return the <code>TextTrackCue</code> object representing
<var title="">cue</var>.</p></li>
@@ -36785,7 +36779,7 @@
Default settings, maybe as below. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=15024
DEFAULTS
- L:-1 A:middle S:50%
+ line:-1 align:middle size:50%
Comments. See http://www.w3.org/Bugs/Public/show_bug.cgi?id=14552
@@ -36826,16 +36820,16 @@
00:27.000 --> 00:30.000
<v Roger Bingham>And I want to do a follow-up on the last conversation we did.
-00:30.000 --> 00:31.500 A:end S:50%
+00:30.000 --> 00:31.500 align:end size:50%
<v Roger Bingham>When we e-mailed—
-00:30.500 --> 00:32.500 A:start S:50%
+00:30.500 --> 00:32.500 align:start size:50%
<v Neil deGrasse Tyson>Didn't we talk about enough in that conversation?
-00:32.000 --> 00:35.500 A:end S:50%
+00:32.000 --> 00:35.500 align:end size:50%
<v Roger Bingham>No! No no no no; 'cos 'cos obviously 'cos
-00:32.500 --> 00:33.500 A:start S:50%
+00:32.500 --> 00:33.500 align:start size:50%
<v Neil deGrasse Tyson><i>Laughs</i>
00:35.500 --> 00:38.000
@@ -37112,11 +37106,11 @@
settings</span> string.</p>
<ul class="brief">
- <li>A <span>WebVTT vertical text cue setting</span>.</li> <!-- D:vertical/vertical-lr -->
- <li>A <span>WebVTT line position cue setting</span>.</li> <!-- L:100% L:1 L:-1 -->
- <li>A <span>WebVTT text position cue setting</span>.</li> <!-- T:100% -->
- <li>A <span>WebVTT size cue setting</span>.</li> <!-- S:100% -->
- <li>A <span>WebVTT alignment cue setting</span>.</li> <!-- A:start/middle/end -->
+ <li>A <span>WebVTT vertical text cue setting</span>.</li> <!-- vertical:rl/lr -->
+ <li>A <span>WebVTT line position cue setting</span>.</li> <!-- line:100% line:1 line:-1 -->
+ <li>A <span>WebVTT text position cue setting</span>.</li> <!-- position:100% -->
+ <li>A <span>WebVTT size cue setting</span>.</li> <!-- size:100% -->
+ <li>A <span>WebVTT alignment cue setting</span>.</li> <!-- align:start/middle/end -->
</ul>
<p class="note"><span>WebVTT cue settings</span> give configuration
@@ -37128,9 +37122,9 @@
following components, in the order given:</p>
<ol>
- <li>A U+0044 LATIN CAPITAL LETTER D character.</li>
+ <li>The string "<code title="">vertical</code>".</li>
<li>A U+003A COLON character (:).</li>
- <li>One of the following strings: "<code title="">vertical</code>", "<code title="">vertical-lr</code>".</li>
+ <li>One of the following strings: "<code title="">rl</code>", "<code title="">lr</code>".</li>
</ol>
<p class="note">A <span>WebVTT vertical text cue setting</span>
@@ -37142,7 +37136,7 @@
following components, in the order given:</p>
<ol>
- <li><p>A U+004C LATIN CAPITAL LETTER L character.</p></li>
+ <li><p>The string "<code title="">line</code>".</p></li>
<li><p>A U+003A COLON character (:).</p></li>
<li>Either:
<dl>
@@ -37177,7 +37171,7 @@
following components, in the order given:</p>
<ol>
- <li>A U+0054 LATIN CAPITAL LETTER T character.</li>
+ <li><p>The string "<code title="">position</code>".</p></li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
@@ -37195,7 +37189,7 @@
following components, in the order given:</p>
<ol>
- <li>A U+0053 LATIN CAPITAL LETTER S character.</li>
+ <li><p>The string "<code title="">size</code>".</p></li>
<li>A U+003A COLON character (:).</li>
<li>One or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9).</li>
<li>A U+0025 PERCENT SIGN character (%).</li>
@@ -37211,7 +37205,7 @@
following components, in the order given:</p>
<ol>
- <li>A U+0041 LATIN CAPITAL LETTER A character.</li>
+ <li><p>The string "<code title="">align</code>".</p></li>
<li>A U+003A COLON character (:).</li>
<li>One of the following strings: "<code title="">start</code>", "<code title="">middle</code>", "<code title="">end</code>"</li>
</ol>
@@ -37790,282 +37784,257 @@
<var title="">cue</var>'s <span>text track cue end time</span>
be the collected time.</p></li>
- <li><p><span>Parse the WebVTT settings</span> for <var
- title="">cue</var>.</p></li>
+ <li><p>Let <var title="">remainder</var> be the trailing substring
+ of <var title="">input</var> starting at <var
+ title="">position</var>.</p></li>
+ <li><p><span>Parse the WebVTT settings</span> given by <var
+ title="">remainder</var> for <var title="">cue</var>.</p></li>
+
</ol>
<p>When the user agent is to <dfn>parse the WebVTT settings</dfn>
- for a <span>text track cue</span> <var title="">cue</var>, the
- user agent must run the following steps:</p>
+ given by a string <var title="">input</var> for a <span>text track
+ cue</span> <var title="">cue</var>, the user agent must run the
+ following steps:</p>
<ol>
- <li><p>Let <var title="">input</var> and <var
- title="">position</var> be the same variables as those of the same
- name in the algorithm that invoked these steps.</p></li>
+ <li><p>Let <var title="">settings</var> be the result of <span
+ title="split a string on spaces">splitting <var
+ title="">input</var> on spaces</span>.</p></li>
- <li><p><i>Settings</i>: <span>Skip whitespace</span>.</p></li>
-
- <li><p>If <var title="">position</var> is beyond the end of <var
- title="">input</var> then abort these steps.</p></li>
-
- <li><p>Let <var title="">setting</var> be the character at <var
- title="">position</var>, and move <var title="">position</var>
- forwards one character.</p>
-
- <li><p>If <var title="">position</var> is beyond the end of <var
- title="">input</var> then abort these steps.</p></li>
-
- <li><p>If the character at <var title="">position</var> is a
- <span>space character</span>, then jump back to the step labeled
- <i>settings</i>.</p></li>
-
- <li><p>If the character at <var title="">position</var> is not a
- U+003A COLON character (:), then set <var title="">setting</var> to
- the empty string.</p></li>
-
- <li><p>Move <var title="">position</var> forwards one
- character.</p></li>
-
- <li><p>If <var title="">position</var> is beyond the end of <var
- title="">input</var> then abort these steps.</p></li>
-
<li>
- <p>Run the appropriate substeps that apply for the value of <var
- title="">setting</var>, as follows:</p>
+ <p>For each token <var title="">setting</var> in the list <var
+ title="">settings</var>, run the following substeps:</p>
- <dl>
+ <ol>
- <dt>If <var title="">setting</var> is a U+0044 LATIN CAPITAL
- LETTER D character</dt>
+ <li><p>If <var title="">setting</var> does not contain a U+003A
+ COLON character (:), or if the first U+003A COLON character (:)
+ in <var title="">setting</var> is either the first or last
+ character of <var title="">setting</var>, then jump to the step
+ labeled <i>next setting</i>.</p></li>
- <dd>
+ <li><p>Let <var title="">name</var> be the leading substring of
+ <var title="">setting</var> up to and excluding the first U+003A
+ COLON character (:) in that string.</p></li>
- <ol>
+ <li><p>Let <var title="">value</var> be the trailing substring of
+ <var title="">setting</var> starting from the character
+ immediately after the first U+003A COLON character (:) in that
+ string.</p></li>
- <li><p><span>Collect a sequence of characters</span> that are
- not <span title="space character">space characters</span>. Let
- <var title="">value</var> be those characters, if any.</p></li>
+ <li>
- <li><p>If <var title="">value</var> is a
- <span>case-sensitive</span> match for the string "<code
- title="">vertical</code>", then let <var title="">cue</var>'s
- <span>text track cue writing direction</span> be <span
- title="text track cue vertical growing left writing
- direction">vertical growing left</span>.</p></li>
+ <p>Run the appropriate substeps that apply for the value of <var
+ title="">name</var>, as follows:</p>
- <li><p>Otherwise, if <var title="">value</var> is a
- <span>case-sensitive</span> match for the string "<code
- title="">vertical-lr</code>", then let <var
- title="">cue</var>'s <span>text track cue writing
- direction</span> be <span title="text track cue vertical
- growing right writing direction">vertical growing
- right</span>.</p></li>
+ <dl>
- </ol>
+ <dt>If <var title="">name</var> is a <span>case-sensitive</span> match for "<code title="">vertical</code>"</dt>
- </dd>
+ <dd>
- <dt>If <var title="">setting</var> is a U+004C LATIN CAPITAL
- LETTER L character</dt>
+ <ol>
- <dd>
+ <li><p>If <var title="">value</var> is a
+ <span>case-sensitive</span> match for the string "<code
+ title="">rl</code>", then let <var title="">cue</var>'s
+ <span>text track cue writing direction</span> be <span
+ title="text track cue vertical growing left writing
+ direction">vertical growing left</span>.</p></li>
- <ol>
+ <li><p>Otherwise, if <var title="">value</var> is a
+ <span>case-sensitive</span> match for the string "<code
+ title="">lr</code>", then let <var title="">cue</var>'s
+ <span>text track cue writing direction</span> be <span
+ title="text track cue vertical growing right writing
+ direction">vertical growing right</span>.</p></li>
- <li><p><span>Collect a sequence of characters</span> that are
- either U+002D HYPHEN-MINUS characters (-), U+0025 PERCENT SIGN
- characters (%), or characters in the range U+0030 DIGIT ZERO
- (0) to U+0039 DIGIT NINE (9). Let <var title="">value</var> be
- those characters, if any.</p></li>
+ </ol>
- <li><p>If <var title="">position</var> is not beyond the end of
- <var title="">input</var> but the character at <var
- title="">position</var> is not a <span>space character</span>,
- then jump to the "otherwise" case below.</p></li>
+ </dd>
- <li><p>If <var title="">value</var> does not contain at least
- one character in the range U+0030 DIGIT ZERO (0) to U+0039
- DIGIT NINE (9), then jump back to the step labeled
- <i>settings</i>.</p></li>
+ <dt>If <var title="">name</var> is a <span>case-sensitive</span> match for "<code title="">line</code>"</dt>
- <li><p>If any character in <var title="">value</var> other than
- the first character is a U+002D HYPHEN-MINUS character (-),
- then jump back to the step labeled <i>settings</i>.</p></li>
+ <dd>
- <li><p>If any character in <var title="">value</var> other than
- the last character is a U+0025 PERCENT SIGN character (%), then
- jump back to the step labeled <i>settings</i>.</p></li>
+ <ol>
- <li><p>If the first character in <var title="">value</var> is a
- U+002D HYPHEN-MINUS character (-) <em>and</em> the last
- character in <var title="">value</var> is a U+0025 PERCENT SIGN
- character (%), then jump back to the step labeled
- <i>settings</i>.</p></li>
+ <li><p>If <var title="">value</var> contains any characters
+ other than U+002D HYPHEN-MINUS characters (-), U+0025 PERCENT
+ SIGN characters (%), and characters in the range U+0030 DIGIT
+ ZERO (0) to U+0039 DIGIT NINE (9), then jump to the step
+ labeled <i>next setting</i>.</p></li>
- <li><p>Ignoring the trailing percent sign, if any, interpret
- <var title="">value</var> as a (potentially signed) integer,
- and let <var title="">number</var> be that number.</p></li>
+ <li><p>If <var title="">value</var> does not contain at least
+ one character in the range U+0030 DIGIT ZERO (0) to U+0039
+ DIGIT NINE (9), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>If the last character in <var title="">value</var> is a
- U+0025 PERCENT SIGN character (%), but <var
- title="">number</var> is not in the range 0 ≤ <var
- title="">number</var> ≤ 100, then jump back to the
- step labeled <i>settings</i>.</p></li>
+ <li><p>If any character in <var title="">value</var> other
+ than the first character is a U+002D HYPHEN-MINUS character
+ (-), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>Let <var title="">cue</var>'s <span>text track cue line
- position</span> be <var title="">number</var>.</p></li>
+ <li><p>If any character in <var title="">value</var> other
+ than the last character is a U+0025 PERCENT SIGN character
+ (%), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>If the last character in <var title="">value</var> is a
- U+0025 PERCENT SIGN character (%), then let <var
- title="">cue</var>'s <span>text track cue snap-to-lines
- flag</span> be false.</p></li>
+ <li><p>If the first character in <var title="">value</var> is
+ a U+002D HYPHEN-MINUS character (-) <em>and</em> the last
+ character in <var title="">value</var> is a U+0025 PERCENT
+ SIGN character (%), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- </ol>
+ <li><p>Ignoring the trailing percent sign, if any, interpret
+ <var title="">value</var> as a (potentially signed) integer,
+ and let <var title="">number</var> be that number.</p></li>
- </dd>
+ <li><p>If the last character in <var title="">value</var> is
+ a U+0025 PERCENT SIGN character (%), but <var
+ title="">number</var> is not in the range
+ 0 ≤ <var
+ title="">number</var> ≤ 100, then jump to the
+ step labeled <i>next setting</i>.</p></li>
- <dt>If <var title="">setting</var> is a U+0054 LATIN CAPITAL
- LETTER T character</dt>
+ <li><p>Let <var title="">cue</var>'s <span>text track cue
+ line position</span> be <var title="">number</var>.</p></li>
- <dd>
+ <li><p>If the last character in <var title="">value</var> is
+ a U+0025 PERCENT SIGN character (%), then let <var
+ title="">cue</var>'s <span>text track cue snap-to-lines
+ flag</span> be false. Otherwise, let it be true.</p></li>
- <ol>
+ </ol>
- <li><p><span>Collect a sequence of characters</span> that are
- in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
- (9). Let <var title="">value</var> be those characters, if
- any.</p></li>
+ </dd>
- <li><p>If <var title="">position</var> is beyond the end of
- <var title="">input</var> then jump back to the step labeled
- <i>settings</i>.</p></li>
+ <dt>If <var title="">name</var> is a <span>case-sensitive</span> match for "<code title="">position</code>"</dt>
- <li><p>If the character at <var title="">position</var> is not
- a U+0025 PERCENT SIGN character (%), then then jump to the
- "otherwise" case below.</p></li>
+ <dd>
- <li><p>Move <var title="">position</var> forwards one
- character.</p></li>
+ <ol>
- <li><p>If <var title="">position</var> is not beyond the end of
- <var title="">input</var> but the character at <var
- title="">position</var> is not a <span>space character</span>,
- then jump to the "otherwise" case below.</p></li>
+ <li><p>If <var title="">value</var> contains any characters
+ other than U+0025 PERCENT SIGN characters (%) and characters
+ in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9),
+ then jump to the step labeled <i>next setting</i>.</p></li>
- <li><p>If <var title="">value</var> is the empty string, then
- jump back to the step labeled <i>settings</i>.</p></li>
+ <li><p>If <var title="">value</var> does not contain at least
+ one character in the range U+0030 DIGIT ZERO (0) to U+0039
+ DIGIT NINE (9), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>Interpret <var title="">value</var> as an integer, and
- let <var title="">number</var> be that number.</p></li>
+ <li><p>If any character in <var title="">value</var> other
+ than the last character is a U+0025 PERCENT SIGN character
+ (%), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>If <var title="">number</var> is not in the range
- 0 ≤ <var title="">number</var> ≤ 100,
- then jump back to the step labeled <i>settings</i>.</p></li>
+ <li><p>If the last character in <var title="">value</var> is
+ not a U+0025 PERCENT SIGN character (%), then jump to the
+ step labeled <i>next setting</i>.</p></li>
- <li><p>Let <var title="">cue</var>'s <span>text track cue text
- position</span> be <var title="">number</var>.</p></li>
+ <li><p>Ignoring the trailing percent sign, interpret <var
+ title="">value</var> as an integer, and let <var
+ title="">number</var> be that number.</p></li>
- </ol>
+ <li><p>If <var title="">number</var> is not in the range
+ 0 ≤ <var
+ title="">number</var> ≤ 100, then jump to the
+ step labeled <i>next setting</i>.</p></li>
- </dd>
+ <li><p>Let <var title="">cue</var>'s <span>text track cue text
+ position</span> be <var title="">number</var>.</p></li>
- <dt>If <var title="">setting</var> is a U+0053 LATIN CAPITAL
- LETTER S character</dt>
+ </ol>
- <dd>
+ </dd>
- <ol>
+ <dt>If <var title="">name</var> is a <span>case-sensitive</span> match for "<code title="">size</code>"</dt>
- <li><p><span>Collect a sequence of characters</span> that are
- in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE
- (9). Let <var title="">value</var> be those characters, if
- any.</p></li>
+ <dd>
- <li><p>If <var title="">position</var> is beyond the end of
- <var title="">input</var> then jump back to the step labeled
- <i>settings</i>.</p></li>
+ <ol>
- <li><p>If the character at <var title="">position</var> is not
- a U+0025 PERCENT SIGN character (%), then then jump to the
- "otherwise" case below.</p></li>
+ <li><p>If <var title="">value</var> contains any characters
+ other than U+0025 PERCENT SIGN characters (%) and characters
+ in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT NINE (9),
+ then jump to the step labeled <i>next setting</i>.</p></li>
- <li><p>Move <var title="">position</var> forwards one
- character.</p></li>
+ <li><p>If <var title="">value</var> does not contain at least
+ one character in the range U+0030 DIGIT ZERO (0) to U+0039
+ DIGIT NINE (9), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>If <var title="">position</var> is not beyond the end of
- <var title="">input</var> but the character at <var
- title="">position</var> is not a <span>space character</span>,
- then jump to the "otherwise" case below.</p></li>
+ <li><p>If any character in <var title="">value</var> other
+ than the last character is a U+0025 PERCENT SIGN character
+ (%), then jump to the step labeled <i>next
+ setting</i>.</p></li>
- <li><p>If <var title="">value</var> is the empty string, then
- jump back to the step labeled <i>settings</i>.</p></li>
+ <li><p>If the last character in <var title="">value</var> is
+ not a U+0025 PERCENT SIGN character (%), then jump to the
+ step labeled <i>next setting</i>.</p></li>
- <li><p>Interpret <var title="">value</var> as an integer, and
- let <var title="">number</var> be that number.</p></li>
+ <li><p>Ignoring the trailing percent sign, interpret <var
+ title="">value</var> as an integer, and let <var
+ title="">number</var> be that number.</p></li>
- <li><p>If <var title="">number</var> is not in the range
- 0 ≤ <var title="">number</var> ≤ 100,
- then jump back to the step labeled <i>settings</i>.</p></li>
+ <li><p>If <var title="">number</var> is not in the range
+ 0 ≤ <var
+ title="">number</var> ≤ 100, then jump to the
+ step labeled <i>next setting</i>.</p></li>
- <li><p>Let <var title="">cue</var>'s <span>text track cue
- size</span> be <var title="">number</var>.</p></li>
+ <li><p>Let <var title="">cue</var>'s <span>text track cue
+ size</span> be <var title="">number</var>.</p></li>
- </ol>
+ </ol>
- </dd>
+ </dd>
- <dt>If <var title="">setting</var> is a U+0041 LATIN CAPITAL
- LETTER A character</dt>
+ <dt>If <var title="">name</var> is a <span>case-sensitive</span> match for "<code title="">align</code>"</dt>
- <dd>
+ <dd>
- <ol>
+ <ol>
- <li><p><span>Collect a sequence of characters</span> that are
- not <span title="space character">space characters</span>. Let
- <var title="">value</var> be those characters, if any.</p></li>
+ <li><p>If <var title="">value</var> is a
+ <span>case-sensitive</span> match for the string "<code
+ title="">start</code>", then let <var title="">cue</var>'s
+ <span>text track cue alignment</span> be <span title="text
+ track cue start alignment">start alignment</span>.</p></li>
- <li><p>If <var title="">value</var> is a
- <span>case-sensitive</span> match for the string "<code
- title="">start</code>", then let <var title="">cue</var>'s
- <span>text track cue alignment</span> be <span title="text
- track cue start alignment">start alignment</span>.</p></li>
+ <li><p>If <var title="">value</var> is a
+ <span>case-sensitive</span> match for the string "<code
+ title="">middle</code>", then let <var title="">cue</var>'s
+ <span>text track cue alignment</span> be <span title="text
+ track cue middle alignment">middle alignment</span>.</p></li>
- <li><p>If <var title="">value</var> is a
- <span>case-sensitive</span> match for the string "<code
- title="">middle</code>", then let <var title="">cue</var>'s
- <span>text track cue alignment</span> be <span title="text
- track cue middle alignment">middle alignment</span>.</p></li>
+ <li><p>If <var title="">value</var> is a
+ <span>case-sensitive</span> match for the string "<code
+ title="">end</code>", then let <var title="">cue</var>'s
+ <span>text track cue alignment</span> be <span title="text
+ track cue end alignment">end alignment</span>.</p></li>
- <li><p>If <var title="">value</var> is a
- <span>case-sensitive</span> match for the string "<code
- title="">end</code>", then let <var title="">cue</var>'s
- <span>text track cue alignment</span> be <span title="text
- track cue end alignment">end alignment</span>.</p></li>
+ </ol>
- </ol>
+ </dd>
- </dd>
+ </dl>
- <dt>Otherwise</dt>
+ </li>
- <dd>
+ <li><p><i>Next setting</i>: Continue to the next token, if
+ any.</p></li> <!-- this step is just here to give the algorithms
+ above a clean way to 'break' -->
- <p><span>Collect a sequence of characters</span> that are not
- <span title="space character">space characters</span> and
- discard them.</p>
+ </ol>
- </dd>
-
- </dl>
-
</li>
- <li><p>Jump back to the step labeled <i>settings</i>.</p></li>
-
</ol>
<p>When this specification says that a user agent is to