Implement :past and :future pseudo-classes
Categories
(Core :: Audio/Video: Playback, enhancement)
Tracking
()
People
(Reporter: reyre, Assigned: alwu)
References
(Depends on 3 open bugs, Blocks 2 open bugs, )
Details
(4 keywords, Whiteboard: [webcompat:risk-low])
User Story
web-feature: time-relative-selectors
| Reporter | ||
Updated•13 years ago
|
| Reporter | ||
Updated•13 years ago
|
Comment 2•13 years ago
|
||
| Reporter | ||
Comment 3•13 years ago
|
||
Updated•13 years ago
|
Updated•10 years ago
|
Updated•10 years ago
|
Comment 5•9 years ago
|
||
Comment 6•9 years ago
|
||
Comment 7•9 years ago
|
||
Comment 8•9 years ago
|
||
Comment 9•9 years ago
|
||
Updated•9 years ago
|
| Assignee | ||
Comment 10•9 years ago
|
||
| Assignee | ||
Updated•7 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Updated•1 year ago
|
Updated•11 months ago
|
Updated•6 months ago
|
Updated•3 months ago
|
Updated•2 months ago
|
Updated•1 month ago
|
Comment 11•1 month ago
|
||
Moving to the media component. The complexity is there, the CSS bits are trivial. Alastor, do you have a sense of how easy / hard would it be to plumb these? Do we even support WebVTT inline stylesheets? I think we don't?
| Assignee | ||
Comment 12•1 month ago
|
||
I might be able to find sometime this year to work on this, assign to myself to do a quick investigation for the current status/plan later. Keep my NI.
| Assignee | ||
Comment 13•1 month ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #11)
Do we even support WebVTT inline stylesheets?
Supported today:
- bare
::cuefrom a document stylesheet, for the WebVTT-allowed properties: color, background, font, text-shadow...e.t.c.
Not supported:
- functional
::cue(<selector>) - in-file
STYLEblocks ::cue-region:past/:future
So basically only the bare ::cue-from-document case works. This matches the status I noted in bug 865395 comment 21. Nothing has changed since.
Do you have a sense of how easy / hard would it be to plumb these?
The CSS keyword bits are trivial as you say, but there's a prerequisite and then the WebVTT work.
1. Selector support
:past/:future are always authored as ::cue(:past) (they're general time-dimensional pseudo-classes, Selectors L5, but cue words are anonymous content, so ::cue() is the only way author CSS can reach them; a bare :past {} is meaningless for captions).
We don't parse the functional ::cue(<selector>) form at all today, so we first need at least a minimal ::cue() parser that accepts a pseudo-class argument. We can keep it minimal because the property set inside ::cue(:past) is the same as plain ::cue, so we skip the selector-dependent property-restriction machinery (the hard/weird part of full ::cue(<selector>)).
2. WebVTT Plumbing
In the WebVTT side, the direction is: make the inline timestamps stylable and flip a past/future state on the surrounding text as playback crosses each timestamp. WebKit does essentially this (markFutureAndPastNodes()/updateDisplayTree()).
3. Testing.
The WPT already exist, so this part is easy.
Conclusion
I'd put :past/:future (minimal ::cue() prerequisite + the WebVTT work) at roughly 1-2 months.
However, filling the whole gap is a lot bigger: full functional ::cue(<selector>) with its per-selector property restrictions, STYLE-block styling, and ::cue-region. That is what bug 865395 is tracking.
Description
•