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

Unified Diff: Source/core/html/track/vtt/VTTParser.h

Issue 119143002: Introduce VTTScanner - a parser helper for various VTT parsing needs (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: struct Run -> class Run; explicit constructor; make non-copyable. Created 6 years, 11 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 | « Source/core/core.gypi ('k') | Source/core/html/track/vtt/VTTParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/vtt/VTTParser.h
diff --git a/Source/core/html/track/vtt/VTTParser.h b/Source/core/html/track/vtt/VTTParser.h
index df4e584cae96bfdada76062a346294908d2e74e0..845b2250a614296a17d7cc44e19d69fc70d57094 100644
--- a/Source/core/html/track/vtt/VTTParser.h
+++ b/Source/core/html/track/vtt/VTTParser.h
@@ -47,6 +47,7 @@ namespace WebCore {
using namespace HTMLNames;
class Document;
+class VTTScanner;
class VTTParserClient {
public:
@@ -81,13 +82,12 @@ public:
|| tagName == rubyTag
|| tagName == rtTag;
}
-
- static inline bool isASpace(char c)
+ static inline bool isASpace(UChar c)
{
// WebVTT space characters are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), U+000A LINE FEED (LF), U+000C FORM FEED (FF), and U+000D CARRIAGE RETURN (CR).
return c == ' ' || c == '\t' || c == '\n' || c == '\f' || c == '\r';
}
- static inline bool isValidSettingDelimiter(char c)
+ static inline bool isValidSettingDelimiter(UChar c)
{
// ... a WebVTT cue consists of zero or more of the following components, in any order, separated from each other by one or more
// U+0020 SPACE characters or U+0009 CHARACTER TABULATION (tab) characters.
@@ -133,7 +133,7 @@ private:
void collectMetadataHeader(const String&);
void createNewRegion(const String& headerValue);
- static void skipWhiteSpace(const String&, unsigned*);
+ static bool collectTimeStamp(VTTScanner& input, double& timeStamp);
BufferedLineReader m_lineReader;
OwnPtr<TextResourceDecoder> m_decoder;
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/track/vtt/VTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698