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

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

Issue 25798003: Enable WebVTT regions for runtime testing, updated tests and minor fixes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Revert Logging 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
Index: Source/core/html/track/WebVTTParser.h
diff --git a/Source/core/html/track/WebVTTParser.h b/Source/core/html/track/WebVTTParser.h
index c717e57e597e4ab85c26569477bba700bdca56fe..6b74b504b4c03f0bcec34399592a6944aefe50bd 100644
--- a/Source/core/html/track/WebVTTParser.h
+++ b/Source/core/html/track/WebVTTParser.h
@@ -32,6 +32,7 @@
#define WebVTTParser_h
#include "HTMLNames.h"
+#include "RuntimeEnabledFeatures.h"
#include "core/dom/DocumentFragment.h"
#include "core/html/track/TextTrackCue.h"
#include "core/html/track/TextTrackRegion.h"
@@ -50,9 +51,7 @@ public:
virtual ~WebVTTParserClient() { }
virtual void newCuesParsed() = 0;
-#if ENABLE(WEBVTT_REGIONS)
virtual void newRegionsParsed() = 0;
-#endif
virtual void fileFailedToParse() = 0;
};
@@ -63,9 +62,7 @@ public:
enum ParseState {
Initial,
Header,
-#if ENABLE(WEBVTT_REGIONS)
Metadata,
-#endif
Id,
TimingsAndSettings,
CueText,
@@ -100,20 +97,16 @@ public:
static String collectDigits(const String&, unsigned*);
static String collectWord(const String&, unsigned*);
-#if ENABLE(WEBVTT_REGIONS)
// Useful functions for parsing percentage settings.
static float parseFloatPercentageValue(const String&, bool&);
static FloatPoint parseFloatPercentageValuePair(const String&, char, bool&);
-#endif
// Input data to the parser to parse.
void parseBytes(const char* data, unsigned length);
// Transfers ownership of last parsed cues to caller.
void getNewCues(Vector<RefPtr<TextTrackCue> >&);
-#if ENABLE(WEBVTT_REGIONS)
void getNewRegions(Vector<RefPtr<TextTrackRegion> >&);
-#endif
PassRefPtr<DocumentFragment> createDocumentFragmentFromCueText(const String&);
double collectTimeStamp(const String&, unsigned*);
@@ -134,10 +127,8 @@ private:
void createNewCue();
void resetCueValues();
-#if ENABLE(WEBVTT_REGIONS)
void collectHeader(const String&);
void createNewRegion();
-#endif
void skipWhiteSpace(const String&, unsigned*);
static void skipLineTerminator(const char* data, unsigned length, unsigned*);
@@ -165,9 +156,7 @@ private:
Vector<AtomicString> m_languageStack;
Vector<RefPtr<TextTrackCue> > m_cuelist;
-#if ENABLE(WEBVTT_REGIONS)
Vector<RefPtr<TextTrackRegion> > m_regionList;
-#endif
};
} // namespace WebCore

Powered by Google App Engine
This is Rietveld 408576698