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

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

Issue 64303004: Handle buffer boundaries in the WebVTT parser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix compilation warning Created 7 years, 1 month 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/html/track/BufferedLineReaderTest.cpp ('k') | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/WebVTTParser.h
diff --git a/Source/core/html/track/WebVTTParser.h b/Source/core/html/track/WebVTTParser.h
index f7f53fb90fab335f0cd1390b595714859779d4e9..d6a6573a9258bcab24b923571e4af524fa7938d5 100644
--- a/Source/core/html/track/WebVTTParser.h
+++ b/Source/core/html/track/WebVTTParser.h
@@ -35,6 +35,7 @@
#include "RuntimeEnabledFeatures.h"
#include "core/dom/DocumentFragment.h"
#include "core/fetch/TextResourceDecoder.h"
+#include "core/html/track/BufferedLineReader.h"
#include "core/html/track/TextTrackCue.h"
#include "core/html/track/VTTRegion.h"
#include "core/html/track/WebVTTTokenizer.h"
@@ -117,7 +118,7 @@ private:
Document* m_document;
ParseState m_state;
- void parse(const String& textData);
+ void parse();
void flushPendingCue();
bool hasRequiredFileIdentifier(const String& line);
ParseState collectCueId(const String&);
@@ -132,12 +133,11 @@ private:
void createNewRegion();
void skipWhiteSpace(const String&, unsigned*);
- static void skipLineTerminator(const String& data, unsigned*);
- static String collectNextLine(const String& data, unsigned*);
String m_currentHeaderName;
String m_currentHeaderValue;
+ BufferedLineReader m_lineReader;
RefPtr<TextResourceDecoder> m_decoder;
String m_currentId;
double m_currentStartTime;
« no previous file with comments | « Source/core/html/track/BufferedLineReaderTest.cpp ('k') | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698