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

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

Issue 81113003: Turn VTTToken into an immutable object (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
« no previous file with comments | « Source/core/html/track/vtt/VTTToken.h ('k') | Source/core/html/track/vtt/VTTTokenizer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/vtt/VTTTokenizer.h
diff --git a/Source/core/html/track/vtt/VTTTokenizer.h b/Source/core/html/track/vtt/VTTTokenizer.h
index a3cd2794d57442f0711540f34bcf2091b29d3220..a5862b5a1a493e04d0f6b36a1602c9fa29fee4d4 100644
--- a/Source/core/html/track/vtt/VTTTokenizer.h
+++ b/Source/core/html/track/vtt/VTTTokenizer.h
@@ -34,7 +34,6 @@
#include "core/html/parser/InputStreamPreprocessor.h"
#include "core/html/track/vtt/VTTToken.h"
#include "wtf/PassOwnPtr.h"
-#include "wtf/text/StringBuilder.h"
namespace WebCore {
@@ -65,15 +64,15 @@ public:
inline bool haveBufferedCharacterToken() { return false; }
- inline bool advanceAndEmitToken(SegmentedString& source, VTTTokenTypes::Type type)
+ inline bool advanceAndEmitToken(SegmentedString& source, const VTTToken& token)
{
source.advanceAndUpdateLineNumber();
- return emitToken(type);
+ return emitToken(token);
}
- inline bool emitToken(VTTTokenTypes::Type type)
+ inline bool emitToken(const VTTToken& token)
{
- m_token->setType(type);
+ *m_token = token;
return true;
}
@@ -88,7 +87,6 @@ private:
// The reason it's stored here is because of the use of the ADVANCE_TO state helpers.
VTTTokenizerState::State m_state;
- StringBuilder m_buffer;
SegmentedString m_input;
// ://www.whatwg.org/specs/web-apps/current-work/#preprocessing-the-input-stream
« no previous file with comments | « Source/core/html/track/vtt/VTTToken.h ('k') | Source/core/html/track/vtt/VTTTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698