Clear track client when removing a track
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 00:35:32 +0000 (00:35 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 17 Nov 2016 00:35:32 +0000 (00:35 +0000)
commitb5f1131976cbf63ada4172be8a1675c4b9db4a1e
tree25d4ec2ace9a07034f5c0584f8ad7dfa8cad5af9
parent452aadef4b957ee14d5113e6d7d3717f2aad2258
Clear track client when removing a track
https://bugs.webkit.org/show_bug.cgi?id=164842
<rdar://problem/29213621>

Reviewed by Eric Carlson.

Source/WebCore:

Call 'clearClient' when removing a track from an HTMLMediaElement.

Test: media/track/audio-track-add-remove.html
      media/track/video-track-add-remove.html

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::removeAudioTrack): Call 'clearClient'
(WebCore::HTMLMediaElement::removeVideoTrack): Ditto.

LayoutTests:

* media/track/audio-track-add-remove-expected.txt: Added.
* media/track/audio-track-add-remove.html: Added.
* media/track/video-track-add-remove-expected.txt: Added.
* media/track/video-track-add-remove.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208825 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/audio-track-add-remove-expected.txt [new file with mode: 0644]
LayoutTests/media/track/audio-track-add-remove.html [new file with mode: 0644]
LayoutTests/media/track/video-track-add-remove-expected.txt [new file with mode: 0644]
LayoutTests/media/track/video-track-add-remove.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp