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

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

Issue 1022743002: Document calls to the "rules for updating the text track rendering" (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: leave comments only Created 5 years, 9 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/CueTimeline.cpp » ('j') | no next file with comments »
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 ae9acd56ba267b4f882581e388d8ac110b184501..4632db8fc5ffd6beed2373ed282a892c98469b02 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,6 +3351,13 @@ void HTMLMediaElement::configureTextTrackDisplay(VisibilityChangeAssumption assu
mediaControls()->changedClosedCaptionsVisibility();
cueTimeline().updateActiveCues(currentTime());
+
+ // 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 changed mode between hidden and showing.
+ // This appears to be a spec bug, which we work around here:
+ // https://www.w3.org/Bugs/Public/show_bug.cgi?id=28236
updateTextTrackDisplay();
}
« no previous file with comments | « no previous file | Source/core/html/track/CueTimeline.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698