Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index 85ecc7663bee2719647c9eb645e2269f605e9f09..3794196f81d4d7a939283de2830aaf795e22d53f 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -1031,16 +1031,8 @@ void HTMLMediaElement::updateActiveTextTrackCues(double movieTime) |
| activeSetChanged = true; |
| } |
| - if (!activeSetChanged) { |
| - // Even though the active set has not changed, it is possible that the |
| - // the mode of a track has changed from 'hidden' to 'showing' and the |
| - // cues have not yet been rendered. |
| - // Note: don't call updateTextTrackDisplay() unless we have controls because it will |
| - // create them. |
| - if (hasMediaControls()) |
|
acolwell GONE FROM CHROMIUM
2013/08/12 20:19:02
Why is this code dropped? Doesn't this result in a
vcarbune.chromium
2013/08/19 22:20:12
No, configureTextTrackDisplay now calls this if As
|
| - updateTextTrackDisplay(); |
| + if (!activeSetChanged) |
| return; |
| - } |
| // 7 - If the time was reached through the usual monotonic increase of the |
| // current playback position during normal playback, and there are cues in |
| @@ -1241,8 +1233,7 @@ void HTMLMediaElement::textTrackModeChanged(TextTrack* track) |
| } else if (track->trackType() == TextTrack::AddTrack && track->mode() != TextTrack::disabledKeyword()) |
| textTrackAddCues(track, track->cues()); |
| - configureTextTrackDisplay(); |
| - updateActiveTextTrackCues(currentTime()); |
| + configureTextTrackDisplay(AssumeVisibleTextTracksChanged); |
| } |
| void HTMLMediaElement::textTrackKindChanged(TextTrack* track) |
| @@ -3710,7 +3701,7 @@ void HTMLMediaElement::configureMediaControls() |
| mediaControls()->show(); |
| } |
| -void HTMLMediaElement::configureTextTrackDisplay() |
| +void HTMLMediaElement::configureTextTrackDisplay(ConfigureTextTrackDisplayFlags flags) |
| { |
| ASSERT(m_textTracks); |
| LOG(Media, "HTMLMediaElement::configureTextTrackDisplay"); |
| @@ -3726,8 +3717,11 @@ void HTMLMediaElement::configureTextTrackDisplay() |
| } |
| } |
| - if (m_haveVisibleTextTrack == haveVisibleTextTrack) |
| + if (flags == DoNotAssumeVisibleTextTracksChanged |
| + && m_haveVisibleTextTrack == haveVisibleTextTrack) { |
| + updateActiveTextTrackCues(currentTime()); |
| return; |
| + } |
| m_haveVisibleTextTrack = haveVisibleTextTrack; |
| m_closedCaptionsVisible = m_haveVisibleTextTrack; |