Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1276)

Unified Diff: Source/core/html/track/WebVTTParser.cpp

Issue 15651003: [WebVTT] HTML5 "space" characters around "-->" are not required (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc029-timings-whitespace-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTParser.cpp
diff --git a/Source/core/html/track/WebVTTParser.cpp b/Source/core/html/track/WebVTTParser.cpp
index 9863cbc318bf2b1fefac9ab10b2f6497c4c0cb7f..989e5789bce126031ea93c19eb519a94b3a8ab66 100644
--- a/Source/core/html/track/WebVTTParser.cpp
+++ b/Source/core/html/track/WebVTTParser.cpp
@@ -277,9 +277,7 @@ WebVTTParser::ParseState WebVTTParser::collectTimingsAndSettings(const String& l
return BadCue;
if (position >= line.length())
return BadCue;
- char nextChar = line[position++];
- if (nextChar != ' ' && nextChar != '\t')
- return BadCue;
+
skipWhiteSpace(line, &position);
// 6-9 - If the next three characters are not "-->", abort and return failure.
@@ -288,9 +286,7 @@ WebVTTParser::ParseState WebVTTParser::collectTimingsAndSettings(const String& l
position += 3;
if (position >= line.length())
return BadCue;
- nextChar = line[position++];
- if (nextChar != ' ' && nextChar != '\t')
- return BadCue;
+
skipWhiteSpace(line, &position);
// 10-11 - Collect a WebVTT timestamp. If that fails, then abort and return failure. Otherwise, let cue's text track cue end time be the collected time.
« no previous file with comments | « LayoutTests/media/track/track-webvtt-tc029-timings-whitespace-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698