| 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..950207e18071a68df4c96ab8513d494d1f5906a1 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) {
|
| 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)
|
| {
|
|
|