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

Unified Diff: Source/core/html/HTMLMediaElement.cpp

Issue 952493002: Simplify HTMLMediaElement::textTrackModeChanged (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | Source/core/html/track/TextTrack.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/HTMLMediaElement.cpp
diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp
index 23ba1efbfe7eab84dee7b489679d6b4c1a681d4e..7435a5095c4ae7576f0d677ea5e4d9d6d29b8c8e 100644
--- a/Source/core/html/HTMLMediaElement.cpp
+++ b/Source/core/html/HTMLMediaElement.cpp
@@ -1151,32 +1151,9 @@ void HTMLMediaElement::textTrackReadyStateChanged(TextTrack* track)
void HTMLMediaElement::textTrackModeChanged(TextTrack* track)
{
- if (track->trackType() == TextTrack::TrackElement) {
- // 4.8.10.12.3 Sourcing out-of-band text tracks
- // ... when a text track corresponding to a track element is created with text track
- // mode set to disabled and subsequently changes its text track mode to hidden, showing,
- // or showing by default for the first time, the user agent must immediately and synchronously
- // run the following algorithm ...
-
- for (HTMLTrackElement* trackElement = Traversal<HTMLTrackElement>::firstChild(*this); trackElement; trackElement = Traversal<HTMLTrackElement>::nextSibling(*trackElement)) {
- if (trackElement->track() != track)
- continue;
-
- // Mark this track as "configured" so configureTextTracks won't change the mode again.
- track->setHasBeenConfigured(true);
- if (track->mode() != TextTrack::disabledKeyword()) {
- if (trackElement->readyState() == HTMLTrackElement::LOADED)
- cueTimeline().addCues(track, track->cues());
-
- // If this is the first added track, create the list of text tracks.
philipj_slow 2015/02/25 15:52:14 Was this just dead code?
fs 2015/02/25 16:26:11 Yes. (This method was only called from within Text
- if (!m_textTracks)
- m_textTracks = TextTrackList::create(this);
- }
- break;
- }
- } else if (track->trackType() == TextTrack::AddTrack && track->mode() != TextTrack::disabledKeyword()) {
- cueTimeline().addCues(track, track->cues());
- }
+ // Mark this track as "configured" so configureTextTracks won't change the mode again.
+ if (track->trackType() == TextTrack::TrackElement)
+ track->setHasBeenConfigured(true);
configureTextTrackDisplay(AssumeVisibleChange);
« no previous file with comments | « no previous file | Source/core/html/track/TextTrack.cpp » ('j') | Source/core/html/track/TextTrack.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698