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

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

Issue 98763004: Cleanups for VTTTokenizer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years 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 | « no previous file | 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 a5862b5a1a493e04d0f6b36a1602c9fa29fee4d4..abc05e2ae0b2a56d7bb95636c7179d1bac82d029 100644
--- a/Source/core/html/track/vtt/VTTTokenizer.h
+++ b/Source/core/html/track/vtt/VTTTokenizer.h
@@ -33,60 +33,19 @@
#include "core/html/parser/InputStreamPreprocessor.h"
#include "core/html/track/vtt/VTTToken.h"
-#include "wtf/PassOwnPtr.h"
namespace WebCore {
-class VTTTokenizerState {
-public:
- enum State {
- DataState,
- EscapeState,
- TagState,
- StartTagState,
- StartTagClassState,
- StartTagAnnotationState,
- EndTagState,
- TimestampTagState,
- };
-};
-
class VTTTokenizer {
WTF_MAKE_NONCOPYABLE(VTTTokenizer);
public:
explicit VTTTokenizer(const String& input);
- typedef VTTTokenizerState State;
-
- void reset();
-
bool nextToken(VTTToken&);
- inline bool haveBufferedCharacterToken() { return false; }
-
- inline bool advanceAndEmitToken(SegmentedString& source, const VTTToken& token)
- {
- source.advanceAndUpdateLineNumber();
- return emitToken(token);
- }
-
- inline bool emitToken(const VTTToken& token)
- {
- *m_token = token;
- return true;
- }
-
- bool shouldSkipNullCharacters() const { return true; }
+ inline bool shouldSkipNullCharacters() const { return true; }
private:
- // m_token is owned by the caller. If nextToken is not on the stack,
- // this member might be pointing to unallocated memory.
- VTTToken* m_token;
-
- // This member does not really need to be an instance member - it's only used in nextToken.
- // The reason it's stored here is because of the use of the ADVANCE_TO state helpers.
- VTTTokenizerState::State m_state;
-
SegmentedString m_input;
// ://www.whatwg.org/specs/web-apps/current-work/#preprocessing-the-input-stream
« no previous file with comments | « no previous file | Source/core/html/track/vtt/VTTTokenizer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698