Use WeakPtr to refer to VTTCue in VTTCueBox
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 03:05:28 +0000 (03:05 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 11 Dec 2018 03:05:28 +0000 (03:05 +0000)
commit4adf7f9b42b0b2520d6db67872333b8ec19f65e6
tree2df2885a0a5edb83221187f453a35cef4191d877
parent50c5d5da3f67f63cf515ed13342fe2f12affe6b0
Use WeakPtr to refer to VTTCue in VTTCueBox
https://bugs.webkit.org/show_bug.cgi?id=192575

Reviewed by Eric Carlson.

Address the FIXME in VTTCue::~VTTCue by clearing VTTCueBox::m_cue when VTTCue goes away.
This is implemented by simply using WeakPtr.

No new tests since there shoul be no behaivoral change.

* html/track/TextTrackCueGeneric.cpp:
(WebCore::TextTrackCueGenericBoxElement::applyCSSProperties):
* html/track/VTTCue.cpp:
(WebCore::VTTCueBox::VTTCueBox):
(WebCore::VTTCueBox::getCue const):
(WebCore::VTTCueBox::applyCSSProperties):
(WebCore::VTTCue::~VTTCue):
* html/track/VTTCue.h:
(WebCore::VTTCueBox::fontSizeFromCaptionUserPrefs const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239063 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/html/track/TextTrackCueGeneric.cpp
Source/WebCore/html/track/VTTCue.cpp
Source/WebCore/html/track/VTTCue.h