Chromium Code Reviews| Index: Source/core/html/HTMLMediaElement.cpp |
| diff --git a/Source/core/html/HTMLMediaElement.cpp b/Source/core/html/HTMLMediaElement.cpp |
| index ae9acd56ba267b4f882581e388d8ac110b184501..b2b989cecc0fee9bdc3b7db6d7e07eed17e11eaa 100644 |
| --- a/Source/core/html/HTMLMediaElement.cpp |
| +++ b/Source/core/html/HTMLMediaElement.cpp |
| @@ -3210,6 +3210,9 @@ void HTMLMediaElement::setClosedCaptionsVisible(bool closedCaptionVisible) |
| honorUserPreferencesForAutomaticTextTrackSelection(); |
| m_processingPreferenceChange = false; |
| + // As track visibility changed while m_processingPreferenceChange was set, |
| + // there was no call to updateTextTrackDisplay(). This call is not in the |
| + // spec, see the note in configureTextTrackDisplay(). |
| updateTextTrackDisplay(); |
| } |
| @@ -3348,7 +3351,15 @@ void HTMLMediaElement::configureTextTrackDisplay(VisibilityChangeAssumption assu |
| mediaControls()->changedClosedCaptionsVisibility(); |
| cueTimeline().updateActiveCues(currentTime()); |
| - updateTextTrackDisplay(); |
| + |
| + // Note: The "time marches on" algorithm (updateActiveCues) runs the "rules |
| + // for updating the text track rendering" (updateTextTrackDisplay) only for |
| + // "affected tracks", i.e. tracks where the the active cues have changed. |
| + // This misses cues in tracks that have gone from hidden to showing. This |
| + // appears to be a spec bug, which we work around here: |
| + // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28236 |
| + if (assumption == AssumeVisibleChange) |
|
fs
2015/03/19 09:50:33
I'm not really 100% convinced that this call shoul
philipj_slow
2015/03/19 10:04:54
To play it safe I can make it unconditional again,
|
| + updateTextTrackDisplay(); |
| } |
| void* HTMLMediaElement::preDispatchEventHandler(Event* event) |