Bug 1275808 - Move the UpdateCueDisplay() into TimeMarchesOn() as step 18. r=rillian

MozReview-Commit-ID: GrcZCjstBy9
This commit is contained in:
bechen
2016-06-01 17:37:26 +08:00
parent 293a787831
commit e0bae2d76b
3 changed files with 12 additions and 13 deletions

View File

@@ -252,10 +252,6 @@ TextTrackManager::UpdateCueDisplay()
} else if (overlay->Length() > 0) {
nsContentUtils::SetNodeTextContent(overlay, EmptyString(), true);
}
// Call TimeMarchesOn() directly instead DispatchTimeMarchesOn()
// because we had render the new cue, so we must run
// TimeMarchesOn immediately.
TimeMarchesOn();
}
void
@@ -539,7 +535,7 @@ TextTrackManager::TimeMarchesOn()
nsCOMPtr<nsPIDOMWindowInner> window = do_QueryInterface(parentObject);
if (mMediaElement &&
(!(mMediaElement->GetPlayedOrSeeked())|| mMediaElement->Seeking())) {
(!(mMediaElement->GetPlayedOrSeeked()) || mMediaElement->Seeking())) {
return;
}
@@ -711,6 +707,9 @@ TextTrackManager::TimeMarchesOn()
mLastTimeMarchesOnCalled = currentPlaybackTime;
mLastActiveCues = currentCues;
// Step 18.
UpdateCueDisplay();
}
} // namespace dom