Skip to content
  • commit-queue@webkit.org's avatar
    Styling disappears from the cue that's being styled by ::cue pseudo element · 3f330b37
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=106723
    
    Patch by Dima Gorbik <dgorbik@apple.com> on 2013-01-13
    Reviewed by Antti Koivisto.
    
    Source/WebCore:
    
    Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
    was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
    been marked by markFutureAndPastNodes so that correct styles are set within this append call.
    
    Test: media/track/track-css-cue-lifetime.html
    
    * html/track/TextTrackCue.cpp:
    (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
    of Element.
    (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
    * html/track/TextTrackCue.h:
    (TextTrackCue):
    
    LayoutTests:
    
    * media/track/captions-webvtt/styling-lifetime.vtt: Added.
    * media/track/track-css-cue-lifetime-expected.txt: Added.
    * media/track/track-css-cue-lifetime.html: Added.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@139562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    3f330b37