Bug 1509446 - part1 : update active cues list when cue's active state changed. r=jya

According to spec [1], `activeCues` should represent a subset of the text track cues whose active flag was set when the script started.

We should only depend on the `TimeMarchesOn` algorithm which will change cue's active state, and then add or remove cue to `activeCues`.

[1] https://html.spec.whatwg.org/multipage/media.html#dom-texttrack-activecues

Differential Revision: https://phabricator.services.mozilla.com/D22147
This commit is contained in:
Alastor Wu
2019-03-08 03:10:45 +00:00
parent edc9b9d006
commit b4799c7bc3
5 changed files with 28 additions and 50 deletions

View File

@@ -661,7 +661,6 @@ void TextTrackManager::TimeMarchesOn() {
TextTrack* ttrack = mTextTracks->IndexedGetter(index, dummy);
if (ttrack && dummy) {
// TODO: call GetCueListByTimeInterval on mNewCues?
ttrack->UpdateActiveCueList();
TextTrackCueList* activeCueList = ttrack->GetActiveCues();
if (activeCueList) {
for (uint32_t i = 0; i < activeCueList->Length(); ++i) {