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

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: 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/TextTrack.h ('k') | Source/core/html/track/TextTrack.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/track/TextTrack.cpp
diff --git a/Source/core/html/track/TextTrack.cpp b/Source/core/html/track/TextTrack.cpp
index 5335264558dc397d8a6c81b8b12d5896d320058c..3940eb6538897c8120e3cf00f66d16eadb386020 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(ExecutionContext* 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) {
for (size_t i = 0; i < m_regions->length(); ++i)
m_regions->item(i)->setTrack(0);
}
-#endif
clearClient();
}
@@ -281,12 +278,6 @@ void TextTrack::removeCue(TextTrackCue* cue, ExceptionState& es)
m_client->textTrackRemoveCue(this, cue);
}
-#if ENABLE(WEBVTT_REGIONS)
-TextTrackRegionList* TextTrack::regionList()
-{
- return ensureTextTrackRegionList();
-}
-
TextTrackRegionList* TextTrack::ensureTextTrackRegionList()
{
if (!m_regions)
@@ -303,9 +294,8 @@ TextTrackRegionList* TextTrack::regions()
// the text track list of regions of the text track. Otherwise, it must
// return null. When an object is returned, the same object must be returned
// each time.
- if (m_mode != disabledKeyword())
+ if (RuntimeEnabledFeatures::webVTTRegionsEnabled() && m_mode != disabledKeyword())
return ensureTextTrackRegionList();
-
return 0;
}
@@ -358,7 +348,6 @@ void TextTrack::removeRegion(TextTrackRegion* region, ExceptionState &es)
region->setTrack(0);
}
-#endif
void TextTrack::cueWillChange(TextTrackCue* cue)
{
« no previous file with comments | « Source/core/html/track/TextTrack.h ('k') | Source/core/html/track/TextTrack.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698