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

Unified Diff: Source/core/html/shadow/MediaControlElements.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/HTMLMediaElement.cpp ('k') | Source/core/html/track/LoadableTextTrack.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/shadow/MediaControlElements.cpp
diff --git a/Source/core/html/shadow/MediaControlElements.cpp b/Source/core/html/shadow/MediaControlElements.cpp
index 8bcb996b6d8967ecec9dbf4131e126447a18ba68..02b4b9ce7b3bab577073e763fe74429516589ceb 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/dom/FullscreenElementStack.h"
@@ -737,20 +738,17 @@ void MediaControlTextTrackContainerElement::updateDisplay()
continue;
RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplaySize.size());
+ TextTrackRegion* region = 0;
+ if (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 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.
« no previous file with comments | « Source/core/html/HTMLMediaElement.cpp ('k') | Source/core/html/track/LoadableTextTrack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698