This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Step 10.14 of http://dev.w3.org/html5/webvtt/#webvtt-cue-text-rendering-rules is: "Done positioning: If there are any line boxes in the (possibly now repositioned) boxes that do not completely fit inside video's rendering area, remove those offending line boxes from boxes." Rather than trying to remove parts of cues that fall outside of the video content area, we'd like to apply overflow:hidden to simply clip to the content area. This is easier to implement and is slightly better: a line overflow by a single pixel will still be readable. (I bet it would also be easier to do in a polyfill, FWIW.)
(In reply to comment #0) > Step 10.14 of http://dev.w3.org/html5/webvtt/#webvtt-cue-text-rendering-rules > is: > > "Done positioning: If there are any line boxes in the (possibly now > repositioned) boxes that do not completely fit inside video's rendering area, > remove those offending line boxes from boxes." > > Rather than trying to remove parts of cues that fall outside of the video > content area, we'd like to apply overflow:hidden to simply clip to the content > area. This is easier to implement and is slightly better: a line overflow by a > single pixel will still be readable. (I bet it would also be easier to do in a > polyfill, FWIW.) I second Philip's suggestion.
Having clipped text everywhere is pretty ugly. Are we really sure we want this?
Not everywhere, just when there was no way fit the cue inside the rendering area, which is a pretty extreme situation. The option is between seeing nothing (current spec) and seeing something (clipping), and clipping seems easier to implement.
So we're saying that if the frame is completely filled with captions such that a new caption can't be put in, we're to require that the subtitle be added anyway, just overlapping or overflowing or something. I guess I can spec that. I'll have to study the algorithm again to work out what exactly to require.
To clarify, the only suggestion in this bug is to rely on CSS (overflow:hidden) to hide overflowing cues, instead of having the algorithm remove the line boxes. Changing the layout algorithm to avoid overflow/overlap in the first place is discussed in bug 17483.
So... what are we putting overflow:hidden _on_? Or should I just replace the current rule in the WebVTT "Done positioning" step that removes the overflowing cues with a rule that says that you must clip the rendering of cues that go outside the video's rendering area?
A non-overridable overflow:hidden on video or on an invisible child cue root box (which is what Opera has) would work.
By invisible I of course mean invisible to scripts, not visibility:hidden or anything like that.
I don't think the spec has such a concept yet. I think I need to just say that all cues must be clipped to the edge of whatever overall box they're being rendered in, or some such, rather than using 'overflow' itself.
Yeah, that would be fine.