Ensure media controls host exists before using it
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Aug 2017 16:25:21 +0000 (16:25 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 23 Aug 2017 16:25:21 +0000 (16:25 +0000)
commite29baa9d73f779fd70f515ef0bfd16be6175be1a
treeea29c3185a114b4a7ad5caebc11933d961937448
parent1f9bf9c78b15cd7d58dbe671ebd4456ecb20ae33
Ensure media controls host exists before using it
https://bugs.webkit.org/show_bug.cgi?id=175833
<rdar://problem/34001219>

Reviewed by Jer Noble.

Source/WebCore:

Although we ensure that the media controls shadow root exists before updating the text track
container, we don't check that the media controls host has been created yet. We do check
and create in other places in HTMLMediaElement.

* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::updateTextTrackDisplay):

LayoutTests:

* media/track/track-display-before-controls-crash-expected.txt: Added.
* media/track/track-display-before-controls-crash.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221077 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/media/track/track-display-before-controls-crash-expected.txt [new file with mode: 0644]
LayoutTests/media/track/track-display-before-controls-crash.html [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/html/HTMLMediaElement.cpp