Chromium Code Reviews| Index: Source/core/html/shadow/MediaControlElements.cpp |
| diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp |
| index 6a9061faad9695140a4690124e1c95418ab32ba5..ed387eb4f1894d752a3305b6ba450d3393384d93 100644 |
| --- a/Source/core/html/shadow/MediaControlElements.cpp |
| +++ b/Source/core/html/shadow/MediaControlElements.cpp |
| @@ -30,6 +30,7 @@ |
| #include "config.h" |
| #include "core/html/shadow/MediaControlElements.h" |
| +#include "RuntimeEnabledFeatures.h" |
| #include "bindings/v8/ExceptionStatePlaceholder.h" |
| #include "core/dom/DOMTokenList.h" |
| #include "core/events/EventNames.h" |
| @@ -737,20 +738,17 @@ void MediaControlTextTrackContainerElement::updateDisplay() |
| continue; |
| RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplaySize.size()); |
| + TextTrackRegion* region = 0; |
| + if (RuntimeEnabledFeatures::webVTTRegionsEnabled() && cue->track()->regions()) |
| + region = cue->track()->regions()->getRegionById(cue->regionId()); |
| -#if ENABLE(WEBVTT_REGIONS) |
| - String regionId = cue->regionId(); |
| - TextTrackRegion* region = cue->track()->regions()->getRegionById(regionId); |
| - if (!region) { |
| + if (!RuntimeEnabledFeatures::webVTTRegionsEnabled() || !region) { |
|
acolwell GONE FROM CHROMIUM
2013/10/04 19:48:20
nit: Isn't the !RuntimeEnabledFeatures::webVTTRegi
vcarbune.chromium
2013/10/08 18:07:38
Correct, I removed it from here and the line above
|
| // If cue has an empty text track cue region identifier or there is no |
| // WebVTT region whose region identifier is identical to cue's text |
| // track cue region identifier, run the following substeps: |
| -#endif |
| - if (displayBox->hasChildNodes() && !contains(displayBox.get())) { |
| + if (displayBox->hasChildNodes() && !contains(displayBox.get())) |
| // Note: the display tree of a cue is removed when the active flag of the cue is unset. |
| appendChild(displayBox); |
| - } |
| -#if ENABLE(WEBVTT_REGIONS) |
| } else { |
| // Let region be the WebVTT region whose region identifier |
| // matches the text track cue region identifier of cue. |
| @@ -762,7 +760,6 @@ void MediaControlTextTrackContainerElement::updateDisplay() |
| region->appendTextTrackCueBox(displayBox); |
| } |
| -#endif |
| } |
| // 11. Return output. |