mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-09 13:25:00 +00:00
Bug 868611 - Implement HTMLTrackElement::UbindFromTree. r=rillian
Update HTMLTrackElement::UnbindFromTree to remove its TextTrack from its HTMLMediaElement's list of TextTracks.
This commit is contained in:
parent
9175f35127
commit
cd546780e3
@ -523,6 +523,10 @@ public:
|
||||
mTextTracks->AddTextTrack(aTextTrack);
|
||||
}
|
||||
|
||||
void RemoveTextTrack(TextTrack* aTextTrack) {
|
||||
mTextTracks->RemoveTextTrack(*aTextTrack);
|
||||
}
|
||||
|
||||
protected:
|
||||
class MediaLoadListener;
|
||||
class StreamListener;
|
||||
|
@ -314,8 +314,11 @@ HTMLTrackElement::BindToTree(nsIDocument* aDocument,
|
||||
void
|
||||
HTMLTrackElement::UnbindFromTree(bool aDeep, bool aNullParent)
|
||||
{
|
||||
if (mMediaParent && aNullParent) {
|
||||
mMediaParent = nullptr;
|
||||
if (mMediaParent) {
|
||||
mMediaParent->RemoveTextTrack(mTrack);
|
||||
if (aNullParent) {
|
||||
mMediaParent = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
nsGenericHTMLElement::UnbindFromTree(aDeep, aNullParent);
|
||||
|
Loading…
Reference in New Issue
Block a user