[html5] r6758 - [giowt] (0) Make the WebVTT parser a bit more forgiving: data suggests that we s [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Oct 25 16:17:21 PDT 2011
Author: ianh
Date: 2011-10-25 16:17:19 -0700 (Tue, 25 Oct 2011)
New Revision: 6758
Modified:
complete.html
index
source
Log:
[giowt] (0) Make the WebVTT parser a bit more forgiving: data suggests that we should always start a cue if we hit a line that contains the magic string -->.
Fixing http://www.w3.org/Bugs/Public/show_bug.cgi?id=14550
Modified: complete.html
===================================================================
--- complete.html 2011-10-25 22:59:20 UTC (rev 6757)
+++ complete.html 2011-10-25 23:17:19 UTC (rev 6758)
@@ -33102,6 +33102,10 @@
is a U+FEFF BYTE ORDER MARK (BOM) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>
+ <li>Let <var title="">line</var> be a string variable. Unset the
+ <var title="">already collected line</var> flag.</li>
+
+
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
@@ -33138,17 +33142,24 @@
<li><p>If the character indicated by <var title="">position</var>
is a U+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</li>
+
<!-- In v2, this is where we can put header metadata processing -->
<li><p>If <var title="">line</var> is not the empty string, then
jump back to the step labeled <i title="">header</i>.</li>
- <li><p><i>Cue loop</i>: <a href=#collect-a-sequence-of-characters>Collect a sequence of
- characters</a> that are U+000A LINE FEED (LF)
- characters.</li>
+ <li><p><i>Cue loop</i>: If the <var title="">already collected
+ line</var> flag is set, then jump to the step labeled <var title="">cue creation</var>.</li>
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
+ U+000A LINE FEED (LF) characters.</li>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
<li><p>If <var title="">line</var> is the empty string, then jump
@@ -33157,9 +33168,8 @@
a newline, so we have none of that either, meaning we have nothing.
-->.)</li>
- <li><p>Let <var title="">cue</var> be a new <a href=#text-track-cue>text track
- cue</a> associated with <var title="">output</var>'s <a href=#text-track>text
- track</a>.</li>
+ <li><p><i>Cue creation</i>: Let <var title="">cue</var> be a new
+ <a href=#text-track-cue>text track cue</a> associated with <var title="">output</var>'s <a href=#text-track>text track</a>.</li>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the empty string.</li>
@@ -33212,10 +33222,14 @@
discard <var title="">cue</var> and jump to the step labeled <i>cue
loop</i>.</li>
- <li><p><i>Timings</i>: <a href=#collect-webvtt-cue-timings-and-settings>Collect WebVTT cue timings and
- settings</a> from <var title="">line</var>, using <var title="">cue</var> for the results. If that fails, jump to the step
- labeled <i>bad cue</i>.</li>
+ <li><p><i>Timings</i>: Unset the <var title="">already collected
+ line</var> flag.</li>
+ <li><p><a href=#collect-webvtt-cue-timings-and-settings>Collect WebVTT cue timings and settings</a> from
+ <var title="">line</var>, using <var title="">cue</var> for the
+ results. If that fails, jump to the step labeled <i>bad
+ cue</i>.</li>
+
<li><p>Let <var title="">cue text</var> be the empty
string.</li>
@@ -33232,6 +33246,11 @@
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue text processing</i>.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue text processing</i>.</li>
+
<li><p>If <var title="">cue text</var> is not empty, append a
U+000A LINE FEED (LF) character to <var title="">cue
text</var>.</li>
@@ -33266,6 +33285,11 @@
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</li>
+
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue loop</i>.</li>
Modified: index
===================================================================
--- index 2011-10-25 22:59:20 UTC (rev 6757)
+++ index 2011-10-25 23:17:19 UTC (rev 6758)
@@ -33102,6 +33102,10 @@
is a U+FEFF BYTE ORDER MARK (BOM) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>
+ <li>Let <var title="">line</var> be a string variable. Unset the
+ <var title="">already collected line</var> flag.</li>
+
+
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
@@ -33138,17 +33142,24 @@
<li><p>If the character indicated by <var title="">position</var>
is a U+000A LINE FEED (LF) character, advance <var title="">position</var> to the next character in <var title="">input</var>.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</li>
+
<!-- In v2, this is where we can put header metadata processing -->
<li><p>If <var title="">line</var> is not the empty string, then
jump back to the step labeled <i title="">header</i>.</li>
- <li><p><i>Cue loop</i>: <a href=#collect-a-sequence-of-characters>Collect a sequence of
- characters</a> that are U+000A LINE FEED (LF)
- characters.</li>
+ <li><p><i>Cue loop</i>: If the <var title="">already collected
+ line</var> flag is set, then jump to the step labeled <var title="">cue creation</var>.</li>
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
+ U+000A LINE FEED (LF) characters.</li>
+
+ <li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
<li><p>If <var title="">line</var> is the empty string, then jump
@@ -33157,9 +33168,8 @@
a newline, so we have none of that either, meaning we have nothing.
-->.)</li>
- <li><p>Let <var title="">cue</var> be a new <a href=#text-track-cue>text track
- cue</a> associated with <var title="">output</var>'s <a href=#text-track>text
- track</a>.</li>
+ <li><p><i>Cue creation</i>: Let <var title="">cue</var> be a new
+ <a href=#text-track-cue>text track cue</a> associated with <var title="">output</var>'s <a href=#text-track>text track</a>.</li>
<li><p>Let <var title="">cue</var>'s <a href=#text-track-cue-identifier>text track cue
identifier</a> be the empty string.</li>
@@ -33212,10 +33222,14 @@
discard <var title="">cue</var> and jump to the step labeled <i>cue
loop</i>.</li>
- <li><p><i>Timings</i>: <a href=#collect-webvtt-cue-timings-and-settings>Collect WebVTT cue timings and
- settings</a> from <var title="">line</var>, using <var title="">cue</var> for the results. If that fails, jump to the step
- labeled <i>bad cue</i>.</li>
+ <li><p><i>Timings</i>: Unset the <var title="">already collected
+ line</var> flag.</li>
+ <li><p><a href=#collect-webvtt-cue-timings-and-settings>Collect WebVTT cue timings and settings</a> from
+ <var title="">line</var>, using <var title="">cue</var> for the
+ results. If that fails, jump to the step labeled <i>bad
+ cue</i>.</li>
+
<li><p>Let <var title="">cue text</var> be the empty
string.</li>
@@ -33232,6 +33246,11 @@
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue text processing</i>.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue text processing</i>.</li>
+
<li><p>If <var title="">cue text</var> is not empty, append a
U+000A LINE FEED (LF) character to <var title="">cue
text</var>.</li>
@@ -33266,6 +33285,11 @@
<li><p><a href=#collect-a-sequence-of-characters>Collect a sequence of characters</a> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var title="">line</var> be those characters, if any.</li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</li>
+
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue loop</i>.</li>
Modified: source
===================================================================
--- source 2011-10-25 22:59:20 UTC (rev 6757)
+++ source 2011-10-25 23:17:19 UTC (rev 6758)
@@ -36232,6 +36232,10 @@
title="">input</var>.</p></li>
+ <li>Let <var title="">line</var> be a string variable. Unset the
+ <var title="">already collected line</var> flag.</li>
+
+
<li><p><span>Collect a sequence of characters</span> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var
title="">line</var> be those characters, if any.</p></li>
@@ -36276,17 +36280,26 @@
title="">position</var> to the next character in <var
title="">input</var>.</p></li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var
+ title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</p></li>
+
<!-- In v2, this is where we can put header metadata processing -->
<li><p>If <var title="">line</var> is not the empty string, then
jump back to the step labeled <i title="">header</i>.</p></li>
- <li><p><i>Cue loop</i>: <span>Collect a sequence of
- characters</span> that are U+000A LINE FEED (LF)
- characters.</p></li>
+ <li><p><i>Cue loop</i>: If the <var title="">already collected
+ line</var> flag is set, then jump to the step labeled <var
+ title="">cue creation</var>.</p></li>
<li><p><span>Collect a sequence of characters</span> that are
+ U+000A LINE FEED (LF) characters.</p></li>
+
+ <li><p><span>Collect a sequence of characters</span> that are
<em>not</em> U+000A LINE FEED (LF) characters. Let <var
title="">line</var> be those characters, if any.</p></li>
@@ -36298,9 +36311,9 @@
a newline, so we have none of that either, meaning we have nothing.
-->.)</p></li>
- <li><p>Let <var title="">cue</var> be a new <span>text track
- cue</span> associated with <var title="">output</var>'s <span>text
- track</span>.</p></li>
+ <li><p><i>Cue creation</i>: Let <var title="">cue</var> be a new
+ <span>text track cue</span> associated with <var
+ title="">output</var>'s <span>text track</span>.</p></li>
<li><p>Let <var title="">cue</var>'s <span>text track cue
identifier</span> be the empty string.</p></li>
@@ -36357,11 +36370,14 @@
discard <var title="">cue</var> and jump to the step labeled <i>cue
loop</i>.</p></li>
- <li><p><i>Timings</i>: <span>Collect WebVTT cue timings and
- settings</span> from <var title="">line</var>, using <var
- title="">cue</var> for the results. If that fails, jump to the step
- labeled <i>bad cue</i>.</p></li>
+ <li><p><i>Timings</i>: Unset the <var title="">already collected
+ line</var> flag.</p></li>
+ <li><p><span>Collect WebVTT cue timings and settings</span> from
+ <var title="">line</var>, using <var title="">cue</var> for the
+ results. If that fails, jump to the step labeled <i>bad
+ cue</i>.</p></li>
+
<li><p>Let <var title="">cue text</var> be the empty
string.</p></li>
@@ -36381,6 +36397,12 @@
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue text processing</i>.</p></li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var
+ title="">already collected line</var> flag and jump to the step
+ labeled <i>cue text processing</i>.</p></li>
+
<li><p>If <var title="">cue text</var> is not empty, append a
U+000A LINE FEED (LF) character to <var title="">cue
text</var>.</p></li>
@@ -36418,6 +36440,12 @@
<em>not</em> U+000A LINE FEED (LF) characters. Let <var
title="">line</var> be those characters, if any.</p></li>
+ <li><p>If <var title="">line</var> contains the three-character
+ substring "<code title="">--></code>" (U+002D HYPHEN-MINUS, U+002D
+ HYPHEN-MINUS, U+003E GREATER-THAN SIGN), then set the <var
+ title="">already collected line</var> flag and jump to the step
+ labeled <i>cue loop</i>.</p></li>
+
<li><p>If <var title="">line</var> is the empty string, then jump
to the step labeled <i>cue loop</i>.</p></li>
More information about the Commit-Watchers
mailing list