Changeset 139562 in webkit


Ignore:
Timestamp:
Jan 13, 2013 4:25:21 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

Styling disappears from the cue that's being styled by ::cue pseudo element
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.
Location:
trunk
Files:
3 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r139561 r139562  
     12013-01-13  Dima Gorbik  <dgorbik@apple.com>
     2
     3        Styling disappears from the cue that's being styled by ::cue pseudo element
     4        https://bugs.webkit.org/show_bug.cgi?id=106723
     5
     6        Reviewed by Antti Koivisto.
     7
     8        * media/track/captions-webvtt/styling-lifetime.vtt: Added.
     9        * media/track/track-css-cue-lifetime-expected.txt: Added.
     10        * media/track/track-css-cue-lifetime.html: Added.
     11
    1122013-01-13  Csaba Osztrogonác  <ossy@webkit.org>
    213
  • trunk/Source/WebCore/ChangeLog

    r139556 r139562  
     12013-01-13  Dima Gorbik  <dgorbik@apple.com>
     2
     3        Styling disappears from the cue that's being styled by ::cue pseudo element
     4        https://bugs.webkit.org/show_bug.cgi?id=106723
     5
     6        Reviewed by Antti Koivisto.
     7
     8        Fixes a regression caused by r138966. Setting a pseudoId in TextTrackCue::updateDisplayTree for m_allDocumentNodes
     9        was triggering recalculating styles the next run loop. Now when this was removed we append the WebVTT tree after its children have
     10        been marked by markFutureAndPastNodes so that correct styles are set within this append call.
     11
     12        Test: media/track/track-css-cue-lifetime.html
     13
     14        * html/track/TextTrackCue.cpp:
     15        (WebCore::TextTrackCue::markFutureAndPastNodes): changing the type of the first argument because DocumentFragment is not a subclass
     16        of Element.
     17        (WebCore::TextTrackCue::updateDisplayTree): appending the WebVTT rendering tree after its children have been marked properly.
     18        * html/track/TextTrackCue.h:
     19        (TextTrackCue):
     20
    1212013-01-12  David Grogan  <dgrogan@chromium.org>
    222
  • trunk/Source/WebCore/html/track/TextTrackCue.cpp

    r138966 r139562  
    659659}
    660660   
    661 void TextTrackCue::markFutureAndPastNodes(Element* root, double previousTimestamp, double movieTime)
     661void TextTrackCue::markFutureAndPastNodes(Node* root, double previousTimestamp, double movieTime)
    662662{
    663663    DEFINE_STATIC_LOCAL(const String, timestampTag, (ASCIILiteral("timestamp")));
     
    701701    // Update the two sets containing past and future WebVTT objects.
    702702    RefPtr<DocumentFragment> referenceTree = getCueAsHTML();
    703 
     703    markFutureAndPastNodes(referenceTree.get(), startTime(), movieTime);
    704704    m_allDocumentNodes->appendChild(referenceTree);
    705     markFutureAndPastNodes(m_allDocumentNodes.get(), startTime(), movieTime);
    706705}
    707706
  • trunk/Source/WebCore/html/track/TextTrackCue.h

    r138784 r139562  
    136136    void updateDisplayTree(float);
    137137    void removeDisplayTree();
    138     void markFutureAndPastNodes(Element*, double, double);
     138    void markFutureAndPastNodes(Node*, double, double);
    139139
    140140    int calculateComputedLinePosition();
Note: See TracChangeset for help on using the changeset viewer.