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

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

Issue 77553004: Defer setting type in the WebVTT tokenizer until emitting the token (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
Index: Source/core/html/track/vtt/VTTParser.cpp
diff --git a/Source/core/html/track/vtt/VTTParser.cpp b/Source/core/html/track/vtt/VTTParser.cpp
index 64c6929544cb81e2d1d080086dda3ba4f46f9785..77e314a733f07acf3ec2a0c8e2e8a8feb06c5114 100644
--- a/Source/core/html/track/vtt/VTTParser.cpp
+++ b/Source/core/html/track/vtt/VTTParser.cpp
@@ -385,12 +385,11 @@ PassRefPtr<DocumentFragment> VTTTreeBuilder::buildFromString(const String& cueTe
m_currentNode = fragment;
- OwnPtr<VTTTokenizer> tokenizer(VTTTokenizer::create());
+ VTTTokenizer tokenizer(cueText);
m_token.clear();
m_languageStack.clear();
- SegmentedString content(cueText);
- while (tokenizer->nextToken(content, m_token))
+ while (tokenizer.nextToken(m_token))
constructTreeFromToken(m_document);
return fragment.release();

Powered by Google App Engine
This is Rietveld 408576698