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

Unified Diff: Source/core/html/track/TextTrack.cpp

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/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 70fed99cc76d4d00f674a734cb40bc2ea422c1e3..4c8a40abfe56064ac6db3a0081cb3f1b4d148f64 100644
--- a/Source/core/html/track/TextTrack.cpp
+++ b/Source/core/html/track/TextTrack.cpp
@@ -32,6 +32,7 @@
#include "config.h"
#include "core/html/track/TextTrack.h"
+#include "RuntimeEnabledFeatures.h"
#include "bindings/v8/ExceptionStatePlaceholder.h"
#include "core/dom/ExceptionCode.h"
#include "core/html/HTMLMediaElement.h"
@@ -95,9 +96,7 @@ const AtomicString& TextTrack::showingKeyword()
TextTrack::TextTrack(ScriptExecutionContext* context, TextTrackClient* client, const AtomicString& kind, const AtomicString& label, const AtomicString& language, TextTrackType type)
: TrackBase(context, TrackBase::TextTrack)
, m_cues(0)
-#if ENABLE(WEBVTT_REGIONS)
, m_regions(0)
-#endif
, m_mediaElement(0)
, m_label(label)
, m_language(language)
@@ -123,12 +122,10 @@ TextTrack::~TextTrack()
m_cues->item(i)->setTrack(0);
}
-#if ENABLE(WEBVTT_REGIONS)
- if (m_regions) {
+ if (RuntimeEnabledFeatures::webVTTRegionsEnabled() && m_regions) {
acolwell GONE FROM CHROMIUM 2013/10/04 19:48:20 nit: Why is this covered by the feature guard. Wil
vcarbune.chromium 2013/10/08 18:07:38 Removed the runtime flag check. It should be zero
for (size_t i = 0; i < m_regions->length(); ++i)
m_regions->item(i)->setTrack(0);
}
-#endif
clearClient();
}
@@ -281,7 +278,6 @@ void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& es)
m_client->textTrackRemoveCue(this, cue);
}
-#if ENABLE(WEBVTT_REGIONS)
TextTrackRegionList* TextTrack::regionList()
{
return ensureTextTrackRegionList();
@@ -305,7 +301,6 @@ TextTrackRegionList* TextTrack::regions()
// each time.
if (m_mode != disabledKeyword())
return ensureTextTrackRegionList();
-
return 0;
}
@@ -358,7 +353,6 @@ void TextTrack::removeRegion(TextTrackRegion* region, ExceptionState &es)
region->setTrack(0);
}
-#endif
void TextTrack::cueWillChange(TextTrackCue* cue)
{

Powered by Google App Engine
This is Rietveld 408576698