Bug 105482

Summary: Implement :past pseudo class for the WebVTT ::cue pseudo element
Product: WebKit Reporter: Dima Gorbik <dgorbik>
Component: MediaAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: allan.jensen, cmarcelo, eric.carlson, feature-media-reviews, koivisto, macpherson, menard, ojan.autocc, silviapf, vcarbune, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 43668    
Description Flags
Proposed fix 0.1 none

Description Dima Gorbik 2012-12-19 16:57:54 PST
Basically :past styles all the nodes except for the :future nodes. We could use the combination of ::cue() and ::cue(:future) to style WebVTT nodes that are in the past, though it may be good to have a designated selector for that.
Comment 1 Radar WebKit Bug Importer 2012-12-19 16:58:35 PST
Comment 2 Dima Gorbik 2013-01-22 18:49:24 PST
Created attachment 184101 [details]
Proposed fix 0.1
Comment 3 Eric Carlson 2013-01-24 10:18:48 PST
Comment on attachment 184101 [details]
Proposed fix 0.1

View in context: https://bugs.webkit.org/attachment.cgi?id=184101&action=review

r+ but I would prefer to have a bit more logging to help someone looking at the test results figure out what is happening.

> LayoutTests/media/track/track-css-matching-timestamps-expected.txt:32
> +RUN(video.currentTime = 0.7)
> +EVENT(seeked)
> +EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
> +EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
> +EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK
> +EXPECTED (getComputedStyle(cueNode).color == 'rgb(128, 128, 128)') OK
> +EXPECTED (getComputedStyle(cueNode).color == 'rgb(0, 255, 0)') OK

I thought these results were wrong at first, and really had to scratch my head before I understood the tree structure created by the <c>s in the cue. I think it would be worth also logging the text of each cue node to make it more obvious what is going on.
Comment 4 WebKit Review Bot 2013-01-24 12:26:24 PST
Comment on attachment 184101 [details]
Proposed fix 0.1

Clearing flags on attachment: 184101

Committed r140707: <http://trac.webkit.org/changeset/140707>
Comment 5 WebKit Review Bot 2013-01-24 12:26:28 PST
All reviewed patches have been landed.  Closing bug.