Bug 105482 - Implement :past pseudo class for the WebVTT ::cue pseudo element
Summary: Implement :past pseudo class for the WebVTT ::cue pseudo element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 43668
  Show dependency treegraph
 
Reported: 2012-12-19 16:57 PST by Dima Gorbik
Modified: 2013-01-24 12:26 PST (History)
12 users (show)

See Also:


Attachments
Proposed fix 0.1 (10.26 KB, patch)
2013-01-22 18:49 PST, Dima Gorbik
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.
http://dev.w3.org/html5/webvtt/#the-'::cue'-pseudo-element
Comment 1 Radar WebKit Bug Importer 2012-12-19 16:58:35 PST
<rdar://problem/12914642>
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.