Bug 1533909 - part1 : 'current cues' should not contain cues which are in the disable track. r=jya
authorAlastor Wu <alwu@mozilla.com>
Wed, 13 Mar 2019 05:33:30 +0000
changeset 521668 440f5cace4fb738b5e22d8fb3f1756341d90b5b8
parent 521667 3a2f408c40dfae660f297434a152b4b01d3c508c
child 521669 c83f5ecdd6d633b9df3263c83e438bbef1c9a103
push id10867
push userdvarga@mozilla.com
push dateThu, 14 Mar 2019 15:20:45 +0000
treeherdermozilla-beta@abad13547875 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1533909
milestone67.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1533909 - part1 : 'current cues' should not contain cues which are in the disable track. r=jya According to the spec [1] step1, `current cues` should only contain cues which are in `hidden` or `showing` track. [1] https://html.spec.whatwg.org/multipage/media.html#time-marches-on Differential Revision: https://phabricator.services.mozilla.com/D23086
dom/html/TextTrackManager.cpp
--- a/dom/html/TextTrackManager.cpp
+++ b/dom/html/TextTrackManager.cpp
@@ -649,17 +649,17 @@ void TextTrackManager::TimeMarchesOn() {
       mLastTimeMarchesOnCalled, currentPlaybackTime, hasNormalPlayback);
 
   // Step 1, 2.
   RefPtr<TextTrackCueList> currentCues = new TextTrackCueList(window);
   RefPtr<TextTrackCueList> otherCues = new TextTrackCueList(window);
   bool dummy;
   for (uint32_t index = 0; index < mTextTracks->Length(); ++index) {
     TextTrack* ttrack = mTextTracks->IndexedGetter(index, dummy);
-    if (ttrack && dummy) {
+    if (ttrack && ttrack->Mode() != TextTrackMode::Disabled) {
       // TODO: call GetCueListByTimeInterval on mNewCues?
       ttrack->GetCurrentCueList(currentCues);
     }
   }
   WEBVTT_LOGV("TimeMarchesOn currentCues %d", currentCues->Length());
   // Populate otherCues with 'non-active" cues.
   if (hasNormalPlayback) {
     if (currentPlaybackTime < mLastTimeMarchesOnCalled) {