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

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

Issue 52713005: Decouple tokenizer/tree builder state from WebVTTParser (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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/html/track/TextTrackCue.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 d031a376c27b1a691e8190d39bd6fa5c06ddfe0e..d21e8e64dab9f82372fb42055e8afb70b349cb6c 100644
--- a/Source/core/html/track/WebVTTParser.h
+++ b/Source/core/html/track/WebVTTParser.h
@@ -100,6 +100,9 @@ public:
static float parseFloatPercentageValue(const String&, bool&);
static FloatPoint parseFloatPercentageValuePair(const String&, char, bool&);
+ // Create the DocumentFragment representation of the WebVTT cue text.
+ static PassRefPtr<DocumentFragment> createDocumentFragmentFromCueText(Document&, const String&);
+
// Input data to the parser to parse.
void parseBytes(const char* data, unsigned length);
@@ -107,8 +110,6 @@ public:
void getNewCues(Vector<RefPtr<TextTrackCue> >&);
void getNewRegions(Vector<RefPtr<TextTrackRegion> >&);
- PassRefPtr<DocumentFragment> createDocumentFragmentFromCueText(const String&);
-
private:
WebVTTParser(WebVTTParserClient*, Document&);
@@ -131,8 +132,6 @@ private:
static void skipLineTerminator(const String& data, unsigned*);
static String collectNextLine(const String& data, unsigned*);
- void constructTreeFromToken(Document&);
-
String m_currentHeaderName;
String m_currentHeaderValue;
@@ -143,14 +142,8 @@ private:
StringBuilder m_currentContent;
String m_currentSettings;
- WebVTTToken m_token;
- OwnPtr<WebVTTTokenizer> m_tokenizer;
-
- RefPtr<ContainerNode> m_currentNode;
-
WebVTTParserClient* m_client;
- Vector<AtomicString> m_languageStack;
Vector<RefPtr<TextTrackCue> > m_cuelist;
Vector<RefPtr<TextTrackRegion> > m_regionList;
« no previous file with comments | « Source/core/html/track/TextTrackCue.cpp ('k') | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698