Bug 1334112 -part3 : Trigger UpdateReadyState after unbind TrackElement's and TextTrack::SetReadyState. r=rillian

MozReview-Commit-ID: pEeOzZSpak

--HG--
extra : rebase_source : cf7759c746f3fa9221dcda03327fd6b3c5997ee7
This commit is contained in:
bechen 2017-02-21 15:44:10 +08:00
Родитель 2f4c6ee015
Коммит da4381687d
2 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -392,6 +392,7 @@ HTMLTrackElement::UnbindFromTree(bool aDeep, bool aNullParent)
// called. // called.
if (mTrack) { if (mTrack) {
mMediaParent->RemoveTextTrack(mTrack); mMediaParent->RemoveTextTrack(mTrack);
mMediaParent->UpdateReadyState();
} }
mMediaParent = nullptr; mMediaParent = nullptr;
} }

Просмотреть файл

@ -263,6 +263,7 @@ TextTrack::SetReadyState(TextTrackReadyState aState)
if (mediaElement && (mReadyState == TextTrackReadyState::Loaded|| if (mediaElement && (mReadyState == TextTrackReadyState::Loaded||
mReadyState == TextTrackReadyState::FailedToLoad)) { mReadyState == TextTrackReadyState::FailedToLoad)) {
mediaElement->RemoveTextTrack(this, true); mediaElement->RemoveTextTrack(this, true);
mediaElement->UpdateReadyState();
} }
} }