[html5] r6843 - [giowt] (1) WebVTT signature parsing: should bail with error if the signature li [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Dec 30 22:34:37 PST 2011


Author: ianh
Date: 2011-12-05 16:36:29 -0800 (Mon, 05 Dec 2011)
New Revision: 6843

Modified:
   complete.html
   index
   source
Log:
[giowt] (1) WebVTT signature parsing: should bail with error if the signature line doesn't have a line ending. Also, change some redundant IF statements to assertions. Let me know if these invariants aren't as invariant as I thought.
Affected topics: Video Text Tracks

Modified: complete.html
===================================================================
--- complete.html	2011-12-05 23:38:17 UTC (rev 6842)
+++ complete.html	2011-12-06 00:36:29 UTC (rev 6843)
@@ -80883,7 +80883,8 @@
     stream. Such algorithms may use information about the resource
     other than the resource's contents, including the address of the
     resource. If autodetection succeeds in determining a character
-    encoding, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
+    encoding, and that encoding is a supported encoding, then return
+    that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
     <i>tentative</i>, and abort these steps. <a href=#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
 
     <p class=note>The UTF-8 encoding has a highly detectable bit

Modified: index
===================================================================
--- index	2011-12-05 23:38:17 UTC (rev 6842)
+++ index	2011-12-06 00:36:29 UTC (rev 6843)
@@ -80883,7 +80883,8 @@
     stream. Such algorithms may use information about the resource
     other than the resource's contents, including the address of the
     resource. If autodetection succeeds in determining a character
-    encoding, then return that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
+    encoding, and that encoding is a supported encoding, then return
+    that encoding, with the <a href=#concept-encoding-confidence title=concept-encoding-confidence>confidence</a>
     <i>tentative</i>, and abort these steps. <a href=#refsUNIVCHARDET>[UNIVCHARDET]</a></p>
 
     <p class=note>The UTF-8 encoding has a highly detectable bit

Modified: source
===================================================================
--- source	2011-12-05 23:38:17 UTC (rev 6842)
+++ source	2011-12-06 00:36:29 UTC (rev 6843)
@@ -37181,13 +37181,16 @@
    <var title="">already collected line</var> flag.</li>
 
 
+   <!-- SIGNATURE CHECK -->
+
    <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>
 
    <li><p>If <var title="">line</var> is less than six characters
-   long, then abort these steps. The file is not a <span>WebVTT
-   file</span>.</p></li>
+   long, then abort these steps. The file does not start with the
+   correct <span>WebVTT file</span> signature and was therefore not
+   successfully processed.</p></li>
 
    <li><p>If <var title="">line</var> is exactly six characters long
    but does not exactly equal "<code title="">WEBVTT</code>", then
@@ -37199,15 +37202,18 @@
    but the first six characters do not exactly equal "<code
    title="">WEBVTT</code>", or the seventh character is neither a
    U+0020 SPACE character nor a U+0009 CHARACTER TABULATION (tab)
-   character, then abort these steps. The file is not a <span>WebVTT
-   file</span>.</p></li>
+   character, then abort these steps. The file does not start with the
+   correct <span>WebVTT file</span> signature and was therefore not
+   successfully processed.</p></li>
 
    <li><p>If <var title="">position</var> is past the end of <var
-   title="">input</var>, then jump to the step labeled
-   <i>end</i>.</p></li>
+   title="">input</var>, then abort these steps. The file does not
+   start with the correct <span>WebVTT file</span> signature and was
+   therefore not successfully processed.</p></li>
 
-   <li><p>If the character indicated by <var title="">position</var>
-   is a U+000A LINE FEED (LF) character, advance <var
+
+   <li><p>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>.</p></li>
 
@@ -37221,8 +37227,8 @@
    title="">input</var>, then jump to the step labeled
    <i>end</i>.</p></li>
 
-   <li><p>If the character indicated by <var title="">position</var>
-   is a U+000A LINE FEED (LF) character, advance <var
+   <li><p>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>.</p></li>
 




More information about the Commit-Watchers mailing list