-
victor@rosedu.org authored
https://bugs.webkit.org/show_bug.cgi?id=106199 Reviewed by Eric Carlson. Source/WebCore: The browser is crashing if a text track is added through JavaScript, due to the fact that the containing block is not marked as inline at the time RenderTextTrackCue::layout() is called. The fix consists of ensuring that the pseudo id is set, even if the track isn't yet visible. Test: media/track/track-cue-inline-assertion-crash.html * html/track/TextTrackCue.cpp: (WebCore::TextTrackCue::updateDisplayTree): The pseudo-id should be set when the display tree is generated. (WebCore::TextTrackCue::getDisplayTree): Added extra check to not do unneccessary logic if the track will never be displayed. LayoutTests: * media/track/track-cue-inline-assertion-crash-expected.txt: Added. * media/track/track-cue-inline-assertion-crash.html: Added. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@138966 268f45cc-cd09-0410-ab3c-d52691b4dbfc
5d76638a