WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
117421
[WebVTT] HTML5 "space" characters around "-->" are not required
https://bugs.webkit.org/show_bug.cgi?id=117421
Summary
[WebVTT] HTML5 "space" characters around "-->" are not required
Ryosuke Niwa
Reported
2013-06-10 14:35:15 PDT
Consider merging
https://chromium.googlesource.com/chromium/blink/+/4ef469cd627a13696b88e285ae28a60e38f9c286
Make whitespace around cue-timings separator optional, in order to comply with WebVTT draft: From
http://dev.w3.org/html5/webvtt/#dfn-collect-webvtt-cue-timings-and-settings
``` 4. Collect a WebVTT timestamp. If that algorithm fails, then abort these steps and return failure. Otherwise, let cue's text track cue start time be the collected time. 5. Skip whitespace. 6. If the character at position is not a U+002D HYPHEN-MINUS character (-) then abort these steps and return failure. Otherwise, move position forwards one character. 7. If the character at position is not a U+002D HYPHEN-MINUS character (-) then abort these steps and return failure. Otherwise, move position forwards one character. 8. If the character at position is not a U+003E GREATER-THAN SIGN character (>) then abort these steps and return failure. Otherwise, move position forwards one character. 9. Skip whitespace. 10. Collect a WebVTT timestamp. If that algorithm fails, then abort these steps and return failure. Otherwise, let cue's text track cue end time be the collected time. ``` "Skip whitespace" refers to terms defined in the HTML standard.
http://www.w3.org/html/wg/drafts/html/master/single-page.html#skip-whitespace
``` The step skip whitespace means that the user agent must collect a sequence of characters that are space characters. The step skip White_Space characters means that the user agent must collect a sequence of characters that are White_Space characters. In both cases, the collected characters are not used. ``` The step "collect a sequence of characters" does not forbid the sequence from being empty, and as such, the whitespace is in fact optional. Additionally, the skip whitespace step is not limited to skipping SPACE U+0020 and TAB U+0009 characters, but also includes FORM FEED, LINE FEED and CARRIAGE RETURN (Although, in practice, CR/LF should not be encountered in this section). This patch removes the expected '\t' || ' ', a rule which seems to have been inspired by the "SYNTAX" section of the WebVTT spec, which I am told by editors is meant to be ignored by parser implementors, as silly as that is.
https://code.google.com/p/chromium/issues/detail?id=242158
Attachments
Patch
(12.27 KB, patch)
2014-03-12 13:59 PDT
,
Brent Fulgham
eric.carlson
: review+
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Brent Fulgham
Comment 1
2014-03-12 13:59:19 PDT
Created
attachment 226552
[details]
Patch
Brent Fulgham
Comment 2
2014-03-12 14:09:39 PDT
Committed
r165498
: <
http://trac.webkit.org/changeset/165498
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug