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

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: Rebased 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/TextTrackRegionList.idl ('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 e566e2e40d570d1e088c2935b04d5f0b737d1d83..d46febe1a5402dad97fe02abc33a5255b8353ab0 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,6 @@ public:
enum ParseState {
Initial,
Header,
-#if ENABLE(WEBVTT_REGIONS)
- Metadata,
-#endif
Id,
TimingsAndSettings,
CueText,
@@ -100,20 +96,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 +126,8 @@ private:
void createNewCue();
void resetCueValues();
-#if ENABLE(WEBVTT_REGIONS)
- void collectHeader(const String&);
+ void collectMetadataHeader(const String&);
void createNewRegion();
-#endif
void skipWhiteSpace(const String&, unsigned*);
static void skipLineTerminator(const char* data, unsigned length, unsigned*);
@@ -165,9 +155,7 @@ private:
Vector<AtomicString> m_languageStack;
Vector<RefPtr<TextTrackCue> > m_cuelist;
-#if ENABLE(WEBVTT_REGIONS)
Vector<RefPtr<TextTrackRegion> > m_regionList;
-#endif
};
} // namespace WebCore
« no previous file with comments | « Source/core/html/track/TextTrackRegionList.idl ('k') | Source/core/html/track/WebVTTParser.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698