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

Unified Diff: Source/core/html/shadow/MediaControlElements.cpp

Issue 77853002: Move VTT functionality from TextTrackCue.* to VTTCue.* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address nits. Created 7 years, 1 month 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.h ('k') | Source/core/html/track/TextTrackCue.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 be6779c55324872696413abccf8029f093a151b9..c76cb41b5b7c02479a8064dffad9e89074f40e5c 100644
--- a/Source/core/html/shadow/MediaControlElements.cpp
+++ b/Source/core/html/shadow/MediaControlElements.cpp
@@ -735,29 +735,7 @@ void MediaControlTextTrackContainerElement::updateDisplay()
if (!cue->track() || !cue->track()->isRendered() || !cue->isActive())
continue;
- RefPtr<TextTrackCueBox> displayBox = cue->getDisplayTree(m_videoDisplaySize.size());
- VTTRegion* region = 0;
- if (cue->track()->regions())
- region = cue->track()->regions()->getRegionById(cue->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:
- 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);
- } else {
- // Let region be the WebVTT region whose region identifier
- // matches the text track cue region identifier of cue.
- RefPtr<HTMLDivElement> regionNode = region->getDisplayTree(document());
-
- // Append the region to the viewport, if it was not already.
- if (!contains(regionNode.get()))
- appendChild(regionNode);
-
- region->appendTextTrackCueBox(displayBox);
- }
+ cue->updateDisplay(m_videoDisplaySize.size(), *this);
}
// 11. Return output.
« no previous file with comments | « Source/core/html/HTMLMediaElement.h ('k') | Source/core/html/track/TextTrackCue.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698