Bug 1550633 - part4 : no need to run text track selection in stable state. r=bzbarsky
According to spec [1], it doesn't mention that we have to run text track selection in stable state, it just said "the user agent must queue a task to run the following steps". [1] https://html.spec.whatwg.org/multipage/media.html#honor-user-preferences-for-automatic-text-track-selection Differential Revision: https://phabricator.services.mozilla.com/D31374
This commit is contained in:
@@ -166,7 +166,7 @@ already_AddRefed<TextTrack> TextTrackManager::AddTextTrack(
|
||||
RefPtr<nsIRunnable> task = NewRunnableMethod(
|
||||
"dom::TextTrackManager::HonorUserPreferencesForTrackSelection", this,
|
||||
&TextTrackManager::HonorUserPreferencesForTrackSelection);
|
||||
nsContentUtils::RunInStableState(task.forget());
|
||||
NS_DispatchToMainThread(task.forget());
|
||||
}
|
||||
|
||||
return track.forget();
|
||||
@@ -185,7 +185,7 @@ void TextTrackManager::AddTextTrack(TextTrack* aTextTrack) {
|
||||
RefPtr<nsIRunnable> task = NewRunnableMethod(
|
||||
"dom::TextTrackManager::HonorUserPreferencesForTrackSelection", this,
|
||||
&TextTrackManager::HonorUserPreferencesForTrackSelection);
|
||||
nsContentUtils::RunInStableState(task.forget());
|
||||
NS_DispatchToMainThread(task.forget());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user