mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 1275808 - Move the UpdateCueDisplay() into TimeMarchesOn() as step 18. r=rillian
MozReview-Commit-ID: GrcZCjstBy9 --HG-- extra : rebase_source : 7848e6477595dcf0d83753a1c29489ea3f5cb689
This commit is contained in:
parent
4f4db37a25
commit
d120c38a97
@ -4826,7 +4826,7 @@ void HTMLMediaElement::FireTimeUpdate(bool aPeriodic)
|
||||
// us before our parent. In that case UnbindFromTree will call us
|
||||
// when our parent is unlinked.
|
||||
if (mTextTrackManager) {
|
||||
mTextTrackManager->UpdateCueDisplay();
|
||||
mTextTrackManager->TimeMarchesOn();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -83,12 +83,6 @@ public:
|
||||
* Current rules are taken from revision on April 15, 2013.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Converts the TextTrackCue's cuetext into a tree of DOM objects and attaches
|
||||
* it to a div on it's owning TrackElement's MediaElement's caption overlay.
|
||||
*/
|
||||
void UpdateCueDisplay();
|
||||
|
||||
void PopulatePendingList();
|
||||
|
||||
void AddListeners();
|
||||
@ -97,6 +91,7 @@ public:
|
||||
RefPtr<HTMLMediaElement> mMediaElement;
|
||||
|
||||
void DispatchTimeMarchesOn();
|
||||
void TimeMarchesOn();
|
||||
|
||||
void NotifyShutdown()
|
||||
{
|
||||
@ -104,7 +99,12 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
void TimeMarchesOn();
|
||||
/**
|
||||
* Converts the TextTrackCue's cuetext into a tree of DOM objects
|
||||
* and attaches it to a div on its owning TrackElement's
|
||||
* MediaElement's caption overlay.
|
||||
*/
|
||||
void UpdateCueDisplay();
|
||||
|
||||
// List of the TextTrackManager's owning HTMLMediaElement's TextTracks.
|
||||
RefPtr<TextTrackList> mTextTracks;
|
||||
|
Loading…
Reference in New Issue
Block a user