DescriptionEliminate TextTrackCue::updateDisplayTree()
updateDisplayTree() cloned and inserted a new tree every time, and was
called continuously from CueTimeline::updateActiveCues(). The net effect
of this was to re-layout the cue continuously, causing cues to move into
areas where a cue was previously. The letter and spirit of the WebVTT
spec is to have a stable layout, where cues do not move once laid out.
TEST=LayoutTests/media/track/track-webvtt-two-cue-layout-after-first-end.html
As the display tree is now kept intact, it becomes necessary to
invalidate the style in setIsPastNode.
Test coverage of past and future cues:
LayoutTests/media/track/cue-style-invalidation.html
LayoutTests/media/track/track-css-matching-timestamps.html
LayoutTests/media/track/track-css-matching.html
Note that per spec a part of the cue could match neither :past nor
:future, but our implementation is mutually exclusive. It's not clear
what the best behavior is, so a spec bug was filed instead:
https://www.w3.org/Bugs/Public/show_bug.cgi?id=28237
BUG=322434
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=192171
Patch Set 1 #
Total comments: 4
Patch Set 2 : coerce m_isPastNode to bool #Messages
Total messages: 10 (3 generated)
|